Skip to content

Latest commit

 

History

History
60 lines (41 loc) · 1010 Bytes

File metadata and controls

60 lines (41 loc) · 1010 Bytes

Max comments

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.

Options

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; }

Optional secondary options

ignoreCopyrightComments: true

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; }