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

Plugin removes final newline #2

Closed
urbantrout opened this issue Oct 26, 2019 · 4 comments
Closed

Plugin removes final newline #2

urbantrout opened this issue Oct 26, 2019 · 4 comments

Comments

@urbantrout
Copy link
Contributor

I have a .editorconfig file with:

insert_final_newline = true

This plugin removes final newlines in all of my twig files.

Expected behavior:

  • Respect the settings in .editorconfig and do not remove the final newline.
@twbartel
Copy link
Collaborator

twbartel commented Nov 5, 2019

Looking into it, stay tuned.

@twbartel
Copy link
Collaborator

twbartel commented Nov 6, 2019

I had a look at the Prettier source code, and Prettier itself seems only to support certain properties from .editorconfig: quote_type, tab_width, indent_style, indent_size, max_line_length, end_of_line.

I could not find insert_final_newline. Therefore, if Prettier does not pass this option through to my plugin, I cannot (should not?) take it into account.

What I will do, however, is leave one final newline in place (or add it, if it's not there) as the default behaviour. Would that be ok for you?

twbartel added a commit that referenced this issue Nov 6, 2019
@twbartel
Copy link
Collaborator

twbartel commented Nov 6, 2019

I just published v0.0.28 which always appends a newline. Can you give it a try?

@urbantrout
Copy link
Contributor Author

It works. Thanks!

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