-
Notifications
You must be signed in to change notification settings - Fork 3
/
.pre-commit-config.yaml
55 lines (55 loc) · 1.99 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.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$'
- id: check-json
- id: check-yaml
- id: check-added-large-files
- id: check-merge-conflict
- repo: https://github.com/hadolint/hadolint
rev: v2.10.0
hooks:
- id: hadolint
- repo: https://github.com/pre-commit/mirrors-isort
rev: v5.10.1
hooks:
- id: isort
args: ["--profile", "black", "--filter-files"]
- 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: 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.18.0
hooks:
- id: commitlint
stages: [commit-msg]
additional_dependencies: ["@commitlint/config-conventional"]
language_version: 22.8.0