-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
112 lines (99 loc) · 3.18 KB
/
.pre-commit-config.yaml
File metadata and controls
112 lines (99 loc) · 3.18 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
---
repos:
# https://github.com/pre-commit/pre-commit-hooks/releases
- 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: check-yaml
- id: check-json
- id: check-added-large-files
- id: check-case-conflict
- id: check-merge-conflict
- id: detect-private-key
- id: check-executables-have-shebangs
- id: forbid-submodules
- repo: local
hooks:
- id: trivy-fs-scan
name: Trivy filesystem scan
entry: trivy fs --scanners vuln --severity HIGH,CRITICAL --exit-code 1 .
language: system
pass_filenames: false
- id: gitleaks
name: gitleaks
entry: gitleaks detect --no-git --redact --verbose --config=scripts/config/gitleaks.toml
language: system
pass_filenames: false
- id: prettier-formatting
name: prettier-formatting
entry: npm run format:pre-commit --
language: system
- id: eslint-ui
name: ESLint (UI)
entry: npm --prefix ui run lint -- --fix
language: system
files: ^ui/.*\.(ts|tsx|js|jsx)$
pass_filenames: false
- id: eslint-lambdas
name: ESLint (Lambdas)
entry: npm --prefix lambdas run lint -- --fix
language: system
files: ^lambdas/.*\.(ts|js)$
pass_filenames: false
- id: eslint-tests
name: ESLint (Tests)
entry: npm --prefix tests run lint -- --fix
language: system
files: ^tests/.*\.(ts|js)$
pass_filenames: false
- id: check-typescript-ui
name: TypeScript (UI)
entry: npm --prefix ui run check-typescript
language: system
files: ^ui/.*\.(ts|tsx|js|jsx)$
pass_filenames: false
- id: check-typescript-lambdas
name: TypeScript (Lambdas)
entry: npm --prefix lambdas run check-typescript
language: system
files: ^lambdas/.*\.(ts|js)$
pass_filenames: false
- id: check-typescript-tests
name: TypeScript (Tests)
entry: npm --prefix tests run check-typescript
language: system
files: ^tests/.*\.(ts|js)$
pass_filenames: false
- repo: https://github.com/adrienverge/yamllint
rev: v1.38.0
hooks:
- id: yamllint
name: yamllint
description: This hook runs yamllint.
entry: yamllint
language: python
types: [file, yaml]
# Markdown linting
- repo: https://github.com/igorshubovych/markdownlint-cli
rev: v0.48.0
hooks:
- id: markdownlint
# exclude: ^infrastructure/src
args: [--fix]
- repo: https://github.com/antonbabenko/pre-commit-terraform
rev: v1.105.0
hooks:
- id: terraform_fmt
files: ^local-environment/infra
args:
- --args=-recursive
- repo: https://github.com/sqlfluff/sqlfluff
rev: 4.1.0 # pin to a specific version
hooks:
- id: sqlfluff-lint
args: ["--config", ".sqlfluff"] # optional, if you keep config elsewhere
- id: sqlfluff-fix
args: ["--config", ".sqlfluff"] # auto-fix style issues