-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.pre-commit-config.yaml
73 lines (67 loc) · 1.87 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
---
# Pre-commit configuration
# For details, visit: https://pre-commit.com/hooks.html
repos:
# Codespell for spelling corrections
- repo: https://github.com/codespell-project/codespell
rev: v2.3.0
hooks:
- id: codespell
args:
- --ignore-words-list=ihs,ro,fo
- --skip="./.*,*.csv,*.json"
- --quiet-level=2
exclude_types:
- csv
- json
# General pre-commit hooks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: detect-private-key
- id: check-merge-conflict
- id: check-added-large-files
- id: check-case-conflict
- id: check-executables-have-shebangs
- id: trailing-whitespace
args: [--markdown-linebreak-ext=md]
# - id: end-of-file-fixer
- id: check-toml
- id: check-json
- id: check-yaml
args: [--allow-multiple-documents]
- id: mixed-line-ending
args: ["--fix=lf"]
# Prettier for code formatting
- repo: https://github.com/rbubley/mirrors-prettier
rev: v3.4.2
hooks:
- id: prettier
additional_dependencies:
- prettier@3.2.5
- prettier-plugin-sort-json@3.1.0
exclude_types:
- python
# types_or:
# - yaml
# - json5
# Secret detection
- repo: https://github.com/Yelp/detect-secrets
rev: v1.5.0
hooks:
- id: detect-secrets
- repo: https://github.com/gitleaks/gitleaks
rev: v8.22.1
hooks:
- id: gitleaks
# YAML Linting
- repo: https://github.com/adrienverge/yamllint.git
rev: v1.35.1
hooks:
- id: yamllint
# # Dockerfile linting #########################################################
# - repo: https://github.com/pryorda/dockerfilelint-precommit-hooks
# rev: v0.1.0
# hooks:
# - id: dockerfilelint
# stages: [pre-commit]