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-closing-bracket-location think of 'space' and 'tab' as the same thing

See original GitHub issue

my config

"react/jsx-indent": ["warn", "tab"],
"react/jsx-indent-props": ["warn", "tab"],
"react/jsx-closing-bracket-location": ["warn", {
  "nonEmpty": "tag-aligned"
}],

my code

        <div
            className={ styles.header_title }
  >
            { props.title }
        </div>

opening tag has 2 tabs, closing bracket has 2 spaces but this case doesn’t have any warning or error.

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
ljharbcommented, Aug 30, 2020

I would expect jsx-closing-bracket-location to be the thing that warns, because jsx-indent would determine where <div is, and then closing-bracket-location would use that to determine where > should be.

1reaction
ljharbcommented, Aug 2, 2020

@Moong0122 yes, anything with the “help wanted” label that doesn’t already have a PR, you can just make a PR for it 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

jsx-closing-bracket-location think of 'space' and 'tab ... - GitHub
I would expect jsx-closing-bracket-location to be the thing that warns, because jsx-indent would determine where <div is, and then closing- ...
Read more >
jsx-closing-bracket-location think of 'space' and 'tab' as the same thing
jsx -closing-bracket-location think of 'space' and 'tab' as the same thing.
Read more >
How to fix "react/jsx-closing-bracket-location" in WebStorm
I was facing this same problem. Here was my code: <input className="input__field input__field--haruki" type="text" id="input-1" ...
Read more >
User and Workspace Settings - Visual Studio Code
You can edit via the Settings editor Workspace tab or open that tab directly with the Preferences: Open Workspace Settings command. Settings editor...
Read more >
How to replace Prettier by ESLint rules ? | by Florian Briand
[Prettier] JSX Brackets can be replaced by [ESLint/React] Jsx-closing-bracket-location which is part of eslint-plugin-react :.
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