forked from Panfactum/stack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
101 lines (91 loc) · 2.95 KB
/
.pre-commit-config.yaml
File metadata and controls
101 lines (91 loc) · 2.95 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
repos:
- repo: local
hooks:
- id: lint-spellcheck
name: Spellcheck
entry: cspell lint --no-progress --gitignore
language: system
files: \.(md|mdx)$
pass_filenames: true
description: "Runs spellcheck on markdown files"
fail_fast: true
- id: shellcheck
name: Shellcheck
entry: shellcheck
language: system
files: ^packages/(nix|installer|infrastructure)/.*\.sh$
pass_filenames: true
description: "Runs shellcheck on shell scripts"
fail_fast: true
- id: shellfmt
name: Shell Format
entry: shfmt --diff -i 2
language: system
files: ^packages/(nix|installer|infrastructure)/.*\.sh$
pass_filenames: true
description: "Runs shfmt on shell scripts"
fail_fast: true
- id: nixfmt
name: Nix Format
entry: nixfmt -c
language: system
files: ^packages/(nix|cli)/.*\.nix$
pass_filenames: true
description: "Runs nixfmt on Nix files"
fail_fast: true
- id: hcl-fmt
name: HCL Format
entry: terragrunt hclfmt --terragrunt-check --terragrunt-diff --terragrunt-hclfmt-file
language: system
files: ^packages/cli/.*\.hcl$
pass_filenames: true
description: "Runs hclfmt on HCL files"
fail_fast: true
- id: tf-fmt
name: Tofu Format
entry: tofu fmt -diff -check
language: system
files: ^packages/infrastructure/.*\.tf$
pass_filenames: true
description: "Runs tofu fmt on the infrastructure code"
fail_fast: false
- id: tf-generate-docs
name: Generate Terraform Docs
entry: generate-tf-docs
language: system
files: ^packages/infrastructure/
pass_filenames: false
description: "Generates the IaC docs for the website"
fail_fast: true
- id: typecheck-website
name: Typecheck Website
entry: precommit-typecheck-website
language: system
files: ^packages/website/
pass_filenames: false
description: "Runs a typecheck on the website code"
fail_fast: true
- id: lint-website
name: Lint Website
entry: precommit-lint-website
language: system
files: ^packages/website/src/.*\.(ts|tsx|astro)$
pass_filenames: true
description: "Runs linting for the website code"
fail_fast: true
- id: typecheck-cli
name: Typecheck CLI
entry: precommit-typecheck-cli
language: system
files: ^packages/cli/
pass_filenames: false
description: "Runs a typecheck on the CLI code"
fail_fast: true
- id: lint-cli
name: Lint CLI
entry: precommit-lint-cli
language: system
files: ^packages/cli/.*\.ts$
pass_filenames: true
description: "Runs linting for the CLI code"
fail_fast: true