-
Notifications
You must be signed in to change notification settings - Fork 142
Added pre-commit hook to enforce lint style #80
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
Conversation
grunt/githooks.js
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this needs to be grunt eslint since using just eslint requires eslint to be globally installed on the users machine.
|
I checked out this branch and can't commit since there are style failures. This githook should only be created once its clear to do a merge. We wouldn't want any contributor unable to commit becuase of existing style errors. |
|
Yup, just saw that. There's 10 lint warnings left to address. I'll send a PR for that before this gets merged in. |
|
By the way, it does allow you to commit if there are only lint warnings and no lint errors. Not sure why you weren't able to send a commit? There's only 10 lint warnings, no errors. |
|
ah i must have not noticed that, since i wasn't commiting any changed files. |
|
It's all good. Either way, I'm working on sending a PR for the last 10 warnings. By the way, on the topic of warnings and errors - we might want to revise what we consider to be an error/warning. I say this because only errors will actually stop a commit from happening and force a user to fix the styling. A warning will only display the warnings but still allow the commit through. So if there's things for sure that we don't want committed, we'll have to change the value to |
|
hmm i dont really like making everything errors, usually warnings are style concerns and errors are actual errors that will affect the runtime. Is there a way to make The way githooks work, is if the pre-commit process returns a non-zero exit code then it wont let you commit. So it seems like we need a way to have |
|
Ya, I looked into making it fail on warnings but the issue is that the |
|
Ok @jordangarcia - just sent in #81 to resolve the last 10 lint warnings. |
|
this lgtm |
Added pre-commit hook to enforce lint style
@jordangarcia - accomplished this using the
grunt githooksmodule.