forked from NextCommunity/NextCommunity.github.io
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
119 lines (115 loc) · 3.68 KB
/
.pre-commit-config.yaml
File metadata and controls
119 lines (115 loc) · 3.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
default_stages: [pre-commit, pre-push]
minimum_prek_version: "0.2.22"
default_language_version:
python: python3
node: 24.13.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: Check 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: Install Node dependencies
entry: npm ci
language: system
pass_filenames: false
- id: eleventy-build-check
name: Eleventy build and output check
entry: npm run build
language: system
pass_filenames: false
- id: npm-audit
name: Run npm-audit
description: Run npm audit
entry: npm audit --audit-level=high
language: system
pass_filenames: false
# GO-based
# - repo: https://github.com/gitleaks/gitleaks
# rev: v8.30.0
# 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
args: [--markdown-linebreak-ext=md]
- id: end-of-file-fixer
- 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
- id: check-added-large-files
- id: check-json
- id: check-merge-conflict
- id: check-case-conflict
- 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
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
name: run prettier
types_or: [css, html, javascript, json, markdown, yaml]
additional_dependencies: ["prettier@3.8.1"]
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.47.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$