Add support to prettify tagged template in JavaScript with a tag named hbs
Open
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 52.3k
- Forks
- 5k
- Avg merge
- 19h 2m
- Merged PRs (30d)
- 117
Description
Prettier 2.6.1
Playground link
Add the same support as html to hbs tag name, this will help the Ember.JS community to auto formate hbs.
Input:
hbs`<MyComponent @xx="{{xx}}" />`;
Output:
hbs`<MyComponent @xx="{{xx}}" />`;
Expected behavior:
hbs`<MyComponent
@xx="{{xx}}"
/>
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the linked Prettier playground example and locate the existing support for HTML tagged templates. Extend the same behavior to the hbs tag, then verify that the sample input formats with the component attributes and closing tag on separate lines as shown.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100