-
Notifications
You must be signed in to change notification settings - Fork 54
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
99 lines (89 loc) · 2.93 KB
/
.pre-commit-config.yaml
File metadata and controls
99 lines (89 loc) · 2.93 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
default_stages: [pre-commit]
default_install_hook_types: [pre-commit, commit-msg]
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.10
hooks:
- id: ruff-check
args: [--fix]
- id: ruff-format
- repo: local
hooks:
- id: ty
name: ty check
entry: ty check
language: python
types: [python]
additional_dependencies:
# TODO: remove numpy once np.array_split type fix in PR #30450 is released
[ty, numpy @ git+https://github.com/numpy/numpy]
args: [--output-format, concise, --ignore, unresolved-import]
- repo: https://github.com/janosh/format-ipy-cells
rev: v0.1.11
hooks:
- id: format-ipy-cells
- repo: builtin
hooks:
- id: check-case-conflict
- id: check-symlinks
- id: check-yaml
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
- repo: local
hooks:
- id: vp-fmt
name: Format (oxfmt)
entry: bash -c 'cd site && node_modules/.bin/vp fmt --write'
types_or: [ts, javascript, json, css, html, svelte]
language: system
pass_filenames: false
- id: vp-lint
name: Lint (oxlint)
entry: bash -c 'cd site && node_modules/.bin/vp lint --fix'
types_or: [ts, javascript, json, css, html, svelte]
language: system
pass_filenames: false
- id: svelte-check
name: Svelte type check
entry: bash -c 'cd site && node_modules/.bin/svelte-kit sync && node_modules/.bin/svelte-check-rs --threshold error'
language: system
types_or: [ts, svelte]
pass_filenames: false
- repo: https://github.com/codespell-project/codespell
rev: v2.4.2
hooks:
- id: codespell
stages: [pre-commit, commit-msg]
exclude_types: [csv, json, svg, bib]
exclude: ^(site/src/figs/.+|pyproject\.toml)$
args: [--toml=pyproject.toml, --check-filenames]
additional_dependencies: [tomli]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.48.0
hooks:
- id: markdownlint
# MD013: line too long
# MD033: no inline HTML
# MD041: first line in a file should be a top-level heading
# MD034: no bare urls
args: [--disable, MD013, MD033, MD034, MD041, "--"]
exclude: changelog\.md$
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.37.1
hooks:
- id: check-jsonschema
files: ^models/.+/.+\.yml$
args: [--schemafile, tests/model-schema.yml]
- id: check-jsonschema
files: ^data/datasets\.yml$
args: [--schemafile, tests/dataset-schema.yml]
- id: check-github-actions
- repo: https://github.com/crate-ci/typos
rev: v1.45.0
hooks:
- id: typos
types: [text]
exclude_types: [csv]
exclude: ^(site/src/figs/.+|.+element-counts.*\.json)$
args: []