.gitignore added
[dotfiles/.git] / .config / coc / extensions / node_modules / coc-prettier / node_modules / stylelint / lib / rules / no-invalid-double-slash-comments / README.md
1 # no-invalid-double-slash-comments
2
3 Disallow double-slash comments (`//...`) which are not supported by CSS and [could lead to unexpected results](https://stackoverflow.com/a/20192639/130652).
4
5 ```css
6 a { // color: pink; }
7 /** ↑
8  *  This comment */
9 ```
10
11 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"](http://www.xanthir.com/b4U10)).
12
13 ## Options
14
15 ### `true`
16
17 The following patterns are considered violations:
18
19 ```css
20 a { // color: pink; }
21 ```
22
23 ```css
24 // a { color: pink; }
25 ```
26
27 The following patterns are *not* considered violations:
28
29 ```css
30 a { /* color: pink; */ }
31 ```
32
33 ```css
34 /* a { color: pink; } */
35 ```