@wakamsha/stylelint-config
v2.0.1
Published
wakamsha's Stylelint rules as an extensible shared config.
Downloads
1,042
Maintainers
Readme
stylelint-config
wakamsha's Stylelint rules as an extensible shared config.
Usage
1. Install dependencies (and peer dependencies)
npm install --save-dev @wakamsha/stylelint-config stylelint
2. Configure Stylelint
Within your Stylelint config file (stylelint.config.js
):
export default {
extends: ['@wakamsha/stylelint-config/essentials'],
};
If you need CSS-in-JS Support:
export default {
- extends: ['@wakamsha/stylelint-config/essentials'],
+ extends: ['@wakamsha/stylelint-config/essentials', '@wakamsha/stylelint-config/css-in-js'],
};
Must be added after essentials
.
We also provide various other rule sets that you can configure to suit your project.
If the value of a rule does not suit you, specify that rule in the "rules" section with the value you want:
export default {
extends: ['@wakamsha/stylelint-config/essentials'],
+ rules: {
+ value-keyword-case': null,
+ },
};
| Rule set | Summary | Dependencies |
| -----------: | :------------------------------------------------------- | :---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| essentials
| Contains recommended, standard, and recess-order configs | recommended
standard
recess-order
|
| css-in-js
| Contains CSS-in-JS config | @stylelint/postcss-css-in-js
postcss
postcss-syntax
|
Migrate from an existing configuration
@wakamsha/stylelint-config contains various plugins related to different rule sets. Therefore, users don't need to install them separately. If you have installed them in your existing configuration, we recommend uninstalling them.
npm uninstall stylelint-config-recommended \
stylelint-config-standard \
stylelint-config-recess-order \
@stylelint/postcss-css-in-js
Versioning
- Increment major version: Changed error rules.
- Increment minor version: Changed warn rules.
- Increment patch version: Not changed error and warn rules.
License
Open source licensed as MIT.