eslint-config-preact icon indicating copy to clipboard operation
eslint-config-preact copied to clipboard

"Fragment is never used" error

Open marksyzm opened this issue 4 years ago • 1 comments

When running jest tests against files that have shorthand Fragment usage, they complain that Fragment doesn't exist. But when putting that in, eslint complains that Fragment is never used.

I then can't use the shorthand Fragments (<></>).

marksyzm avatar Apr 27 '20 12:04 marksyzm

I would love to work on this issue, however by my understanding it's not as simple as adding "fragment": "Fragment" to the react settings since that would be understood as h.Fragment and not the actual Fragment import. If there is a good approach to do this, I would like to create a PR but so far I would be unsure where to start here. With a little nudge, I am more than willing to invest some time into this!

mvarendorff avatar Apr 10 '21 23:04 mvarendorff