-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.pre-commit-config.yaml
89 lines (87 loc) · 2.45 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.0.1
hooks:
- id: check-added-large-files
- id: fix-byte-order-marker
- id: check-merge-conflict
- id: trailing-whitespace
exclude: (?x)(
\.yarn/|
spec/files/)
- repo: https://github.com/tdeo/pre-commit-hooks
rev: v4.0.1
hooks:
- id: end-of-file-fixer
exclude: spec/files/
- repo: https://github.com/shellcheck-py/shellcheck-py
rev: v0.8.0.1
hooks:
- id: shellcheck
- repo: local
hooks:
- id: do_not_commit
name: Break on DO NOT COMMIT comment
language: pygrep
entry: (?i)(NOT.{,3}COMMIT)
exclude: (?x)(
.pre-commit-config.yaml|
README.md)
- id: rubocop
name: Rubocop
language: system
entry: bash -c 'bundle exec rubocop ${RUBOCOP_OPTIONS:---autocorrect} "$@"' --
require_serial: true # for proper cache behavior
files: (?x)(
\.(rb|rake|jbuilder|gemspec)$|
Gemfile$|
Rakefile|
.irbrc$)
args:
- --color
- --server
- --config=.rubocop.yml
- --fail-level=convention
- id: ruboclean
name: Ruboclean
language: system
entry: bundle exec ruboclean
files: ^\.rubocop.*\.yml$
args:
- --silent
- --preserve-comments
- id: ruby
name: Valid ruby syntax
language: system
entry: ruby -c
files: \.rb$
exclude: lib/templates/rspec/
- id: prettier-json
name: Prettier JSON
language: system
entry: npx prettier --parser json --write
files: \.json$
- id: prettier-yaml
name: Prettier YAML
language: system
entry: npx prettier --parser yaml --write
files: \.ya?ml$
exclude: ^\.rubocop\.yml
- id: prettier-mdx
name: Prettier MDX
language: system
entry: npx prettier --parser mdx --write
files: \.mdx?$
- id: whitespaces
name: No non-breaking spaces
language: pygrep
entry: \\u00A0 # Non-breaking space
exclude: (?x)^(
\.yarn/releases/|
\.pre-commit-config\.yaml)
- id: license_checks
name: License checks
language: system
entry: .pre-commit/check_license.sh
files: ^doc/dependency_decisions\.yml$
pass_filenames: false