Downport "Add a shared pre-commit to run eslintfix for frontend code changes"
This pre-commit hook will fail the commit when you have linter errors. It will also only run on changed staged files. Also cleaned up linter config in package and lint_test. Change-Id: I70d906b5c5c0180d88e0d0ff9840387e9f013fe2
This commit is contained in:
committed by
Thomas Draebing
parent
a68dbd29cb
commit
3445b3d2c4
@@ -30,4 +30,4 @@ cd ${UI_PATH}
|
||||
# eslint installation.
|
||||
npm link eslint eslint-config-google eslint-plugin-html
|
||||
|
||||
${eslint_bin} -c ${UI_PATH}/.eslintrc.json --ignore-pattern 'node_modules/' --ignore-pattern 'bower_components/' --ignore-pattern 'gr-linked-text' --ignore-pattern 'scripts/vendor' --ext .html,.js ${UI_PATH}
|
||||
${eslint_bin} -c ${UI_PATH}/.eslintrc.json --ext .html,.js ${UI_PATH}
|
||||
|
||||
Reference in New Issue
Block a user