forked from ansible/vscode-ansible
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.pre-commit-config.yaml
146 lines (143 loc) · 4.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
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
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
---
ci:
# format compatible with commitlint
autoupdate_commit_msg: "chore: pre-commit autoupdate"
autoupdate_schedule: monthly
autofix_commit_msg: |
chore: auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
skip:
#- yarn-audit
#- yarn-audit-fix
- yarn-dedupe
minimum_pre_commit_version: 2.9.0 # types_or
repos:
- repo: local
hooks:
- id: git-dirty
name: Check if git reports dirty
entry: git diff --exit-code
language: system
pass_filenames: false
always_run: true
# - id: yarn-audit-fix
# name: yarn-audit-fix
# language: system
# pass_filenames: false
# files: \.tool-versions|package\.json|yarn(-.*\.cjs|\.lock)
# entry: npx yarn run yarn-audit-fix
- repo: https://github.com/ScribeMD/pre-commit-hooks
rev: 0.15.7
hooks:
- id: yarn-dedupe
entry: npx yarn dedupe
# - id: yarn-audit
# entry: npx yarn npm audit
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.9.0.5
hooks:
- id: shellcheck
args:
- --color=always
- repo: https://github.com/pre-commit/pre-commit-hooks.git
rev: v4.4.0
hooks:
- id: end-of-file-fixer
- id: trailing-whitespace
exclude: >
(?x)^(
.yarn/.*|
examples/playbooks/(with-skip-tag-id|unicode).yml|
examples/playbooks/example.yml
)$
- id: mixed-line-ending
- id: check-byte-order-marker
- id: check-executables-have-shebangs
- id: check-merge-conflict
- id: check-json
# does not support JSON with comments
exclude: >
(?x)^(
.vscode/settings.json|
jinja-language-configuration.json|
ansible-language-configuration.json
)$
- id: debug-statements
language_version: python3
- repo: https://github.com/streetsidesoftware/cspell-cli
rev: v6.31.0
hooks:
- id: cspell
name: Spell check with cspell
exclude: >
(?x)^(
.vscode/settings.json|
.yarn/.*|
CHANGELOG.md|
yarn.lock
)$
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.32.0
hooks:
- id: yamllint
files: \.(yaml|yml)$
types: [file, yaml]
entry: yamllint --strict
exclude: >
(?x)^(
test/testFixtures/diagnostics/yaml/invalid_yaml.yml
)$
- repo: https://github.com/codespell-project/codespell
rev: v2.2.4
hooks:
- id: codespell
exclude: >
(?x)^(
.yarn/.*|
.config/dictionary.txt|
CHANGELOG.md|
yarn.lock
)$
- repo: https://github.com/pre-commit/mirrors-prettier
# keep it before markdownlint and eslint
rev: "v3.0.0-alpha.9-for-vscode"
hooks:
- id: prettier
types_or: ["markdown", "json", "ts"]
exclude: >
(?x)^(
jinja-language-configuration.json|
syntaxes/external/jinja.tmLanguage.json
)$
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.34.0
hooks:
- id: markdownlint
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.5.0
hooks:
- id: commitlint
stages: [commit-msg]
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.45.0
hooks:
- id: eslint
args:
# default format is not vscode friendly
- --color
- --format=unix
- --fix
- --max-warnings
- "0"
additional_dependencies:
- "@typescript-eslint/eslint-plugin"
- "@typescript-eslint/parser"
- eslint
- eslint-config-prettier
- eslint-plugin-prettier
- eslint-plugin-tsdoc
- prettier
- typescript
- typescript-eslint
files: \.[jt]sx?$ # *.js, *.jsx, *.ts and *.tsx
types: [file]