stylelint-config-good-scss
stylelint-config-good-scss
features
- Extends
stylelint-config-recommended.- It turns on all the possible errors rules within stylelint.
- Extends
stylelint-config-recess-order.- A Stylelint config that sorts CSS properties the way Recess did and Bootstrap did/does.
- @mdo on CSS Property Order
- SCSS syntax support.
installation
npm install stylelint stylelint-config-good-scss --save-dev
yarn add --dev stylelint stylelint-config-good-scss
Usage
You create stylelint.config.js in the project root. And a nice idea to write the task in package.json.
basic
stylelint.config.js
module.exports = {
extends: ['stylelint-config-good-scss'],
rules: {
// your rule
}
}
package.json
{
"scripts": {
"lintcss": "stylelint --fix ./**/*.vue ./**/*.scss"
}
}
with nuxt and prettier
yarn add --dev stylelint stylelint-config-good-scss prettier-stylelint stylelint-webpack-plugin
stylelint.config.js
module.exports = {
extends: [
'stylelint-config-good-scss',
'./node_modules/prettier-stylelint/config.js'
]
}
nuxt.config.js
module.exports = {
build: {
extend(config, ctx) {
if (ctx.isDev && ctx.isClient) {
config.plugins.push(
new StylelintPlugin({
files: ['**/*.vue']
})
)
}
}
}
}
Related Packages
@maz-ui/stylelint-config
Stylelint configuration for CSS, SCSS, Vue and Tailwind CSS projects
3,064
564
Version History
| Version | Released | License |
|---|---|---|
| 3.1.0 | MIT | |
| 3.0.1 | MIT | |
| 2.0.0 | MIT | |
| 1.2.0 | MIT | |
| 1.1.7 | MIT | |
| 1.1.6 | MIT | |
| 1.1.5 | MIT | |
| 1.1.4 | MIT | |
| 1.1.3 | MIT | |
| 1.1.2 | MIT | |
| 1.1.1 | MIT | |
| 1.1.0 | MIT | |
| 1.0.1 | MIT | |
| 1.0.0 | MIT |
