Scope pre-commit lint and format to staged files
This commit is contained in:
+8
-6
@@ -1,9 +1,11 @@
|
|||||||
pre-commit:
|
pre-commit:
|
||||||
parallel: true
|
parallel: true
|
||||||
commands:
|
jobs:
|
||||||
format:
|
- name: format
|
||||||
run: npm run format:check
|
glob: "*.{css,js,json,jsonc,jsx,md,ts,tsx,yaml,yml}"
|
||||||
lint:
|
run: npm run format:check:files -- {staged_files}
|
||||||
run: npm run lint
|
- name: lint
|
||||||
typecheck:
|
glob: "*.{js,jsx,ts,tsx}"
|
||||||
|
run: npm run lint -- {staged_files}
|
||||||
|
- name: typecheck
|
||||||
run: npm run typecheck
|
run: npm run typecheck
|
||||||
|
|||||||
@@ -48,6 +48,7 @@
|
|||||||
"format": "oxfmt .",
|
"format": "oxfmt .",
|
||||||
"format:files": "oxfmt",
|
"format:files": "oxfmt",
|
||||||
"format:check": "oxfmt --check .",
|
"format:check": "oxfmt --check .",
|
||||||
|
"format:check:files": "oxfmt --check",
|
||||||
"lint": "oxlint",
|
"lint": "oxlint",
|
||||||
"lint:fix": "oxlint --fix",
|
"lint:fix": "oxlint --fix",
|
||||||
"knip": "knip",
|
"knip": "knip",
|
||||||
|
|||||||
Reference in New Issue
Block a user