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

[ENHANCEMENT] Align hbs templates generated by app blueprint with Prettier defaults #10256

Merged

Conversation

jelhan
Copy link
Contributor

@jelhan jelhan commented Apr 15, 2023

This aligns the HBS templates generated by ember new with Prettier's defaults for Handlebars.

Today when adopting Prettier for Handlebars in a newly generated Ember application, Prettier rewrites the comments in app/templates/application.hbs:

diff --git a/app/templates/application.hbs b/app/templates/application.hbs
index 4152aaf..0b86c10 100644
--- a/app/templates/application.hbs
+++ b/app/templates/application.hbs
@@ -1,7 +1,7 @@
 {{page-title "Croodle"}}
 
-{{!-- The following component displays Ember's default welcome message. --}}
+{{! The following component displays Ember's default welcome message. }}
 <WelcomePage />
-{{!-- Feel free to remove this! --}}
+{{! Feel free to remove this! }}
 
 {{outlet}}
\ No newline at end of file

We could avoid this unneeded churn by following Prettier code formatting in blueprints directly.

@bertdeblock bertdeblock changed the title align hbs templates generated by app blueprint with Prettier defaults [ENHANCEMENT] Align hbs templates generated by app blueprint with Prettier defaults Apr 15, 2023
@bertdeblock
Copy link

Thank you @jelhan.

auto-merge was automatically disabled April 16, 2023 09:43

Head branch was pushed to by a user without write access

@jelhan
Copy link
Contributor Author

jelhan commented Apr 16, 2023

@bertdeblock Updated the fixtures to fix the tests.

@bertdeblock bertdeblock merged commit b2854f2 into ember-cli:master Apr 16, 2023
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants