DEV: Replace Overcommit with Lefthook (#7826)

Overcommit uses prebuilt hooks and require global installation.
To avoid this issues replace it with Lefthook.
Lefthook will be installed with npm packages. New contributors
will have fully consistent git hooks.
This commit is contained in:
Abroskin Alexander
2019-07-02 12:29:52 +03:00
committed by Régis Hanol
parent 1b45096aa5
commit 0872a1182d
7 changed files with 59 additions and 52 deletions

View File

@@ -74,13 +74,7 @@ script:
- |
bash -c "
if [ '$RUN_LINT' == '1' ]; then
bundle exec rubocop --parallel && \
yarn prettier --list-different "app/assets/stylesheets/**/*.scss" "app/assets/javascripts/**/*.es6" "test/javascripts/**/*.es6"
yarn eslint --ext .es6 app/assets/javascripts && \
yarn eslint --ext .es6 test/javascripts && \
yarn eslint --ext .es6 plugins/**/assets/javascripts && \
yarn eslint --ext .es6 plugins/**/test/javascripts && \
yarn eslint app/assets/javascripts test/javascripts
npx lefthook run lints
else
if [ '$QUNIT_RUN' == '1' ]; then
bundle exec rake qunit:test['1200000'] && \