@newlevelup/stylelint-config
v1.2.0
Published
New Level Up shareable config for stylelint
Downloads
139
Maintainers
Readme
stylelint-config
New Level Up shareable config for stylelint
Installation
:bulb: The purpose of
stylelint
is to style and format yourcss
,sass
,scss
files. This takes cares of new style conventions and warns about old deprecated style rules.
Install stylelint and @newlevelup/stylelint-config
:
yarn add -D stylelint @newlevelup/stylelint-config
Prettier
@newlevelup/eslint-config
should be used in conjunction with Prettier. See the @newlevelup/prettier-config
installation guide for more details.
Usage
New Level Up stylelint rules come bundled in @newlevelup/stylelint-config
. To enable these rules, add a stylelint
property in your package.json
. See the stylelint configuration docs for more details.
"stylelint": {
"extends": ["@newlevelup/stylelint-config"]
}
Now you can run stylelint by adding the following scripts to your package.json
. See the stylelint CLI docs for more details.
"scripts": {
"lint:css": "stylelint --cache --ignore-path .gitignore '**/*.?(s)css'",
"format:css": "yarn lint:css --fix"
}
Lint it:
yarn lint:css
Format it:
yarn format:css