Andrei Prigorshnev 56f197f8e9
DEV: Run rubocop, prettier and eslint before commit using lefthook
To set up in a local repository `yarn run lefthook install` should be run.
2021-04-12 19:48:41 +04:00

15 lines
458 B
YAML

pre-commit:
parallel: true
commands:
rubocop:
glob: "*.rb"
run: bundle exec rubocop --parallel {staged_files}
prettier:
glob: "*.{scss,js,es6}"
include: "test/javascripts|assets/javascripts"
run: yarn prettier --list-different {staged_files}
eslint-js:
glob: "*.{js,es6}"
include: "test/javascripts|assets/javascripts"
run: yarn eslint --no-error-on-unmatched-pattern -f compact {staged_files}