forked from opf/openproject
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathlefthook.yml
27 lines (26 loc) · 859 Bytes
/
lefthook.yml
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
# Lefthook configuration
#
# Add commit hooks with `bundle exec lefthook install`
#
# Refer for explanation to following link:
# https://github.com/evilmartians/lefthook/blob/master/docs/usage.md
pre-commit:
parallel: true
commands:
eslint:
root: "frontend/"
files: git diff --name-only --staged
glob: "*.{js,ts,jsx,tsx}"
run: npx eslint {staged_files}
rubocop:
files: git diff --name-only --staged
glob: "*.rb"
run: bin/dirty-rubocop --uncommitted --force-exclusion {files}
erb_lint:
files: git diff --name-only --staged
glob: "*.erb"
run: erb_lint {files}
primer-view-components-version-is-the-same-everyhwere:
files: git diff --name-only --staged
glob: "{Gemfile.lock,frontend/package.json}"
run: script/check_same_primer_view_components_version_everywhere