DEV: Lint SCSS with prettier in pre-commit (#15033)

We are linting SCSS on the GitHub actions CI but not
on pre-commit, which can lead to lint failures in CI.
Better to warn developers about this locally like
our other lints.
This commit is contained in:
Martin Brennan 2021-11-22 11:30:12 +10:00 committed by GitHub
parent d46e450733
commit df6003aef5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -8,6 +8,10 @@ pre-commit:
glob: "*.js"
include: "app/assets/javascripts|test/javascripts"
run: yarn pprettier --list-different {staged_files}
prettier-scss:
glob: "*.scss"
include: "app/assets/stylesheets"
run: yarn pprettier --list-different {staged_files}
eslint:
glob: "*.js"
include: "app/assets/javascripts|test/javascripts"
@ -51,6 +55,10 @@ lints:
glob: "*.js"
include: "app/assets/javascripts|test/javascripts"
run: yarn pprettier --list-different {all_files}
prettier-scss:
glob: "*.scss"
include: "app/assets/stylesheets"
run: yarn pprettier --list-different {all_files}
eslint-assets-js:
run: yarn eslint app/assets/javascripts
eslint-test-js: