-
Notifications
You must be signed in to change notification settings - Fork 5
/
.pre-commit-config.yaml
83 lines (74 loc) · 2.01 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
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
repos:
- repo: meta
hooks:
- id: check-hooks-apply
- id: check-useless-excludes
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.6.0
hooks:
- id: no-commit-to-branch
args: [--branch, main]
- id: check-toml
- id: check-yaml
exclude: swift_browser_ui_frontend/pnpm-lock.yaml
- id: check-ast
- id: check-docstring-first
- id: check-case-conflict
- id: check-merge-conflict
- id: end-of-file-fixer
- id: trailing-whitespace
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: v0.3.7
hooks:
- id: ruff
args: [--fix, --exit-non-zero-on-fix]
files: ^swift_browser_ui/
- repo: https://github.com/psf/black
rev: 24.4.0
hooks:
- id: black
args: [-l, "90"]
- repo: https://github.com/PyCQA/bandit
rev: 1.7.8
hooks:
- id: bandit
files: ^swift_browser_ui/
- repo: local
hooks:
- id: eslint
name: Lint frontend
entry: ./scripts/eslint.sh
args: [--prefix, swift_browser_ui_frontend, run, lint]
files: ^swift_browser_ui_frontend
language: system
pass_filenames: false
- id: mypy
name: mypy
entry: mypy
language: system
types: [python]
files: ^swift_browser_ui/
args: [--ignore-missing-imports, --no-namespace-packages]
require_serial: true
- id: sort
name: sort dictionaries
entry: ./scripts/sort.sh
language: script
files: ^.github/config/.*.txt
require_serial: true
pass_filenames: false
- id: pyspelling-docs
name: spellcheck markdown and documentation
entry: ./scripts/pyspelling.sh
language: script
args: [markdown]
types_or: [markdown, rst]
require_serial: true
- id: pyspelling-frontend
name: spellcheck frontend strings
entry: ./scripts/pyspelling.sh
language: script
args: [frontend]
types: [javascript]
files: swift_browser_ui_frontend/src/common/lang.js
require_serial: true