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

Bug: Ignores option jsxBracketSameLine and format is odd #623

Closed
DanielHabenicht opened this issue Nov 8, 2018 · 4 comments
Closed

Bug: Ignores option jsxBracketSameLine and format is odd #623

DanielHabenicht opened this issue Nov 8, 2018 · 4 comments
Labels
locked Please open a new issue and fill out the template instead of commenting.

Comments

@DanielHabenicht
Copy link

DanielHabenicht commented Nov 8, 2018

I've got a formatting problem since today, without changing anything in my config. Prettier turned this:

<button *ngFor="let webPage of webPages" class="dropdown-item" (click)="navigateToPage(webPage)">{{webPage}}</button>
<button class="btn btn-clean" (click)="createNewPage()">
  <i class="icon icon-add icon-md mr-1"></i>
  <ng-container i18n="@@HeaderComponentButtonNewPage">
    Create new Page
  </ng-container>
</button>

into this:

<button
  *ngFor="let webPage of webPages"
  class="dropdown-item"
  (click)="navigateToPage(webPage)"
>
  {{ webPage }}
</button>
<button class="btn btn-clean" (click)="createNewPage()">
  <i class="icon icon-add icon-md mr-1"></i>
  <ng-container i18n="@@HeaderComponentButtonNewPage"
    >Create new Page</ng-container
  >
</button>

I've disabled all other Extensions and stripped my VSCode settings to only this line, but still the same result:

{
  "prettier.jsxBracketSameLine": true
}

Apart from ignoring the VSCode Setting for prettier.jsxBracketSameLine I don't think that this is supposed to be:

</ng-container
  >

VSCode Version: 1.28.2 | Prettier Version: 1.7.1

Just for reference, I opened a Stackoverflow aswell.

@CiGit
Copy link
Member

CiGit commented Nov 8, 2018

this is only valid for jsx

There is discussed in prettier: prettier/prettier#5377
There is nothing we can do in this extension about that.

@CiGit CiGit closed this as completed Nov 8, 2018
@DanielHabenicht
Copy link
Author

Ok, thanks for the quick response.
So the update to a higher prettier version actually introduced the change in functionality?

@CiGit
Copy link
Member

CiGit commented Nov 8, 2018

Prettier didn't format template before that version

@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@github-actions github-actions bot added the locked Please open a new issue and fill out the template instead of commenting. label Apr 13, 2020
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Apr 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
locked Please open a new issue and fill out the template instead of commenting.
Projects
None yet
Development

No branches or pull requests

2 participants