This Stylelint config extends the standard config with a few customizations to support our CSS infrastructure, which uses postcss and CSS modules for JS interoperability.
To use the config, install stylelint and this config as development dependencies:
$ npm i -D stylelint stylelint-config-kensho
Add a .stylelintrc.yml
(or equivalent) which extends the config:
extends: stylelint-config-kensho
Add an npm script in package.json
to run the linter on all CSS files:
{
"scripts": {
"lint:css": "stylelint 'src/**/*.css'"
}
}