This repository has been archived by the owner on Dec 6, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml.template
72 lines (72 loc) · 1.76 KB
/
.pre-commit-config.yaml.template
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
---
default_install_hook_types: ["pre-commit", "pre-push"]
default_stages: ["commit"]
exclude: ^(.gitleaks\.toml|dist/.*\.js)$
minimum_pre_commit_version: 2.18.0
repos:
- repo: local
hooks:
- id: build
name: Build
entry: yarn run build
language: system
pass_filenames: false
verbose: true
- id: test
name: Unit tests
entry: yarn test
language: system
pass_filenames: false
verbose: true
stages: ["push"]
# Security
- repo: https://github.com/Yelp/detect-secrets
rev: v1.4.0
hooks:
- id: detect-secrets
stages: ["commit", "push"]
- repo: https://github.com/zricethezav/gitleaks
rev: v8.15.2
hooks:
- id: gitleaks
stages: ["commit", "push"]
- repo: https://github.com/fabasoad/pre-commit-snyk
rev: v0.2.0
hooks:
- id: snyk-test
stages: ["push"]
# TypeScript
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.24.0
hooks:
- id: eslint
args: ['--fix']
files: \.[jt]sx?$
types: [file]
exclude: ^dist/.*\.js$
# Markdown
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.32.2
hooks:
- id: markdownlint
# Yaml
- repo: https://github.com/adrienverge/yamllint
rev: v1.28.0
hooks:
- id: yamllint
# Other
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- id: check-merge-conflict
- id: check-json
- id: detect-private-key
stages: ["commit", "push"]
- id: end-of-file-fixer
- id: mixed-line-ending
args: ["--fix=lf"]
- id: no-commit-to-branch
- id: trailing-whitespace
ci:
autofix_prs: false
skip: [build, eslint, test]