| Left: | ||
| Right: |
| LEFT | RIGHT |
|---|---|
| 1 # stylelint-config-eyeo | 1 # stylelint-config-eyeo |
| 2 | 2 |
| 3 A [Styelint](https://stylelint.io) configuration that checks for compliance with the [Adblock Plus coding style guide](https://adblockplus.org/coding-style#java script) which is used for all eyeo projects. | 3 A [Stylelint](https://stylelint.io) configuration that checks for compliance |
|
Thomas Greiner
2017/09/13 18:12:52
Typo: Replace "Styelint" with "Stylelint"
Thomas Greiner
2017/09/13 18:12:52
I don't see how this affects our JavaScript code s
ire
2017/09/14 08:33:00
Done.
ire
2017/09/14 08:33:00
Done.
| |
| 4 with the [Adblock Plus coding style guide](https://adblockplus.org/coding-style# html-css) | |
| 5 which is used for all eyeo projects. | |
| 4 | 6 |
| 5 ## Installation | 7 ## Installation |
| 6 | 8 |
| 7 npm install -g eslint stylelint-config-eyeo | 9 npm install -g stylelint |
|
Thomas Greiner
2017/09/13 18:12:52
I assume you meant to write "stylelint" instead of
ire
2017/09/14 08:32:59
Done.
| |
| 8 | 10 |
| 9 This command requires administrator privileges so you might need to use `sudo`. | 11 This command requires administrator privileges so you might need to use `sudo`. |
| 12 | |
| 13 Next, either install stylelint-config-eyeo within your project. For example: | |
| 14 | |
| 15 npm install --save-dev stylelint-config-eyeo | |
| 16 | |
| 17 Or, install stylelint-config-eyeo globally. For example: | |
| 18 | |
| 19 npm install -g stylelint-config-eyeo | |
| 20 | |
| 21 ## Usage | |
| 22 | |
| 23 To lint a CSS (or CSS-like, e.g. SCSS, SugarCSS, Less) file using Stylelint | |
| 24 you run the `stylelint` command with the file as an argument. For example: | |
| 25 | |
| 26 stylelint example.css | |
| 27 | |
| 28 For advanced usage see `stylelint --help`. | |
| 29 | |
| 30 In order to use stylelint-config-eyeo, your project's Stylelint configuration | |
| 31 should extend from it. A minimal example looks like this: | |
| 32 | |
| 33 { | |
| 34 "extends": "stylelint-config-eyeo" | |
| 35 } | |
| 36 | |
| 37 If you've globally installed stylelint-config-eyeo using the `-g` flag, then | |
| 38 you'll need to use the absolute path to stylelint-config-eyeo in your config. | |
| 39 | |
| 40 { | |
| 41 "extends": "/absolute/path/to/stylelint-config-eyeo" | |
| 42 } | |
| 43 | |
| 44 For projects without a Stylelint configuration you can create your own | |
| 45 personal configuration in `~/.stylelintrc.json`. | |
| LEFT | RIGHT |