Shareable stylelint config for CSS and SCSS, following Wagtail’s code style.
Our default export contains all of our Stylelint rules, along with specific plugins for SCSS syntax.
- Run
npm install stylelint @wagtail/stylelint-config-wagtail --save-dev - Add
"extends": "@wagtail/stylelint-config-wagtail"to your.stylelintrc
- Required Node
- We recommend using nvm
- Clone the project on to your computer
- Run
nvm installto ensure you have the correct Node version - Run
npm installto install project dependencies - Ensure your editor is set up to use editorconfig, Prettier, Eslint and Stylelint
- Run
nvm useto set Node to the correct version - Run tests via
npm run test - Run linting via
npm run lint - Run updates to Readme (if rules have changed) via
npm run write-rules - Run preflight checks before committing final code via
npm run preflight - Note: When working with the rule set, only modify the
index.jsfile, not the.eslintrcfile as it is for local linting only