-
-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
49 lines (49 loc) · 1.8 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
49 lines (49 loc) · 1.8 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
exclude: '^.*bootstrap.bundle.js$|^tests/fixtures/|^PART$'
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-yaml
- id: end-of-file-fixer
- id: trailing-whitespace
- id: check-case-conflict
- id: check-json
- id: check-merge-conflict
- id: no-commit-to-branch
- id: requirements-txt-fixer
- repo: local
hooks:
- id: eslint
name: eslint
entry: npm run lint:eslint --
language: system
pass_filenames: false
files: ^static/local-js/.*\.js$
- id: spellcheck
name: spellcheck (pyspelling)
# Mirrors the .github/workflows/validate-pull.yml "Run Spellcheck
# on Changed Files" job so that the same class of failure that
# tripped PR #1555 (missing technical terms in .github/.wordlist.txt)
# can be caught locally before push. Uses `language: python` so
# pre-commit auto-installs pyspelling into an isolated venv --
# devs don't need to `pip install` anything. Aspell itself is a
# system binary and must be installed separately (apt/brew/dnf);
# the hook exits with a clear error if it's missing.
entry: scripts/run_spellcheck.py
language: python
additional_dependencies: ['pyspelling==2.12.1']
# Only trigger on .md changes. pyspelling reads .spellcheck.yml
# for its own file list (currently just top-level *.md), so we
# pass no filenames and let the config do the scoping.
files: '\.md$'
pass_filenames: false
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.15.18
hooks:
- id: ruff
args: [ --fix ]
- repo: https://github.com/psf/black
rev: 26.5.1
hooks:
- id: black
args: [ -l, '180' ]