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

handlebars: Print final blockParam on its own line #9978

Merged
merged 10 commits into from
Jan 13, 2021

Conversation

dcyriller
Copy link
Collaborator

@dcyriller dcyriller commented Dec 30, 2020

Description

This PR implements the change proposed in #8502.

Given these options:

--parser glimmer
--print-width 40

Input:

<MyComponent @prop={{true}} @prop2={{true}} as |thing|></MyComponent>

Current Output:

<MyComponent
  @prop={{true}}
  @prop2={{true}} as |thing|
/>

Proposal:

<MyComponent
  @prop={{true}}
  @prop2={{true}}
  as |thing|
/>

cc @pzuraq

Checklist

  • I’ve added tests to confirm my change works.
  • (If changing the API or CLI) I’ve documented the changes I’ve made (in the docs/ directory).
  • (If the change is user-facing) I’ve added my changes to changelog_unreleased/*/XXXX.md file following changelog_unreleased/TEMPLATE.md.
  • I’ve read the contributing guidelines.

Try the playground for this PR

@dcyriller dcyriller force-pushed the has-block branch 2 times, most recently from e945d83 to e2a80ac Compare December 30, 2020 16:21
Copy link
Member

@fisker fisker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good 👍

@fisker
Copy link
Member

fisker commented Jan 12, 2021

@dcyriller Can you fix the conflicts?

@dcyriller
Copy link
Collaborator Author

done ✅
To me, the other PR brought a nice simplificaction.

@fisker fisker merged commit 554d45e into prettier:master Jan 13, 2021
@dcyriller dcyriller deleted the has-block branch January 13, 2021 07:27
kurtinatlanta added a commit to kurtinatlanta/prettier that referenced this pull request Jan 17, 2021
* master: (48 commits)
  Refactor: Use getLastStatement function in printStatementSequence (prettier#10066)
  Build(deps): Bump meriyah from 3.1.6 to 4.0.0 (prettier#10060)
  Add meriyah to getMarkdownSyntax (prettier#10061)
  Build(deps): Bump @angular/compiler from 11.0.8 to 11.0.9 (prettier#10055)
  Build(deps-dev): Bump webpack from 5.13.0 to 5.14.0 in /website (prettier#10053)
  Build(deps-dev): Bump webpack from 5.13.0 to 5.14.0 (prettier#10054)
  Build(deps-dev): Bump eslint-plugin-unicorn from 26.0.0 to 26.0.1 (prettier#10056)
  handlebars: Print final blockParam on its own line (prettier#9978)
  Build(deps-dev): Bump webpack from 5.12.3 to 5.13.0 (prettier#10040)
  Enable `unicorn/prefer-regexp-test` (prettier#10045)
  Build(deps-dev): Bump @typescript-eslint/types from 4.12.0 to 4.13.0 (prettier#10038)
  Build(deps): Bump @typescript-eslint/typescript-estree from 4.12.0 to 4.13.0 (prettier#10039)
  Build(deps-dev): Bump eslint-plugin-unicorn from 25.0.1 to 26.0.0 (prettier#10042)
  Build(deps): Bump @angular/compiler from 11.0.7 to 11.0.8 (prettier#10041)
  Build(deps-dev): Bump webpack from 5.12.3 to 5.13.0 in /website (prettier#10037)
  Build(deps-dev): Bump @types/estree from 0.0.45 to 0.0.46 (prettier#10043)
  Build(deps-dev): Bump terser-webpack-plugin from 5.0.3 to 5.1.1 (prettier#10033)
  Build(deps-dev): Bump webpack from 5.11.1 to 5.12.3 (prettier#10035)
  Build(deps-dev): Bump webpack from 5.11.1 to 5.12.3 in /website (prettier#10034)
  Refactor: Use `Doc[]` instead of `concat()` (prettier#9993)
  ...

# Conflicts:
#	package.json
#	src/language-js/printer-estree.js
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 14, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants