A stylelint config created by personal preferences.
- Stylesheet in *.{vue,html,htm,svg,md}
- SCSS syntax / Less syntax
- CSS Modules exceptions - :global / :local in *.module.{css,scss,less}, *.vue
- Interoperable CSS (ICSS) - :export in *.module.{css,scss,less}, *.vue
-
Tailwind CSS at rules when
tailwindcss
installed - Mini Program Stylesheet limitation when needed
npm install stylelint @nice-move/stylelint-config --save-dev
Add to package.json
// example: package.json
{
"stylelint": {
"extends": "@nice-move/stylelint-config"
}
}
Then run
stylelint --fix "**/*.{css,less,scss,vue,html,htm,md}"