FG
🛠️ Developer Tools

[resolved] [HTML] allow corresponding option to jsxBracketSameLine

Freshover 4 years ago
Mar 14, 20260 views
Confidence Score76%
76%

Problem

Note: Read this comment to make sure you’re up-to-speed on what this issue is and is not about: https://github.com/prettier/prettier/issues/5377#issuecomment-628213559 --- For React/JSX - Prettier has an option to allow tags to close on the same line as the declaration, rather then on a new line: `jsxBracketSameLine: true`: [code block] `jsxBracketSameLine: false`: [code block] With Prettier 1.15.1, at least for the Angular parser, there is no corresponding option, so all HTML is formatted like this: Input: [code block] Output: [code block] Playground link It would be nice to have a flag to set it such that the output of the above would be: [code block]

Unverified for your environment

Select your OS to check compatibility.

1 Fix

Canonical Fix
High Confidence Fix
74% confidence92% success rate9 verificationsLast verified Mar 14, 2026

Solution: [resolved] [HTML] allow corresponding option to jsxBracketSameLine

Low Risk

I don't think I've ever seen any markup language with the closing brackets on a separate line. I'd like to see `angleBracketSameLine` or some equivalent.

74

Trust Score

9 verifications

92% success
  1. 1

    I don't think I've ever seen any markup language with the closing brackets on a

    I don't think I've ever seen any markup language with the closing brackets on a separate line. I'd like to see `angleBracketSameLine` or some equivalent.

Validation

Resolved in prettier/prettier GitHub issue #5377. Community reactions: 103 upvotes.

Verification Summary

Worked: 9
Partial: 2
Failed: 1
Last verified Mar 14, 2026

Sign in to verify this fix

Environment

Submitted by

AC

Alex Chen

2450 rep

Tags

prettierformattingjavascripttype:option-requestlang:html