Prevent the total number of comments from exceeding a predefined limit.
/* This is a comment */
/* ↑
* each comment is counted */This rule counts the total number of all CSS comments in the stylesheet.
Number
Given:
1
the following are considered violations:
/* first comment */
/* second comment */
a { color: red; }The following patterns are not considered problems:
a { color: red; }/* only one comment */
a { color: red; }Ignores copyright comments from the total count. A copyright comment is one that starts with /*!.
Given:
[0, { ignoreCopyrightComments: true }]
The following pattern is not considered a problem:
/*! Copyright 2024 My Company. All rights reserved. */
a { color: red; }