stylelint-config-cnp
v1.0.1
Published
Sharable Styleling configuration
Downloads
6
Maintainers
Readme
styleling-config-cnp
Sharable styleling configuration for create-npm-package
Requirement
- Configuration for VSCode
.vscode/settings.json
{
"[css]": {
"editor.defaultFormatter": "stylelint.vscode-stylelint"
},
"[less]": {
"editor.defaultFormatter": "stylelint.vscode-stylelint"
},
"[scss]": {
"editor.defaultFormatter": "stylelint.vscode-stylelint"
},
"stylelint.validate": ["css", "less", "postcss", "scss"],
"editor.codeActionsOnSave": {
"source.fixAll.stylelint": true
}
}
Install and Configuration
- Install
npm install stylelint-config-cnp postcss@^8.4.25 -D
- Stylelint Config
.styleintrc.js
module.exports = {
root: true,
extends: ['stylelint-config-cnp'],
};
- Use with SCSS
.styleintrc.js
module.exports = {
root: true,
extends: ['stylelint-config-cnp', 'stylelint-config-cnp/scss'],
};
- Use with less
.styleintrc.js
module.exports = {
root: true,
extends: ['stylelint-config-cnp', 'stylelint-config-cnp/less'],
};