Add pre-commit hooks and blame-ignore for the lint/format commit
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
# Mass lint/format commits that add noise to git blame.
|
||||
# Enable locally with: git config blame.ignoreRevsFile .git-blame-ignore-revs
|
||||
38f3cce # Apply linters and formatters
|
||||
@@ -20,3 +20,5 @@ package-lock.json
|
||||
.*
|
||||
!.gitignore
|
||||
!.gitea/
|
||||
!.git-blame-ignore-revs
|
||||
!.pre-commit-config.yaml
|
||||
|
||||
@@ -0,0 +1,19 @@
|
||||
pre-commit:
|
||||
parallel: true
|
||||
commands:
|
||||
ruff-check:
|
||||
glob: "*.py"
|
||||
run: .venv/bin/ruff check --fix {staged_files}
|
||||
stage_fixed: true
|
||||
ruff-format:
|
||||
glob: "*.py"
|
||||
run: .venv/bin/ruff format {staged_files}
|
||||
stage_fixed: true
|
||||
oxlint:
|
||||
glob: "frontend/src/**"
|
||||
run: npm --prefix frontend run lint
|
||||
stage_fixed: true
|
||||
oxfmt:
|
||||
glob: "frontend/src/**"
|
||||
run: npm --prefix frontend run format
|
||||
stage_fixed: true
|
||||
@@ -63,6 +63,7 @@ gui = [
|
||||
[dependency-groups]
|
||||
dev = [
|
||||
"httpx>=0.28.1",
|
||||
"lefthook>=2.1.14",
|
||||
"ruff>=0.15.14",
|
||||
"setuptools-scm>=8",
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user