-
Notifications
You must be signed in to change notification settings - Fork 24
/
.pre-commit-config.yaml
61 lines (61 loc) · 1.94 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
60
61
repos:
# SPELL CHECKER
- repo: local
hooks:
- id: cspell
name: 📚 check spelling of staged files
entry: bash -c 'npx cspell --no-must-find-files --no-progress --cache --gitignore "**/*.{md,html,tsx,ts,py,yaml,yml}"'
language: system
types: [text]
# PREVENT COMMON GIT/GITHUB ERRORS
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-case-conflict
name: 👯 check for file name casing conflicts
- id: check-merge-conflict
name: 🙅 check for merge conflict markers
- id: check-added-large-files
name: 🐳 check for files over 100mb
args: ["--maxkb=100_000", "--enforce-all"]
# FORMAT PYTHON WITH BLACK
- repo: https://github.com/psf/black
rev: 22.10.0
hooks:
- id: black
name: 🖤 python format with black
# LINT PYTHON WITH PYLINT
- repo: local
hooks:
- id: pylint
name: 🐍 python lint with pylint
entry: pylint
language: python
language_version: python3.12
types: [python]
args: [
"-rn", # Only display messages
"-sn", # Don't display the score
]
# LINT/FORMAT JS/TS/JSON WITH BIOME
- repo: https://github.com/biomejs/pre-commit
rev: v0.4.0
hooks:
- id: biome-check
name: 🦕 ts/json format + lint with biome
additional_dependencies: ["@biomejs/biome"]
# WARN IF TOO MANY FILES IN ONE COMMIT
- repo: local
hooks:
- id: check-file-count
name: 🗄️ check + warn if too many files in commit
entry: bash -c scripts/.util/warn_many_files_per_commit.sh
language: system
types: [text]
pass_filenames: false
# LINT DOTENV FILES
- repo: https://github.com/wemake-services/dotenv-linter
rev: 0.5.0 # Use the ref you want to point at
hooks:
- id: dotenv-linter
name: ✅ .env lint with dotenv-linter