Skip to content
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

Extra indentation is not removed #70

Open
protoEvangelion opened this issue Jun 4, 2021 · 1 comment
Open

Extra indentation is not removed #70

protoEvangelion opened this issue Jun 4, 2021 · 1 comment

Comments

@protoEvangelion
Copy link

The red is before where I added extra indentation & extra spaces to see how the formatter handled it. The green is what precise-commits did:

image

I would expect the leading spaces before const to be removed.

@protoEvangelion protoEvangelion changed the title Bad indentation is not fixed Extra indentation is not removed Jun 4, 2021
@djcsdy
Copy link

djcsdy commented Jan 23, 2022

This project hasn't been maintained for some time.

I'm maintaining an unofficial fork at @softwareventures/precise-commits.

Compared to this project, it fixes a bunch of bugs, and adds support for Windows and CRLF line breaks. It may also fix the problem you're having. If it doesn't, feel free to raise an issue.

I've been using it for a couple of months on my projects and it works well. There are still some pathological cases where it does something weird, but I've never seen it break my code. If you use it on a project where the existing indentation is consistently different to the indentation you configure for prettier, then you are going to have a bad time, but otherwise it is suitable for general use.

You can install it from npm @softwareventures/precise-commits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants