chore: switch eslint to lint changed files intead of whole project
This commit is contained in:
parent
cb655347be
commit
cdcccbfb4a
@ -3,11 +3,10 @@ repos:
|
||||
hooks:
|
||||
- id: eslint
|
||||
name: eslint
|
||||
entry: go run cmd/mage/main.go frontend:lint
|
||||
entry: scripts/lint.sh
|
||||
language: system
|
||||
files: \.[jt]sx?$ # *.js, *.jsx, *.ts and *.tsx
|
||||
types: [file]
|
||||
pass_filenames: false
|
||||
- hooks:
|
||||
- id: check-yaml
|
||||
- id: end-of-file-fixer
|
||||
|
2
scripts/lint.sh
Executable file
2
scripts/lint.sh
Executable file
@ -0,0 +1,2 @@
|
||||
#!/bin/bash
|
||||
yarn --cwd frontend eslint $(echo $1 | sed 's/frontend\///g')
|
Loading…
Reference in New Issue
Block a user