This is an my stylelint config.
It uses Standard's as a base, has Prettier and SCSS baked in, and overrides some rules I've seen ourselves having to change often.
-
Install the following dev-dependencies:
npm install --save-dev @ofk/stylelint-config-recommend stylelint prettier -
Extend the
@ofk/stylelint-config-recommendconfig in your.stylelintrc(orstylelintkey in yourpackage.json):"stylelint": { "extends": "@ofk/stylelint-config-recommend" }
-
Run
eslinton your project as part of yourlintandformatscripts:"scripts": { "lint": "stylelint \"**/*.{css,scss}\"", "format": "npm run lint -- --fix", "pretest": "npm run lint", "test": "test command" }