stylelint-config-varp
v1.7.2
Published
Stylelint config by Varp
Downloads
17
Readme
stylelint-config-varp
Set up
- Install with peer dependencies:
npm install -D stylelint-config-varp
- Create
.stylelintrc.js
with content:
module.exports = {
extends: ["stylelint-config-varp"],
rules: {
/* Additional rules */
}
};
- Add
.stylelintignore
with content:
.*/
!*.scss
- Add
.vscode/settings.json
with content:
{
"[scss]": {
"editor.codeActionsOnSave": {
"source.fixAll.stylelint": true
}
},
"stylelint.validate": [
"scss"
],
"stylelint.snippet": [
"scss"
]
}
- Add new scripts to package.json:
"scripts": {
"stylelint": "stylelint \"**/*.scss\"",
"stylelint:fix": "stylelint \"**/*.scss\" --fix"
}
- Call
stylelint
witheslint
:
"scripts": {
"lint": "eslint . && stylelint \"**/*.scss\"",
"lint:fix": "eslint . --fix && stylelint \"**/*.scss\" --fix"
}
Cases
Override folder
module.exports = {
extends: "../.stylelintrc.js",
rules: {
/* Overrided rules */
}
};