-
Notifications
You must be signed in to change notification settings - Fork 20
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
Unexpected Formatting Result #12
Comments
I have same problem and it is caused by prettier with range options, IMO. |
@ReDrUm In order to reproduce and diagnose, it is important to know what characters were actually changed before precise-commits ran on it. In your example above, which bits changed? |
Hi @JamesHenry, Sure, thanks. I think @Sheile is correct and it's related or caused by bleeding outside of the range options which is mentioned via #13 For the purpose of this example let's assume i changed and staged a single line: Regardless of bleeding the formatting inconsistency is my concern in this issue. |
Looks like this is #15 duplicate |
I ran into the issue and did a bit of investigation. Seems like the problem is in Prettier itself. When running Prettier (CLI) directly with the same |
Hi,
When using precise-commits i'm unexpectedly getting different output compared to running prettier directly myself. Specifically it's stripping brackets from return statements within my react render functions and doing weird things with alignment/indentation.
Is precise-commits using it's own Prettier config instead of finding the
.prettierrc
file in my project root? Based on the below quote from your docs I had assumed it would be consistent.Something like this:
Becomes this via precise-commits:
Compared to this expectation which I get when running prettier directly:
Any ideas how to re-align the formatting so that precise-commits outputs the same result as prettier is?
The text was updated successfully, but these errors were encountered: