stylelint-config-minoris v7.0.4
stylelint-config-minoris
Minoris's stylelint rules and config
Installation
Install stylelint and stylelint-config-minoris:
With Yarn
yarn add --dev stylelint stylelint-config-minorisWith npm
npm install stylelint stylelint-config-minoris --save-devUsage
Minoris’s stylelint rules come bundled in stylelint-config-minoris. To enable these rules, add a stylelint property in your package.json. See the stylelint configuration docs for more details.
"stylelint": {
"extends": ["stylelint-config-minoris"]
}Now you can run stylelint by adding the following linting script to your package.json. See the stylelint CLI docs for more details.
"scripts": {
"stylelint": "stylelint 'src/**/*.scss'"
}Run it:
With Yarn
yarn run stylelintWith npm
npm run stylelintPrettier
This config also includes a prettier config which can be extended to format .scss.
Using the stylelint-prettier plugin, prettier changes are exposed as stylelint rule violations.
Install prettier:
$ yarn add --dev prettierExtend the config in your package.json:
"stylelint": {
"extends": [
"stylelint-config-minoris/prettier"
]
}Add a prettier config in package.json:
"prettier": {
"singleQuote": true,
"trailingComma": "es5",
"bracketSpacing": false
}Prettier fixes shall be reported when you run stylelint **/*.css and shall be autofixed when you run stylelint --fix **/*.scss.
7 years ago