@kiforks/stylelint-config v1.0.2
@kiforks/stylelint-config
Created by Kifor Kostiantyn
This is the standard configuration file for stylelint from Kifor Kostiantyn.
Use it as is or as a basis for your own configuration.
Usage
You first need to install your published configuration, for example:
npm install --save-dev stylelint @kiforks/stylelint-configyarn add --dev stylelint @kiforks/stylelint-configpnpm add --save-dev stylelint @kiforks/stylelint-configbun add --dev stylelint @kiforks/stylelint-configIn the root of the project, create a .stylelintrc file and in it add @kiforks/stylelint-config to the extends field.
.stylelintrc
{
"extends": "@kiforks/stylelint-config"
}If you set @kiforks/stylelint-config globally with the -g flag, then you need to use the absolute path @kiforks/stylelint-config in the configuration file:
.stylelintrc
{
"extends": "/absolute/path/to/@kiforks/stylelint-config"
}Configure extension
You can override existing rules or add new ones.
To do this, add a rules field to the config with the desired rule overrides.
.stylelintrc
{
"extends": "@kiforks/stylelint-config",
"rules": {
"property-no-unknown": [
true,
{
"ignoreProperties": [
"composes"
]
}
],
"unit-whitelist": ["em", "rem", "s", "px"]
}
}In the same rules field, you can also override the no longer supported Stylelint styleguide rules from the stylelint-codeguide plugin by adding the prefix codeguide/ before the rule name.
.stylelintrc
{
"extends": "@kiforks/stylelint-config",
"rules": {
"property-no-unknown": [
true,
{
"ignoreProperties": [
"composes"
]
}
],
"unit-whitelist": ["em", "rem", "s", "px"],
"codeguide/indentation": "tab",
"codeguide/number-leading-zero": null
}
}Usage in VSCode
- Install stylelint and config
- Open VSCode
- Install the stylelint plugin
- Use it
