@koshikishi/stylelint-config
v5.0.2
Published
Stylelint shareable config
Downloads
50
Maintainers
Readme
@koshikishi/stylelint-config
The Stylelint shareable config designed for my personal projects.
Use it as is or as a foundation for your own configuration file.
Prerequisites
This package requires:
- Node.js >= 24
- Stylelint >= 17
Installation
Install the package and stylelint in your project:
npm i -D stylelint @koshikishi/stylelint-configExtends and plugins
This config:
- extends the stylelint-config-standard-scss shared config
- bundles the @stylistic/stylelint-plugin to replace removed stylistic rules
These are direct dependencies that will be installed automatically.
Usage
Set your stylelint config to:
export default {
extends: '@koshikishi/stylelint-config',
};Extending the config
Add a rules key to your config, then add your overrides and additions there.
For example, to add the function-no-unknown rule and turn off the selector-class-pattern rule:
export default {
extends: '@koshikishi/stylelint-config',
rules: {
'function-no-unknown': true,
'selector-class-pattern': null,
},
};You can also override the stylistic rules from @stylistic/stylelint-plugin and SCSS-specific rules:
export default {
extends: '@koshikishi/stylelint-config',
rules: {
'@stylistic/indentation': 4,
'scss/dimension-no-non-numeric-values': null,
},
};Integration with VS Code
- Install the Stylelint extension for VS Code.
- Install
stylelintand this config in your project following the Installation section. - Add a Stylelint configuration file (
stylelint.config.js) and extend it with this shareable config following the Usage section.
