reusable stylelint config for stylelint 15
npm install --save-dev stylelint@15 @merkle-open/stylelint-config
stylelint.config.js
module.exports = require('@merkle-open/stylelint-config');
.stylelintignore
node_modules/
src/shared/base/reset/css/yui/reset.css
package.json
{
"scripts": {
"lint:css": "stylelint src/**/*.*ss"
}
}
npm install --save-dev husky lint-staged
package.json
{
"scripts": {
"lint:css": "stylelint src/**/*.*ss"
},
"husky": {
"hooks": {
"pre-commit": "lint-staged"
}
},
"lint-staged": {
"src/**/*.*ss": ["stylelint"]
}
}