Two24 Studios shareable config for stylelint.
An opinionated stylelint configuration for CSS modules and custom properties. Formatting is delegated to Prettier.
Extends these shared configs:
stylelint-config-standard— convention and error-prevention rules (which itself extendsstylelint-config-recommended)stylelint-config-recess-order— property ordering based on RECESS
Plus these opinionated overrides:
| Rule | Value | Description |
|---|---|---|
color-function-notation |
"legacy" |
Use rgb(0, 0, 0) with commas |
color-named |
"never" |
Disallow named colors like red |
declaration-no-important |
true |
Disallow !important |
font-weight-notation |
"numeric" |
Use 400/700 instead of normal/bold |
npm install --save-dev stylelint stylelint-order stylelint-config-two24studiosAdd to your stylelint config (e.g. .stylelintrc.json):
{
"extends": "stylelint-config-two24studios"
}This package includes a .prettierrc file that complements the stylelint config. To use it in your project, reference it in your package.json:
{
"prettier": "stylelint-config-two24studios/.prettierrc"
}Or copy it into your project root and customize as needed.
- Node.js >= 20.19.0
- stylelint >= 17.0.0
- stylelint-order >= 8.0.0