-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(package.json): trigger lint against staged files only #1797
Conversation
/cc @Blesh suffered by slow lint. While this isn't definite answer to lint speed itself, this can be short-term workaround. |
LGTM |
above comment was trying to see if I can pass LGTM checker. Seems not. |
LGTM |
I think LGTM.co needs at least two confirmations. |
Make sense, let me try later. |
LGTM |
LGTM |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Description:
This PR introduces module
lint-staged
via wiring existing git hooks to pre-commit. Since checked in codebase is already guarded by full lint, it doesn't necessarily required to trigger full lint each time per check in. This PR makes automatically trigger lint only against staged files, reduced daily-flow time consumption on lint.commit
, lint will be triggered automatically only for staged files. Failure will block commit.lint
tasks remain, allows manual full lint if possible.lint_staged
task will allow trigger lint manually against staged files, do not need try commit each time for trigger lint.travis
will run full lint per each build to serve as guard.NOTE : I think #1731 is still valid when codebase grown, need frequent full lint including CI servers.
Related issue (if exists):
relates to #1731.