forked from CDCgov/prime-simplereport
-
Notifications
You must be signed in to change notification settings - Fork 0
/
lefthook.yml
18 lines (18 loc) · 1.03 KB
/
lefthook.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
pre-commit:
parallel: true
commands:
spotless:
glob: "*.java"
run: docker compose run --rm backend sh -c "gradle spotlessApply" && git add {staged_files}
prettier:
root: "frontend/"
glob: "*.{js,ts,jsx,tsx}"
run: docker compose -f ../docker-compose.yml run --rm frontend sh -c "/app/frontend/node_modules/.bin/prettier --config /app/frontend/package.json --write {staged_files}" && git add {staged_files}
eslint:
root: "frontend/"
glob: "*.{js,ts,jsx,tsx}"
run: docker compose -f ../docker-compose.yml run --rm frontend sh -c "/app/frontend/node_modules/.bin/eslint --config /app/frontend/package.json --resolve-plugins-relative-to /app/frontend --fix {staged_files}" && git add {staged_files}
stylelint:
root: "frontend/"
glob: "*.scss"
run: docker compose -f ../docker-compose.yml run --rm frontend sh -c "/app/frontend/node_modules/.bin/stylelint --config /app/frontend/.stylelintrc.json --config-basedir /app/frontend --fix {staged_files}" && git add {staged_files}