You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am working on a project with TypeScript and React (using .tsx files). I have a problem with the style/jsx-child-element-spacing rule. This rule adds extra {' '} and line breaks between text and JSX expressions in my code.
I installed the ESLint extension for VSCode and followed all the recommended settings in the README.
When I write JSX like this:
<buttononClick={()=>setCount(count=>count+1)}type="button">
count is {count}</button>
ESLint reformats it to:
<buttononClick={()=>setCount(count=>count+1)}type="button">
count is
{' '}{count}</button>
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am working on a project with TypeScript and React (using .tsx files). I have a problem with the
style/jsx-child-element-spacing
rule. This rule adds extra{' '}
and line breaks between text and JSX expressions in my code.I installed the ESLint extension for VSCode and followed all the recommended settings in the README.
When I write JSX like this:
ESLint reformats it to:
here is my setting
package.json
eslint.config.js
Beta Was this translation helpful? Give feedback.
All reactions