-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
120 lines (103 loc) · 3.8 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
---
minimum_pre_commit_version: "2.16"
default_stages: [commit]
default_language_version:
python: python3.11
ci:
skip: []
repos:
# ----------------------------------------------
# Meta hooks
# ----------------------------------------------
- repo: meta
hooks:
- id: identity
stages: [manual]
- id: check-hooks-apply
stages: [manual]
- id: check-useless-excludes
stages: [manual]
# ####################################################################################
#
# Essential
#
# ####################################################################################
- repo: https://github.com/Cielquan/pre-commit-hooks
rev: bb87cb1fdbc8276521d2a3a52a67bd447a4414ab
hooks:
- id: remove-comments-from-jsonc
# files: '.*\.jsonc'
# ####################################################################################
#
# FORMATTING
#
# ####################################################################################
# ----------------------------------------------
# General (code unspecific)
# ----------------------------------------------
# code unspecific out-of-the-box hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: c4a0b883114b00d8d76b479c820ce7950211c99b # frozen: v4.5.0
hooks:
- id: end-of-file-fixer
stages: [commit]
- id: trailing-whitespace
stages: [commit]
# ----------------------------------------------
# JS / TS / HTML / CSS / MD / JSON / YAML
# ----------------------------------------------
# prettier - JS formater
- repo: https://github.com/pre-commit/mirrors-prettier
# https://github.com/prettier/prettier
# Config file: .prettierrc (JSON, YAML)
# Ignore file: .prettierignore (file ignore pattern)
rev: ffb6a759a979008c0e6dff86e39f4745a2d9eac4 # frozen: v3.1.0
hooks:
- id: prettier
additional_dependencies:
- prettier@^3.2.5 # NOTE: version overwrites rev version - keep in sync
# ####################################################################################
#
# LINTING
#
# ####################################################################################
# ----------------------------------------------
# General (code unspecific)
# ----------------------------------------------
- repo: local
hooks:
# Find TODO:|FIXME:|BUG: comments in all files
# Inline skip: `#i#` directly after the colon after the tag-word
- id: find-todos
name: "Find TODO:|FIXME:|BUG: comments"
description: "Check for TODO:|FIXME:|BUG: comments in all files"
language: pygrep
entry: '(^|//!?|#|<!--|;|/\*(\*|!)?|\.\.)\s*(TODO:|FIXME:|BUG:)(?!#i#)'
exclude: TODO
# code unspecific out-of-the-box hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: c4a0b883114b00d8d76b479c820ce7950211c99b # frozen: v4.5.0
hooks:
- id: check-case-conflict
- id: check-shebang-scripts-are-executable
exclude: '^.*\.rs$'
- id: detect-private-key
# ----------------------------------------------
# JSON / TOML / YAML
# ----------------------------------------------
# JSON specific out-of-the-box hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: c4a0b883114b00d8d76b479c820ce7950211c99b # frozen: v4.5.0
hooks:
- id: check-json
- id: check-toml
- id: check-yaml
# yamllint - yaml linter
- repo: https://github.com/adrienverge/yamllint
rev: 8713140e99914c0cb6e07364daedfb140847c3c5 # frozen: v1.33.0
hooks:
# Config file: .yamllint (yaml) [--config-file]
# Inline skip: `# yamllint disable-line[ rule:<RULE>]`
# Block skip: `# yamllint disable[ rule:<RULE>]`
# Block skip end: `# yamllint enable`
- id: yamllint