-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy path.pre-commit-config.yaml
53 lines (52 loc) · 1.54 KB
/
.pre-commit-config.yaml
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
ci:
skip: [eslint, pyright]
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: requirements-txt-fixer
- id: trailing-whitespace
- repo: https://github.com/astral-sh/ruff-pre-commit
# Ruff version.
rev: v0.6.7
hooks:
# Run the linter.
- id: ruff
args: [--fix]
# Run the formatter.
- id: ruff-format
- repo: local
hooks:
- id: pyright
name: "Pyright"
types: [python]
entry: ./bin/run-pyright.sh
language: script
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v9.22.0
hooks:
- id: eslint
files: \.[jt]sx?$ # *.js, *.jsx, *.ts and *.tsx
types: [file]
args: [--max-warnings=0, --config=frontend/eslint.config.mjs, --no-warn-ignored]
additional_dependencies:
- "@tanstack/eslint-plugin-query@5.59.2"
- eslint@9.22.0
- eslint-plugin-import@2.31.0
- eslint-plugin-react-hooks@5.2.0
- eslint-plugin-react-refresh@0.4.19
- repo: https://github.com/pre-commit/mirrors-prettier
rev: "v4.0.0-alpha.8"
hooks:
- id: prettier
files: \.([jt]sx?|json)$ # *.js, *.jsx, *.ts, *.tsx, *.json
args: [
--print-width,
"120",
# Without this, prettier will create a `node_modules` folder in the repository root
"--cache-location",
"frontend/node_modules/.cache/prettier",
]
exclude: ^tools/