-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
34 lines (31 loc) · 1.11 KB
/
.pre-commit-config.yaml
File metadata and controls
34 lines (31 loc) · 1.11 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: check-toml
files: ^pyproject\.toml$
- id: check-yaml
files: ^(\.pre-commit-config\.yaml|\.github/workflows/.*\.ya?ml)$
- repo: local
hooks:
- id: black
name: black
entry: uv run --extra dev black
language: system
types_or: [python, pyi]
require_serial: true
- id: extension-prettier
name: extension prettier
entry: npm --prefix extension exec prettier -- --write --ignore-unknown
language: system
files: ^extension/(?!package-lock\.json$).*\.(ts|tsx|js|mjs|cjs|json|html|css|md)$
- id: extension-eslint
name: extension eslint
entry: >-
bash -lc 'if [ ! -f extension/node_modules/@eslint/js/package.json ]; then
npm --prefix extension ci --no-fund --no-audit; fi;
npm --prefix extension exec eslint -- --config extension/eslint.config.mjs
--max-warnings=0 "$@"' --
language: system
files: ^extension/.*\.ts$
require_serial: true