StyleLint Settings¶
This document describes stylelint setting according linter stylelint.io.
Editor plugins¶
You can try to find stylelint plugin in your editor package manager. For more info please visit stylelint.io user guide
Check and fix all files¶
If you want to fix all files in your command line, you can use this command:
php phing stylelint-fix
Used stylelint rules¶
All rules are defined at .stylelintrc
:
- block-no-empty : true
- block-closing-brace-empty-line-before : "never"
- block-opening-brace-space-before : "always"
- color-no-invalid-hex : true
- color-hex-case : "lower"
- comment-empty-line-before : "always"
- declaration-colon-space-after : "always"
- declaration-block-no-duplicate-properties : true
- function-calc-no-unspaced-operator : true
- indentation : 4
- length-zero-no-unit : true
- max-empty-lines : 2
- media-feature-name-case : "lower"
- no-extra-semicolons : true
- property-blacklist : [ "widht", "marign", "pading", "blcok" ]
- property-case : "lower"
- rule-empty-line-before : "always"
- unit-case : "lower"
- unit-whitelist : ["em", "rem", "%", "px", "s", "ms", "deg", "vh"]
Excluded files¶
You can define and exclude unneeded files at .stylelintignore
file. By default we exclude generated and third party plugin files. These files are excluded during fixing standards in command line.