@justia/stylelint-config
Justia's base Scss Stylelint configuration
This stylelint configuration uses the basic declaration order of Idiomatic CSS, applies the Sass Guidelines to a more consistent Scss and uses prettier to format the code.
Make sure you upgrade to at least Node.js
12.22.0
when using this packages because of prettier and other plugins used internally.
Install
Install the correct versions of the peer dependencies, which are listed by the command:
npm info "@justia/stylelint-config@latest" peerDependencies
If using npm 5+, use this shortcut
npx install-peerdeps --dev @justia/stylelint-config
If using npm < 5, Linux/OSX users can run
(
export PKG=@justia/stylelint-config;
npm info "$PKG@latest" peerDependencies --json | command sed 's/[\{\},]//g ; s/: /@/g' | xargs npm install --save-dev "$PKG@latest"
)
Which produces and runs a command like:
npm install --save-dev @justia/stylelint-config stylelint@^#.#.# prettier@^#.#.#
Usage
Set your stylelint configuration to:
{
"extends": ["@justia/stylelint-config"]
}
You can easily extend the config to your needs.
@justia/stylelint-config/rscss
This entry point enables the validation of the code against RSCSS conventions.
{
"extends": ["@justia/stylelint-config/rscss"]
}