In The Pocket's default configuration for Stylelint.
The current configuration is a hard copy of Bootstrap's latest Stylelint configuration. We didn't make any changes to it and like to keep it that way to avoid any discussions and keep this maintainable. Whenever Bootstrap decides to make changes, we need to make changes, that's the idea.
PR with more info.
Extends stylelint-config-standard and stylelint-config-recommended-scss
Plugins used: stylelint-order
Install the following packages in your project:
npm install stylelint-config-itp stylelint husky lint-staged --save-dev
Add .stylelintrc to the root of your project:
{
"extends": "stylelint-config-itp"
}
Add .stylelintignore (if you need one) to the root of your project:
**/*.min.css
**/dist/
**/vendor/
/_gh_pages/
Update your package.json:
{
"scripts": {
+ "precommit": "lint-staged"
},
+ "lint-staged": {
+ "*.{css,scss}": ["stylelint --fix", "git add"]
+ }
}