-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
98 lines (92 loc) · 2.73 KB
/
.pre-commit-config.yaml
File metadata and controls
98 lines (92 loc) · 2.73 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
repos:
# General checks
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- name: Prevent committing to main
id: no-commit-to-branch
args: [--branch, main]
- name: Make sure files end with a newline character
id: end-of-file-fixer
exclude: "dist/.*$"
- name: Remove trailing whitespace
id: trailing-whitespace
exclude: "dist/.*$"
- name: Check for files that would conflict on case-insensitive filesystem
id: check-case-conflict
- name: Check for merge conflicts
id: check-merge-conflict
- name: Check executable files have a shebang
id: check-executables-have-shebangs
- name: Check scripts with a shebang are executable
id: check-shebang-scripts-are-executable
# TypeScript
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0
hooks:
- name: Format TypeScript files
id: prettier
types: [ts]
additional_dependencies:
- prettier@3.0.0
- repo: https://github.com/pre-commit/mirrors-eslint
rev: v8.44.0
hooks:
- name: Lint TypeScript files
id: eslint
types: [ts]
additional_dependencies:
- "@typescript-eslint/eslint-plugin@6.0.0"
- "@typescript-eslint/parser@6.0.0"
- eslint@8.44.0
# YAML
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- name: Validate YAML
id: check-yaml
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0
hooks:
- name: Format YAML files
id: prettier
types: [yaml]
# JSON
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
hooks:
- name: Validate JSON
id: check-json
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0
hooks:
- name: Format JSON files
id: prettier
types: [json]
# Markdown
- repo: https://github.com/pre-commit/mirrors-prettier
rev: v3.0.0
hooks:
- name: Format markdown files
id: prettier
types: [markdown]
# GitHub Actions
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.21.0
hooks:
- name: Validate GitHub Actions workflow files
id: check-github-workflows
- name: Validate GitHub Actions file
id: check-github-actions
# Pre-commit
- repo: https://github.com/python-jsonschema/check-jsonschema
rev: 0.21.0
hooks:
- name: Validate Pre-commit config
id: check-jsonschema
files: ^.*\.pre-commit-config.yaml$
args:
[
"--schemafile",
"https://json.schemastore.org/pre-commit-config.json",
]