-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
72 lines (72 loc) · 2.64 KB
/
.pre-commit-config.yaml
File metadata and controls
72 lines (72 loc) · 2.64 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: detect-aws-credentials
args: [--allow-missing-credentials]
- id: detect-private-key
- id: trailing-whitespace
- id: end-of-file-fixer
exclude: '^frontend/src/uswds/.*(\.svg|\.map)$'
- id: check-json
- id: check-yaml
- id: check-added-large-files
args: [--maxkb=1000]
- id: check-merge-conflict
- repo: https://github.com/hadolint/hadolint
rev: v2.14.0
hooks:
- id: hadolint
- repo: https://github.com/pycqa/isort
rev: 7.0.0
hooks:
- id: isort
name: isort (ops_api)
args: ["--settings-file", "backend/ops_api/pyproject.toml", "--filter-files"]
files: ^backend/ops_api/
- id: isort
name: isort (data_tools)
args: ["--settings-file", "backend/data_tools/pyproject.toml", "--filter-files"]
files: ^backend/data_tools/
- repo: local
hooks:
- id: nox-lint
name: nox-lint
entry: bash -c 'cd ./backend/ops_api && pipenv run nox -s lint'
language: system
types:
- python
pass_filenames: false
- id: eslint
name: eslint
entry: bash -c 'cd ./frontend/ && bun lint'
language: system
types_or:
- javascript
- jsx
- css
- html
pass_filenames: false
- id: prettier
name: prettier
entry: bash -c 'cd ./frontend/ && bunx prettier --check --ignore-unknown'
language: system
files: ^frontend/.*\.(js|jsx|ts|tsx|json|css|scss|html|md)$
pass_filenames: true
- id: trufflehog
name: TruffleHog
description: Detect secrets in your data.
entry: bash -c 'if command -v podman >/dev/null 2>&1; then podman run --rm -v "$(pwd):/workdir" -i trufflesecurity/trufflehog:latest git file:///workdir --since-commit HEAD --only-verified --fail; elif command -v docker >/dev/null 2>&1; then docker run --rm -v "$(pwd):/workdir" -i trufflesecurity/trufflehog:latest git file:///workdir --since-commit HEAD --only-verified --fail; else echo "Neither docker nor podman found. Please install one of them." && exit 1; fi'
language: system
stages: ["pre-commit", "pre-push"]
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v9.24.0
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies: ["@commitlint/config-conventional"]
language_version: 22.8.0
- repo: https://github.com/renovatebot/pre-commit-hooks
rev: 43.60.6
hooks:
- id: renovate-config-validator