-
Notifications
You must be signed in to change notification settings - Fork 109
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
lint-staged
uses prettier before git commit
#1098
Conversation
Can you expound a bit more on the benefits of moving
|
No one is using We can add |
It is best to start with a minimal pre-commit file and add more things if deemed necessary. |
Okay, I get what you're saying - also, strange to have husky config files without installation. I know this might come off as nitpicky, but I just want to clarify a couple more things on this so that we can get it right:
|
Because prettier does not use the flag in the check in the lint or fix commands.
We can use
This section in the file is overridden by |
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.
I gotcha. In that case, would you mind fixing the merge conflict and adding eslint --fix
back into the script? Otherwise, I think it'd be good to go.
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.
Thanks so much! Looks great.
Description
Fix #1097.
Changes
eslintconfig
frompackage.json
since we use.eslintrc.json
for eslint settings.Tests
Note that you must use
npm run prepare-husky
to enable husky (this should be in PolicyEngine readme).I tested the change by trying to commit a file with the wrong format. The format was correct after commit.