-
Notifications
You must be signed in to change notification settings - Fork 64
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
107 lines (97 loc) · 3.28 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
107 lines (97 loc) · 3.28 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
100
101
102
103
104
105
106
107
default_stages: [pre-commit]
default_install_hook_types: [pre-commit, commit-msg]
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.16.0
hooks:
- id: ruff-check
args: [--fix]
- id: ruff-format
- repo: https://github.com/astral-sh/ty-pre-commit
rev: v0.0.63
hooks:
- id: ty
# --isolated: don't create/update uv.lock or the local .venv
args: [--isolated]
env:
# uv check treats tool.uv.managed=false as outside a project, so point ty
# at its dedicated config explicitly.
TY_CONFIG_FILE: ty.toml
# prek-only: override global UV_FROZEN=1, which would require a uv.lock.
UV_FROZEN: "0"
- 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
- id: check-added-large-files
args: [--maxkb=1000]
- id: destroyed-symlinks
- id: check-vcs-permalinks
- 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.3
hooks:
- id: codespell
stages: [pre-commit, commit-msg]
exclude_types: [csv, json, svg, bib]
exclude: ^pyproject\.toml$
args: [--check-filenames]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.49.1
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.4
hooks:
- id: check-jsonschema
name: check-jsonschema-models
files: ^models/.+/.+\.yml$
args: [--schemafile, tests/model-schema.yml]
- id: check-jsonschema
name: check-jsonschema-datasets
files: ^data/datasets\.yml$
args: [--schemafile, tests/dataset-schema.yml]
- id: check-jsonschema
name: check-jsonschema-modeling-tasks
files: ^matbench_discovery/modeling-tasks\.yml$
args: [--schemafile, tests/modeling-tasks-schema.yml]
- id: check-github-workflows
- repo: https://github.com/crate-ci/typos
rev: v1.48.0
hooks:
- id: typos
stages: [pre-commit, commit-msg]
args: [--force-exclude]