Oxlint version
1.79.0
Command
oxlint --react-plugin \
-D react/jsx-curly-brace-presence \
--fix repro.tsx
No configuration file is used.
What happened?
Given:
<Markdown content={`\\* Want to learn more`} />
Oxlint produces:
<Markdown content="\\* Want to learn more" />
The original template literal passes one backslash at runtime. Backslashes in a quoted JSX attribute are literal, so the fixed code passes two backslashes.
The fixer therefore changes the runtime value while using the standard --fix option.
Expected behavior
The fixer should leave the expression unchanged or otherwise preserve its runtime value. If it converts the expression into a quoted JSX attribute, the result should contain one source backslash:
<Markdown content="\* Want to learn more" />
Reproduction
https://github.com/selenehyun/oxlint-jsx-curly-brace-presence-backslash-repro
npm install
npm run reproduce
Oxlint version
1.79.0
Command
No configuration file is used.
What happened?
Given:
Oxlint produces:
The original template literal passes one backslash at runtime. Backslashes in a quoted JSX attribute are literal, so the fixed code passes two backslashes.
The fixer therefore changes the runtime value while using the standard
--fixoption.Expected behavior
The fixer should leave the expression unchanged or otherwise preserve its runtime value. If it converts the expression into a quoted JSX attribute, the result should contain one source backslash:
Reproduction
https://github.com/selenehyun/oxlint-jsx-curly-brace-presence-backslash-repro