Make ending bracket on a new line
See original GitHub issueIs it possible to format HTML/JSX like this:
<div
className="test"
style={{
height: "100px"
}}
> <----- on a new line
Something
</div>
At the moment I get
<div
className="test"
style={{
height: "100px" <----- too much indentation
}}> <--- ">" symbol not on a new line
Something
</div>
I use the esformatter-jsx
, which uses js-beautify to format JSX.
Many thanks.
Issue Analytics
- State:
- Created 7 years ago
- Reactions:2
- Comments:9 (3 by maintainers)
Top Results From Across the Web
clang-format closing bracket on a new line - c++ - Stack Overflow
I'd like my multi-line function invocations (although EXPECT_EQ is a macro in this case) to have the closing round bracket on its own...
Read more >Why should we not put end brackets on the same line?
One reason I can think of is that putting the closing brackets on individual lines makes it easier to (un)comment the whole block...
Read more >PEP 8: Hanging Indentation and Closing Brackets in Python
According to the PEP 8 standard, there are two ways to line up the closing braces, brackets, or parentheses. First, line it up...
Read more >Do you put braces ("{") in a new line or on the same line? : r/java
I personally prefer putting the opening bracket at the end of line because it makes my code look more compact. I'm less disturbed...
Read more >object-curly-newline - ESLint - Pluggable JavaScript Linter
Options. This rule has either a string option: "always" requires line breaks after opening and before closing braces; "never ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
+1 for make ending bracket on a new line feature
Ah. Okay. 😄 Well, the formatting you suggest is not currently part of the beautifier. I’ve marked it as a future enhancement.