This repository has been archived by the owner on Apr 24, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy path.pre-commit-config.yaml
119 lines (119 loc) · 3.33 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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
# https://pre-commit.com/
repos:
# General hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-merge-conflict
- id: end-of-file-fixer
- id: mixed-line-ending
- id: trailing-whitespace
args: ["--markdown-linebreak-ext=md"]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
hooks:
- id: prettier
name: doc format
exclude: ^frontend/
# Frontend hooks
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.7.1
hooks:
- id: prettier
name: frontend format
args:
[
--config=frontend/prettier.config.cjs,
--ignore-path=frontend/.prettierignore,
]
files: ^frontend/
types_or:
- javascript
- jsx
- ts
- tsx
- json
- css
- scss
- markdown
additional_dependencies:
- "@trivago/prettier-plugin-sort-imports"
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.24.0
hooks:
- id: eslint
name: frontend lint
args:
[
--config=frontend/.eslintrc.cjs,
--max-warnings=0,
--ignore-path=frontend/.eslintignore,
]
verbose: true
files: ^frontend/
types: [file]
types_or:
- javascript
- jsx
- ts
- tsx
additional_dependencies:
# Backend hooks
- repo: https://github.com/doublify/pre-commit-rust
rev: v1.0
hooks:
- id: fmt
name: backend format
args: [--manifest-path=backend/Cargo.toml]
files: ^backend/
pass_filenames: false
- repo: https://github.com/sqlfluff/sqlfluff
rev: 2.0.2
hooks:
- id: sqlfluff-fix
name: sql format
args: [--config=backend/.sqlfluff]
- repo: https://github.com/nvuillam/npm-groovy-lint
rev: v11.1.1
hooks:
- id: fix-npm-groovy-lint
name: Fix Lint groovy findings
description: Groovy & Jenkinsfile Auto-fixer
entry: npm-groovy-lint --fix ci/Jenkinsfile ci/Jenkinsfile.release --failon warning --loglevel warning
- repo: https://github.com/nvuillam/npm-groovy-lint
rev: v11.1.1
hooks:
- id: format-npm-groovy-lint
name: Format groovy findings
description: Groovy & Jenkinsfile Auto-formatter
entry: npm-groovy-lint --format ci/Jenkinsfile ci/Jenkinsfile.release
- repo: https://github.com/psf/black
rev: 23.7.0
hooks:
- id: black
language_version: python3
- repo: https://github.com/PyCQA/flake8
rev: 6.0.0
hooks:
- id: flake8
args:
- --max-line-length=120
- --statistics
- repo: https://github.com/pre-commit/mirrors-mypy
rev: v1.4.1
hooks:
- id: mypy
- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
hooks:
- id: codespell
# Scan all .md files, exclude folders /meetings & /reports.
files: ^(?!.*\/(meetings|reports)\/).*\.md$
args: [-L crate]
stages: [manual]