mirror of
https://github.com/opf/openproject.git
synced 2026-06-13 19:20:00 +00:00
d1ce52f9f0
Inspired and adapted from https://gist.github.com/skanev/9d4bec97d5a6825eaaf6 https://gist.github.com/MaxLap/ea4b6d1df81de3024562798b5501b9c8
20 lines
535 B
YAML
20 lines
535 B
YAML
# Lefthook configuration
|
|
#
|
|
# Add commit hooks with `bundle exec lefthook install`
|
|
#
|
|
# Refer for explanation to following link:
|
|
# https://github.com/evilmartians/lefthook/blob/master/docs/full_guide.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}
|