@wakamsha/stylelint-config
v3.1.0
Published
wakamsha's Stylelint rules as an extensible shared config.
Downloads
1,806
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 standard, and recess-order configs | standard
recess-order
|
| css-modules
| Contains CSS Modules config | - |
| css-in-js
| Contains CSS-in-JS config | postcss
postcss-styled-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-standard \
stylelint-config-recess-order \
postcss-styled-syntax
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.