Linter: useFragmentElement (opposite to useFragmentSyntax) #6905
e965
started this conversation in
Rule suggestion
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Inspired by react/jsx-fragments eslint rule
I really want a rule that enforces writing not a shorthand, but an element mode (
<Fragment />
or<React.Fragment />
.The reason is that I want consistency, because a frequent case of using Fragments is iterating an array, and since it is necessary to use a key there, I have to write the full syntax, which will differ from what the existing rule requires.
Beta Was this translation helpful? Give feedback.
All reactions