-
Notifications
You must be signed in to change notification settings - Fork 0
/
.pre-commit-config.yaml
108 lines (94 loc) · 3.19 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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
exclude: '(nix/sources.nix$)'
repos:
- repo: local
hooks:
#############################################
# Constitutionals
#
# Reference: https://github.com/pre-commit/pre-commit-hooks/blob/d0d9883648b4b30a43cd965471c9b5fa8f8a4131/.pre-commit-hooks.yaml
- name: Check for case conflicts
id: check-case-conflict
language: system
entry: check-case-conflict
- name: Check for merge conflicts
id: check-merge-conflict
types: [text]
language: system
entry: check-merge-conflict
- name: Check for broken symlinks
id: check-symlinks
types: [symlink]
language: system
entry: check-symlinks
- name: Check vcs permalinks
id: check-vcs-permalinks
types: [text]
language: system
entry: check-vcs-permalinks
- name: Fix End of Files
id: end-of-file-fixer
types: [text]
language: system
entry: end-of-file-fixer
- name: Trim Trailing Whitespace
id: trailing-whitespace
types: [text]
language: system
entry: trailing-whitespace-fixer
- name: Check © headers
id: headroom
always_run: true
language: system
pass_filenames: false
entry: headroom run
#############################################
# JSON
- name: Check JSON code style with prettier
id: prettier-json
types: [json]
exclude: 'bower.json'
language: system
entry: prettier --write
#############################################
# YAML
- name: Check YAML code style with prettier
id: prettier-yaml
types: [yaml]
language: system
entry: prettier --write
- name: Static analysis YAML with yamllint
id: yamllint
types: [yaml]
language: system
entry: yamllint
#############################################
# Shell
- name: Check shell code style with shfmt
id: shfmt
types: [shell]
language: system
entry: shfmt
- name: Static analysis shell scripts with shellcheck
id: shellcheck
types: [shell]
language: system
entry: shellcheck
#############################################
# Nix
- name: Check Nix code style with nixpkgs-fmt
id: nixpkgs-fmt
files: '\.nix$'
language: system
entry: nixpkgs-fmt
- name: Static analysis Nix with nix-linter
id: nix-linter
files: '\.nix$'
language: system
entry: nix-linter
#############################################
# JavaScript
- name: Check JavaScript code style with prettier
id: prettier-js
files: '\.js$'
language: system
entry: prettier --write