Skip to content

Commit 26a1ab9

Browse files
committed
chore(config): add pre-commit hooks and linting setup
1 parent f53bbbb commit 26a1ab9

6 files changed

Lines changed: 83 additions & 0 deletions

File tree

.gitignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
**/.env*
2+
**/.venv
3+
**/venv

.markdownlint.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
MD013: false

.pre-commit-config.yaml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
repos:
3+
- repo: https://github.com/pre-commit/pre-commit-hooks
4+
rev: v6.0.0
5+
hooks:
6+
- id: check-added-large-files
7+
- id: fix-byte-order-marker
8+
- id: check-case-conflict
9+
- id: check-json
10+
- id: end-of-file-fixer
11+
- id: trailing-whitespace
12+
- id: mixed-line-ending
13+
- id: check-merge-conflict
14+
15+
- repo: https://github.com/adrienverge/yamllint
16+
rev: v1.38.0
17+
hooks:
18+
- id: yamllint
19+
20+
- repo: https://github.com/hadolint/hadolint
21+
rev: v2.14.0
22+
hooks:
23+
- id: hadolint
24+
25+
- repo: https://github.com/DavidAnson/markdownlint-cli2
26+
rev: v0.21.0
27+
hooks:
28+
- id: markdownlint-cli2
29+
30+
- repo: https://github.com/rhysd/actionlint
31+
rev: v1.7.11
32+
hooks:
33+
- id: actionlint
34+
35+
- repo: https://github.com/crate-ci/typos
36+
rev: v1.44.0
37+
hooks:
38+
- id: typos

.typos.toml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# For more information on how to configure typos, see:
2+
# - https://github.com/crate-ci/typos/blob/master/docs/reference.md
3+
# - https://github.com/crate-ci/typos/blob/master/README.md#false-positives
4+
5+
[files]
6+
# By default, typos will not check files that are ignored by git.
7+
# You can override this behavior here.
8+
# For example, to check all files, you would set:
9+
# ignore-vcs = false
10+
extend-exclude = [
11+
"**/.envrc",
12+
]
13+
14+
[default]
15+
# This section contains the default configuration for all file types.
16+
# You can override these settings for specific file types below.
17+
18+
# A list of words that should be considered correct.
19+
# This is useful for words that are specific to your project.
20+
# For example:
21+
# extend-words = {
22+
# "myawesomeword" = "myawesomeword",
23+
# "another" = "another",
24+
# }
25+
26+
# A list of regular expressions that should be ignored.
27+
# This is useful for things like URLs, or other patterns that
28+
# are not words.
29+
# For example, to ignore all URLs:
30+
# extend-ignore-re = [
31+
# "https?://[^`\\s]+",
32+
# ]

.yamllint

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
rules:
3+
line-length: disable

mise.toml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
[tools]
2+
hadolint = "latest"
3+
prek = "latest"
4+
actionlint = "latest"
5+
typos = "latest"

0 commit comments

Comments
 (0)