This package provides custom Stylelint configurations for linting CSS, SCSS, and other style sheets.
The peer dependencies might need to be installed separately. To install the peer dependencies run the following command:
npm i -D postcss stylelint prettier stylelint-prettier stylelint-config-standard-scss
To install the package, run the following command:
npm i -D @ebarooni/stylelint-config
To use the configuration in a project, extend it in the .stylelintrc.json
file:
{
"extends": ["@ebarooni/stylelint-config"]
}
The following helper scripts can be added to package.json
:
{
"scripts": {
"lint:style": "npx stylelint \"**/*.(css|scss)\"",
"fmt:style": "npx stylelint \"**/*.(css|scss)\" --fix"
}
}
-
ignoreFiles
: A pattern to ignore the files in a specific directory. -
overrides
: In case different configurations are wanted for different directories. -
overrides.files
: The directories that should apply the extended configuration.
{
"ignoreFiles": ["example/(ios|android)/**/*.(css|scss)"],
"overrides": [
{
"files": ["example/**/*.(css|scss)"],
"extends": ["@ebarooni/stylelint-config"]
}
]
}