stylelint-config-zzjtnb
v0.0.6
Published
Stylelint configuration aimed to have balanced aspects.
Downloads
9
Maintainers
Readme
stylelint-config-zzjtnb
- Auto fix for formatting (aimed to be used standalone without Prettier)
- Lint for css,scss,vue,html,xml,svelte,astro,php,markdown
Usage
Install
pnpm add -D stylelint stylelint-config-zzjtnb
stylelint.config.js
For all:
module.exports = {
extends: [
'stylelint-config-zzjtnb',
],
rules: {},
}
Add script for package.json
For example:
{
"scripts": {
"lint:stylelint": "stylelint \"**/*.{css,scss,vue,html,xml,svelte,astro,php,md}\"",
"lint:stylelint-fix": "stylelint \"**/*.{css,scss,vue,html,xml,svelte,astro,php,md}\" --fix"
}
}
Config VS Code auto fix
Install VS Code Stylelint extension and create .vscode/settings.json
{
"prettier.enable": false,
"editor.formatOnSave": false,
"editor.codeActionsOnSave": {
"source.fixAll.stylelint": "explicit"
},
"stylelint.validate": [
"css",
"scss",
"vue",
"html",
"xml",
"svelte",
"astro",
"php",
"markdown"
]
}