question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

jsx-tag-spacing doesn't allow for forbid a space before ">" in a start tag

See original GitHub issue

In 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:closed
  • Created 6 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
jseminckcommented, Aug 31, 2017

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 ?

0reactions
caubcommented, Feb 5, 2018

npm list -g --depth=0 doesn’t show any eslint modules, and the repo has no node_modules in a parent folder

if 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

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found