Skip to content

Commit 382b843

Browse files
committed
docs: add .editorconfig and .pre-commit-config.yaml for better DX
1 parent 5df87f4 commit 382b843

2 files changed

Lines changed: 48 additions & 0 deletions

File tree

.editorconfig

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
root = true
2+
3+
[*]
4+
end_of_line = lf
5+
charset = utf-8
6+
trim_trailing_whitespace = true
7+
insert_final_newline = true
8+
9+
[*.go]
10+
indent_style = tab
11+
12+
[*.{py,ts,tsx,js,jsx,yaml,yml,md,sh,sql,toml,ini}]
13+
indent_style = space
14+
indent_size = 4
15+
16+
[*.{yaml,yml,md,sh,toml}]
17+
indent_size = 2
18+
19+
[Makefile]
20+
indent_style = tab

.pre-commit-config.yaml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.6.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-yaml
8+
- id: check-merge-conflict
9+
- id: check-added-large-files
10+
- id: check-case-conflict
11+
12+
- repo: https://github.com/pre-commit/mirrors-prettier
13+
rev: v3.3.3
14+
hooks:
15+
- id: prettier
16+
types_or: [markdown, yaml, json, toml]
17+
18+
- repo: https://github.com/shellcheck-py/shellcheck-py
19+
rev: v0.10.0.1
20+
hooks:
21+
- id: shellcheck
22+
files: ^scripts/.*\.sh$
23+
24+
- repo: https://github.com/golangci/golangci-lint
25+
rev: v1.59.1
26+
hooks:
27+
- id: golangci-lint
28+
args: ["--fast"]

0 commit comments

Comments
 (0)