mirror of
https://github.com/getpaseo/paseo.git
synced 2026-07-29 12:01:31 +00:00
Scope pre-commit lint and format to staged files
This commit is contained in:
14
lefthook.yml
14
lefthook.yml
@@ -1,9 +1,11 @@
|
||||
pre-commit:
|
||||
parallel: true
|
||||
commands:
|
||||
format:
|
||||
run: npm run format:check
|
||||
lint:
|
||||
run: npm run lint
|
||||
typecheck:
|
||||
jobs:
|
||||
- name: format
|
||||
glob: "*.{css,js,json,jsonc,jsx,md,ts,tsx,yaml,yml}"
|
||||
run: npm run format:check:files -- {staged_files}
|
||||
- name: lint
|
||||
glob: "*.{js,jsx,ts,tsx}"
|
||||
run: npm run lint -- {staged_files}
|
||||
- name: typecheck
|
||||
run: npm run typecheck
|
||||
|
||||
@@ -48,6 +48,7 @@
|
||||
"format": "oxfmt .",
|
||||
"format:files": "oxfmt",
|
||||
"format:check": "oxfmt --check .",
|
||||
"format:check:files": "oxfmt --check",
|
||||
"lint": "oxlint",
|
||||
"lint:fix": "oxlint --fix",
|
||||
"knip": "knip",
|
||||
|
||||
Reference in New Issue
Block a user