Checkpoint
This commit is contained in:
22
README-LINTING.md
Normal file
22
README-LINTING.md
Normal file
@@ -0,0 +1,22 @@
|
||||
SASS linting & formatting
|
||||
=========================
|
||||
|
||||
This project uses Stylelint (for SCSS linting) and Prettier (for formatting).
|
||||
|
||||
Install dev dependencies:
|
||||
|
||||
```bash
|
||||
npm install -D stylelint stylelint-config-standard-scss stylelint-scss stylelint-order postcss-scss prettier husky lint-staged
|
||||
```
|
||||
|
||||
Available scripts:
|
||||
|
||||
```bash
|
||||
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`.
|
||||
Reference in New Issue
Block a user