Repository navigation
Expand file tree
/
Copy path.pre-commit-config.yaml
More file actions
76 lines (74 loc) · 2.52 KB
/
Copy path.pre-commit-config.yaml
File metadata and controls
76 lines (74 loc) · 2.52 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
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v6.0.0
hooks:
- id: check-illegal-windows-names
- id: check-json
exclude: |
(?x)^(
spec/fixtures/files/.*
)$
- id: check-merge-conflict
- id: check-yaml
exclude: |
(?x)^(
spec/fixtures/files/.*
)$
- id: end-of-file-fixer
- id: trailing-whitespace
# These hooks run in the rails Docker Compose service, using the gems in the Gemfile
# and the packages in package.json
- repo: local
hooks:
- id: prettier
name: prettier
entry: .dockerfiles/run-in-docker.sh node_modules/.bin/prettier --write --ignore-unknown
language: system
require_serial: true
types_or: [javascript, jsx, css, scss, html]
- id: stylelint
name: stylelint
entry: .dockerfiles/run-in-docker.sh node_modules/.bin/stylelint --fix
language: system
require_serial: true
types_or: ["css", "scss"]
exclude: |
(?x)^(
app/assets/stylesheets/application.css|
app/assets/stylesheets/common/_reset.scss
)$
- id: rubocop
name: rubocop
entry: .dockerfiles/run-in-docker.sh bundle exec rubocop --autocorrect --force-exclusion --cache-root tmp/rubocop
language: system
require_serial: true
types: ["ruby"]
- id: erb_lint
name: erb_lint
entry: .dockerfiles/run-in-docker.sh bundle exec erb_lint --autocorrect
language: system
require_serial: true
types: ["erb"]
exclude: |
(?x)^(
.*.xml.erb|
.*/assign_scans.html.erb
)$
- id: i18n-tasks-health
name: i18n-tasks health
entry: .dockerfiles/run-in-docker.sh bundle exec i18n-tasks health
language: system
files: config/locales/
pass_filenames: false
- id: active-record-doctor
name: active_record_doctor
entry: .dockerfiles/run-in-docker.sh bundle exec rails active_record_doctor
language: system
require_serial: true
files: ^(app/models/|db/migrate/|db/structure\.sql$|\.active_record_doctor\.rb$)
pass_filenames: false
exclude: vendor
ci:
autoupdate_schedule: monthly
# Ruby- and JavaScript-based hooks are run in a separate CI task
skip: [prettier, stylelint, rubocop, erb_lint, i18n-tasks-health, active-record-doctor]