1
0
mirror of https://github.com/thangisme/notes.git synced 2024-11-01 08:17:34 -04:00
notes/node_modules/stylelint/lib/rules/no-invalid-double-slash-comments/README.md
Patrick Marsceill b7b0d0d7bf
Initial commit
2017-03-09 13:16:08 -05:00

1017 B

no-invalid-double-slash-comments

Disallow double-slash comments (//...) which are not supported by CSS and could lead to unexpected results.

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

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. (If you didn't know this was possible, have a look at "Single Line Comments (//) in CSS").

Options

true

The following patterns are considered warnings:

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

The following patterns are not considered warnings:

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