635 B
635 B
SASS linting & formatting
This project uses Stylelint (for SCSS linting) and Prettier (for formatting).
Install dev dependencies:
npm install -D stylelint stylelint-config-standard-scss stylelint-scss stylelint-order postcss-scss prettier husky lint-staged
Available scripts:
npm run lint:css # run stylelint
npm run format:css # run prettier on styles
npm run prepare # sets up husky hooks (run after npm install)
Pre-commit hook
We use lint-staged to run formatting/lint fixes on staged SCSS files. The hook runs prettier --write followed by stylelint --fix.