Closed
Description
I have the jsx-newline
rule turned on, which when run with the --fix
option, puts line breaks between any comments (including eslint-disable comments) and JSX elements, thus undoing the whole point of using comments.
Let's say I have something like this:
<Element as="header" marginBottom="micro">
{/* eslint-disable-next-line react/jsx-sort-props */}
<Heading as="h6" align="right">
Transaction value
</Heading>
<Element>
The jsx-newline
rule puts a line break between the eslint-disable comment and , therefore causing the eslint-disable-{some rule}
to stop working.
Can we handle putting line breaks between comments & new JSX elements?
I saw something similar in #2926 (which was closed earlier as completed) but that doesn't work properly as of v7.31.10