Broxus Stylelint config
Recommended Stylelint configuration to create formatted code with best practices.
Installation
Install the package as development dependency, alongside stylelint
package
npm i @broxus/stylelint-config stylelint -D
yarn add @broxus/stylelint-config stylelint -D
pnpm add @broxus/stylelint-config stylelint -D
bun add @broxus/stylelint-config stylelint -D
Usage
You can add the following to your .stylelintrc.js
or stylelint.config.js
file:
module.exports = {
extends: [
'@broxus/stylelint-config',
],
rules: {
},
};
or create the .stylelintrc
file in the root directory of your project and put code below to the file:
{
"extends": [
...
"@broxus/stylelint-config",
...
],
"rules": {
}
}
or add code below to the package.json
:
{
...
"stylelint": {
"extends": ["@broxus/stylelint-config"],
"rules": {}
},
...
}
Choose which method you prefer, but do not use them all at the same time.
Disable properties order
If you want to disable properties order, you can add the following rule to your .stylelintrc
or package.json
:
{
"rules": {
"order/properties-order": null
}
}