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

Support --fix on attribute-indentation #2098

Open
mehulkar opened this issue Sep 16, 2021 · 5 comments
Open

Support --fix on attribute-indentation #2098

mehulkar opened this issue Sep 16, 2021 · 5 comments

Comments

@mehulkar
Copy link

The attribute-indentation rule is about style and is very annoying to fix when things go wrong. A --fix option would be very helpful.

https://github.com/ember-template-lint/ember-template-lint/blob/master/docs/rule/attribute-indentation.md

@bmish
Copy link
Member

bmish commented Sep 17, 2021

ember-template-lint-plugin-prettier which is autofixable might be the future here instead of that rule.

@mehulkar
Copy link
Author

I was trying to figure that out today with a coworker! I wasn't sure if ember-template-lint . --fix was intended to use the prettier plugin under the hood or not. Is the plan to make the prettier plugin part of the ember blueprint or bring it in via this package?

@bmish
Copy link
Member

bmish commented Sep 18, 2021

Will defer to @rwjblue and @dcyriller on that.

Last I heard, attribute-indentation had some instabilities too.

And looks like this topic was previously discussed in #1523.

We should update the attribute-indentation rule doc with more context/advice.

@dcyriller
Copy link
Member

@mehulkar sorry for the late reply.

I am a bit biaised on this as I wrote the plugin. I use it in my projects. It allows me to run ember-template-lint . --fix in my editor (through a key binding) to format the hbs files with prettier. This is convenient.

Is the plan to make the prettier plugin part of the ember blueprint or bring it in via this package?

I think the plugin could be added to the ember blueprint. To do so, it would probably have to go through the RFC process.

@VincentMolinie
Copy link
Contributor

Could be fixed by: #2271

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

No branches or pull requests

4 participants