forked from NextCommunity/NextCommunity.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
146 lines (137 loc) · 4.68 KB
/
.pre-commit-config.yaml
File metadata and controls
146 lines (137 loc) · 4.68 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
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
default_stages: [pre-commit, pre-push]
minimum_prek_version: "0.2.22"
default_language_version:
python: python3
node: 24.14.0
exclude: |
(?x)^(
\.git/|
_site/|
node_modules/|
package-lock\.json$
)
repos:
- repo: meta
hooks:
- id: identity
name: Run identity
description: Run the identity check
- id: check-hooks-apply
name: run check-hooks-apply
description: check that all the hooks apply to the repository
- repo: local
hooks:
- id: check-zip-file-is-not-committed
name: check no zip files are committed
description: Zip files are not allowed in the repository
language: fail
entry: |
Zip files are not allowed in the repository as they are hard to
track and have security implications. Please remove the zip file from the repository.
files: (?i)\.zip$
- id: npm-ci
name: run npm-ci
description: Install Node dependencies
entry: npm ci
language: system
pass_filenames: false
- id: eleventy-build-check
name: run eleventy-build-check
description: Eleventy build and output check
entry: npm run build
language: system
pass_filenames: false
# GO-based
- repo: https://github.com/gitleaks/gitleaks
rev: v8.30.1
hooks:
- id: gitleaks
name: Run gitleaks
description: Check for secrets with gitleaks
- repo: https://github.com/Lucas-C/pre-commit-hooks
rev: v1.5.6
hooks:
- id: chmod
name: Set file permissions
description: Does not run on Windows so setup as a manual hook
args: ["644"]
files: \.md$
stages: [manual]
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: trailing-whitespace
name: run trailing-whitespace
description: trims trailing whitespace
args: [--markdown-linebreak-ext=md]
- id: end-of-file-fixer
name: run end-of-file-fixer
description: makes sure files end in a newline and only a newline
- id: fix-byte-order-marker
name: run fix-byte-order-marker
description: removes UTF-8 byte order marker
- id: forbid-submodules
name: run forbid-submodules
description: forbids any submodules in the repository
- id: check-yaml
name: run check-yaml
description: attempts to load all yaml files to verify syntax
- id: check-added-large-files
name: run check-added-large-files
description: prevent giant files from being committed
- id: check-json
name: run check-json
description: check JSON files for syntax errors
- id: check-merge-conflict
name: run check-merge-conflict
description: check for merge conflict markers
- id: check-case-conflict
name: run check-case-conflict
description: check for case conflicts in file names
- id: check-vcs-permalinks
name: run check-vcs-permalinks
description: ensures that links to vcs websites are permalinks
- id: detect-aws-credentials
name: run detect-aws-credentials
description: checks for the existence of AWS secrets that you have set up with the AWS CLI
args: [--allow-missing-credentials]
- id: detect-private-key
name: run detect-private-key
description: checks for the existence of private keys
- id: mixed-line-ending
name: run mixed-line-ending
description: replaces or checks mixed line ending
- repo: https://github.com/biomejs/pre-commit
rev: "v2.4.8"
hooks:
- id: biome-check
name: run biome-check
description: Run Biome linter and formatter for JSON files
additional_dependencies: ["@biomejs/biome"]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.48.0
hooks:
- id: markdownlint
name: run markdownlint
description: check Markdown files with markdownlint
args: [--config=.github/linters/.markdown-lint.yml]
types: [markdown]
files: \.md$
- repo: https://github.com/adrienverge/yamllint
rev: v1.38.0
hooks:
- id: yamllint
name: run yamllint
description: check YAML files with yamllint
args: [--strict, -c=.github/linters/.yaml-lint.yml]
types: [yaml]
files: \.ya?ml$
- repo: https://github.com/zizmorcore/zizmor-pre-commit
rev: v1.23.1
hooks:
- id: zizmor
name: run zizmor
description: zizmor is a static analysis tool for GitHub Actions
# args: [--config=.github/linters/zizmor.yml]
files: ^\.github/workflows/.*$
types: [yaml]