Skip to content

Avoid adding colon for track in 3rd expression of for blocks#15887

Merged
sosukesuzuki merged 4 commits intoprettier:mainfrom
sosukesuzuki:fix-15784
Jan 8, 2024
Merged

Avoid adding colon for track in 3rd expression of for blocks#15887
sosukesuzuki merged 4 commits intoprettier:mainfrom
sosukesuzuki:fix-15784

Conversation

@sosukesuzuki
Copy link
Copy Markdown
Contributor

Description

Fixes #15784

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

@sosukesuzuki sosukesuzuki requested a review from fisker January 7, 2024 14:30
</div>

<div>
@for (item of items; let i = $index; track block) {}
Copy link
Copy Markdown
Member

@fisker fisker Jan 7, 2024

Choose a reason for hiding this comment

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

I don't know much about angular syntax, but we format @for and *ngFor exactly the same, so please add <div *ngFor="item of items; let i = $index; track block"></div> just like the <div> above. We can compare them if we change in future.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prettier adds a colon after 'track'

2 participants