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

[FEATURE] Format only changed lines not the whole file #127

Open
Ali-RS opened this issue Sep 15, 2023 · 1 comment
Open

[FEATURE] Format only changed lines not the whole file #127

Ali-RS opened this issue Sep 15, 2023 · 1 comment
Labels
enhancement New feature or request

Comments

@Ali-RS
Copy link

Ali-RS commented Sep 15, 2023

Hello,

Is it possible to add an option to apply formatting only on the changed lines (made by a commit) and not the whole file?

Regards

@Ali-RS Ali-RS added the enhancement New feature or request label Sep 15, 2023
@creyD
Copy link
Owner

creyD commented Jan 10, 2024

Thanks for your comment! If it is possible in prettier, then yes. I found this after a quick search, but I don't know if this is conclusive. It seems the range parameter could be used for this, even though this would mean a lot of code change, as you would need to iterate over each file instead of running prettier for the whole repo once (if I understand correctly). I would be open to reviewing and accepting a PR, but I don't plan on integrating this for now.

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

No branches or pull requests

2 participants