-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rule proposal: jsx-tag-spacing #693
Comments
I'm a strong +1 on this - there should never be a space between |
It also turns out that |
Also |
I can implement that, but I think it should be a separate rule. This one concerns itself with space in the opener/closer itself, while the other rule would worry about whitespace between the opener and the component name (analogous to jsx-space-before-closing). |
Per discussion with @ljharb on the babel slack: Merge this proposed rule with {
closingSlash: 'never', // internal space between the "</" and "/>" tokens, e.g. "< /" would warn
beforeClosing: 'always', // same thing as the current jsx-space-before-closing option
afterOpening: 'never', // same thing as jsx-space-before-closing, but right after the "<" or "</"
}
Each suboption would have an |
Let's also rename this rule to |
Because |
[new] Add jsx-tag-spacing rule (Fixes #693)
For some reason,
/ >
is valid JSX, as is/
followed by any kind of whitespace until the>
. This rule would require that the self-closing terminator is always written as an atomic/>
.Not having a check for this also allows for funny workarounds for jsx-closing-bracket-location, such as this (when using
after-props
):Update: #693 (comment)
The text was updated successfully, but these errors were encountered: