-
-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Use Prettier JS #5017
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
Use Prettier JS #5017
Conversation
acinader
left a comment
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.
nice.
|
@acinader no more 'coding style' arguments! |
Codecov Report
@@ Coverage Diff @@
## master #5017 +/- ##
==========================================
- Coverage 94.28% 94.22% -0.06%
==========================================
Files 121 121
Lines 8728 8820 +92
==========================================
+ Hits 8229 8311 +82
- Misses 499 509 +10
Continue to review full report at Codecov.
|
| "prettier --write", | ||
| "flow", | ||
| "eslint --cache ./", | ||
| "git add" |
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.
@flovilmart a bad side effect of this change is that if you commit with unstaged changes, they'll actually get committed.
for the time being, I have just commented out this hunk from package.json.
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.
No they don’t only the list of files that are staged are passed as an argument.
Husky passes the list of files to the commandsz
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.
In my case, I staged part of a file, but it would end up committing all the changes in the file, not just the parts I staged.
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.
You’re right, still, this feels like a corner case
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 can live with it
* Adds prettier * Run lint before tests
Because it's awesome!
It's also combined with pre-commit hooks so your code will always be pretty!