2023-02-26 01:12:11 +00:00
|
|
|
pre-commit:
|
2023-03-01 03:41:20 +00:00
|
|
|
parallel: true
|
2023-02-26 01:12:11 +00:00
|
|
|
commands:
|
|
|
|
web-linter:
|
|
|
|
run: |
|
2023-06-26 23:30:22 +00:00
|
|
|
npx -y eslint --fix {staged_files} \
|
2023-02-26 01:12:11 +00:00
|
|
|
&& git add {staged_files}
|
|
|
|
root: web/
|
|
|
|
glob: '*.{ts,tsx,js,jsx}'
|
|
|
|
cpp-linter:
|
|
|
|
run: |
|
|
|
|
clang-format -i {staged_files} \
|
|
|
|
&& git add {staged_files}
|
2024-04-28 15:20:40 +00:00
|
|
|
glob: '*.{c,cc,cxx,h,hh,cpp}'
|
2023-02-26 01:12:11 +00:00
|
|
|
misc-linter:
|
|
|
|
run: |
|
2023-06-26 23:30:22 +00:00
|
|
|
npx -y prettier --write {staged_files} \
|
2023-02-26 01:12:11 +00:00
|
|
|
&& git add {staged_files}
|
|
|
|
glob: '*.{md,json,yml,yaml}'
|
2023-06-24 16:51:09 +00:00
|
|
|
nix-linter:
|
|
|
|
run: |
|
|
|
|
alejandra -q {staged_files} \
|
|
|
|
&& git add {staged_files}
|
|
|
|
glob: '*.{nix}'
|