-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
84 lines (69 loc) · 2.85 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
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
fail_fast: true # Used to stop pre-commit, running below steps when one is failed.
repos:
- repo: local
hooks:
# ----------- Code Quality Checking for Each Sub Project -----------
# ----------- (Lint, Type Checking, Test, Docs Gen, Etc...) -----------
- id: apps/backend-main
name: Code Quality Check for "apps/backend-main" Project
entry: poetry run task code-quality--backend-main
language: system
pass_filenames: false
files: "apps\/backend-main\\**.*" # Making this hook only run for if there changes in "apps/backend-main" folder.
verbose: true
- id: apps/frontend-main
name: Code Quality Check for "apps/frontend-main" Project
entry: poetry run task code-quality--frontend-main
language: system
pass_filenames: false
files: "apps\/frontend-main\\**.*" # Making this hook only run for if there changes in "apps/frontend-main" folder.
verbose: true
# Prettier
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v2.3.0
hooks:
- id: prettier
name: Prettifying JS/JSON/MD Files
types: [file]
files: \.(js|json|md)$
additional_dependencies:
- '@prettier/[email protected]'
# Multiple Pre Bundled "pre-commit-hooks". (In here it will auto download necessary things, since we defined URL for it in "repo")
# But We can install these manually too. (pip install pre-commit-hooks) and just used in above.
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: end-of-file-fixer
name: Fixing End of Files
- id: mixed-line-ending
name: Fixing Mixed Line Endings
- id: trailing-whitespace
name: Fixing Trailing Whitespace
- id: check-toml
name: Checking TOML Files
types: [toml]
- id: check-yaml
name: Checking YAML Files
types: [yaml]
- id: check-json
name: Checking JSON Files
types: [json]
exclude: |
(?x)(
.vscode/|
.devcontainer/
)
- id: check-added-large-files
name: Checking Large Files
- id: check-merge-conflict
name: Checking Merge Conflicts
- id: debug-statements
name: Checking Debug Statements
- id: detect-private-key
name: Checking Private Keys
- id: check-case-conflict
name: Checking Case Conflicts
- id: no-commit-to-branch
name: Prevent Direct Commits to Master & Staging
args: [--branch=staging, --branch=master]