Skip to content

Files

Latest commit

 

History

History
35 lines (23 loc) · 864 Bytes

no-invalid-double-slash-comments.md

File metadata and controls

35 lines (23 loc) · 864 Bytes

Pattern: Use of double-slash comment

Issue: -

Description

If you are using a preprocessor that allows // single-line comments (e.g. Sass, Less, Stylus), this rule will not complain about those. They are compiled into standard CSS comments by your preprocessor, so stylelint will consider them valid. This rule only complains about the lesser-known method of using // to "comment out" a single line of code in regular CSS.

Examples

The following patterns are considered violations:

a { // color: pink; }
/** ↑
 *  This comment */
// a { color: pink; }

The following patterns are not considered violations:

a { /* color: pink; */ }
/* a { color: pink; } */

Further Reading