Skip to content

Commit 2f59730

Browse files
committed
Add pre-commit config with file checks and ruff hooks
Restore pre-commit configuration adapted for the Python stack: keep generic file checks (large files, case conflict, merge conflict, yaml, trailing whitespace, end-of-file-fixer) and add ruff for linting and formatting in place of the old prettier/Astro hooks.
1 parent 219ef3c commit 2f59730

1 file changed

Lines changed: 20 additions & 0 deletions

File tree

.pre-commit-config.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v6.0.0
4+
hooks:
5+
- id: check-added-large-files
6+
args: ["--maxkb", "5000"]
7+
- id: check-case-conflict
8+
- id: check-merge-conflict
9+
- id: check-yaml
10+
- id: end-of-file-fixer
11+
exclude_types: ["svg"]
12+
- id: trailing-whitespace
13+
exclude_types: ["svg"]
14+
15+
- repo: https://github.com/astral-sh/ruff-pre-commit
16+
rev: v0.11.12
17+
hooks:
18+
- id: ruff
19+
args: ["--fix"]
20+
- id: ruff-format

0 commit comments

Comments
 (0)