jsx-tag-spacing doesn't allow for forbid a space before ">" in a start tag
See original GitHub issueIn our project we have the need for forbidding spaces before the “>” symbol in a start tag. For example the following should not be allowed:
<RectangleSelection
minWidth={150}
minHeight={50} >
{children}
</RectangleSelection>
In comparison the following should not result in an error:
<RectangleSelection
minWidth={150}
minHeight={50}>
{children}
</RectangleSelection>
Issue Analytics
- State:
- Created 6 years ago
- Comments:8 (5 by maintainers)
Top Results From Across the Web
How to prevent VS Code from adding space before self ...
We have ESlint and it forbids us to add space before self-closing JSX-tag, but when I format .jsx file within VS Code it...
Read more >ESLint: A space is required before closing bracket (react/jsx ...
Hi,. When Importing code style from ESLint could you please add import parameter "Code Style -> HTML -> Other -> Spaces -> In...
Read more >HTML Indentation and Spacing - LearnHowToProgram.com
This means the space after the opening <h1> tag and before the start of "Here's", and the space after the period "." and...
Read more >Is it better to use spaces or not after a tag? - Codecademy
As tags go, spaces are superfluous. Leading spaces are ignored and trailing spaces mean nothing. The best practice is to not use spaces...
Read more >space-in-brackets - ESLint - Pluggable JavaScript Linter
An object literal may be used as a third array item to specify spacing exceptions. These exceptions work in the context of the...
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 Free
Top 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
Would you be up for making a PR for this feature? I had a quick look today, and it shouldn’t be that complicated as the code will be quite similar to how the current
beforeSelfClosing
option works.I’m ready to assist if needed.
We’ll need to add a new option to support this though, I don’t know what the name should be. Perhaps simply
beforeClosing
?npm list -g --depth=0
doesn’t show anyeslint
modules, and the repo has no node_modules in a parent folderif I write
<Searchbar >
it propose me to fix to<Searchbar >
, not<Searchbar>
(which is also valid, but I’d like to enforce this convention)Edit: well, it seems I forgot to uncomment
"beforeClosing": "never"
, it’s working, sorry