@goliafrs/stylelint-config
v1.0.0
Published
Stylelint configuration (SCSS + order).
Maintainers
Readme
@goliafrs/stylelint-config
Installation
npm install --save-dev stylelint @goliafrs/stylelint-configpnpm add --save-dev stylelint @goliafrs/stylelint-configTo work with this package, you need to install stylelint at least as a dev dependency.
Available Configs
| Name | Purpose |
| --------- | --------------------------------------------------------- |
| default | SCSS standard config + property order via stylelint-order |
Usage
Create a stylelint.config.js file in the root of your project and add the following:
SCSS projects
// stylelint.config.js
export default {
extends: [ '@goliafrs/stylelint-config' ],
}With overrides
// stylelint.config.js
export default {
extends: [ '@goliafrs/stylelint-config' ],
rules: {
'color-hex-length': 'short'
}
}Force SCSS syntax (optional)
// stylelint.config.js
export default {
extends: [ '@goliafrs/stylelint-config' ],
customSyntax: 'postcss-scss'
}sideEffects
"sideEffects": false in package.json enables better tree-shaking.
Engines
Supported: Node >= 18.18.0, Stylelint >= 16.
Usable commands
You can use the following commands to lint your styles:
{
"scripts": {
"lint:css": "stylelint \"src/**/*.{css,scss}\"",
"lint:css:fix": "stylelint \"src/**/*.{css,scss}\" --fix"
}
}npm run lint:css
npm run lint:css:fixlint:css: Lint your CSS/SCSSlint:css:fix: Lint and fix your CSS/SCSS
