-
Notifications
You must be signed in to change notification settings - Fork 15
/
.pre-commit-config.yaml
59 lines (59 loc) · 1.98 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
repos:
- repo: https://github.com/astral-sh/ruff-pre-commit
rev: v0.8.2
hooks:
# Run the linter.
- id: ruff
args: [--fix]
# Run the formatter.
- id: ruff-format
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v5.0.0
hooks:
- id: pretty-format-json
args: [--autofix, --no-sort-keys]
- repo: https://github.com/pre-commit/mirrors-eslint
rev: "v9.16.0"
hooks:
- id: eslint
name: ESLint for ECR Viewer
files: ^containers/ecr-viewer/.*\.[jt]sx?$ # *.js, *.jsx, *.ts and *.tsx in containers/ecr-viewer
types: [file]
additional_dependencies:
- eslint@8.56.0
- eslint-config-next
- eslint-config-prettier
- "@typescript-eslint/parser"
- "@typescript-eslint/eslint-plugin"
- typescript
- "@next/eslint-plugin-next"
- eslint-plugin-unused-imports
- eslint-plugin-jsdoc
args: ["--config=./containers/ecr-viewer/.eslintrc.json", "--fix"]
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v4.0.0-alpha.8
hooks:
- id: prettier
types_or: [css, javascript, tsx, ts, yaml]
- repo: local
hooks:
# run `terraform fmt` if tf files are modified and terraform is installed
# when terraform is not installed, this check will succeed even if tf files
# would not pass the format check
- id: terraform-fmt
name: terraform-fmt
entry: bash -c 'if command -v terraform >/dev/null 2>&1; then terraform fmt -recursive -check operations; else exit 0; fi'
language: system
types:
- terraform
pass_filenames: false
ci:
autofix_commit_msg: |
[pre-commit.ci] auto fixes from pre-commit hooks
autofix_prs: true
autoupdate_branch: ""
autoupdate_commit_msg: "[pre-commit.ci] pre-commit autoupdate"
autoupdate_schedule: weekly
skip: [pretty-format-json, terraform-fmt]
submodules: false
exclude: examples/*