What version of Oxlint are you using?
1.68.0
What command did you run?
yarn oxlint -c oxlint.config.mjs
What does your .oxlintrc.json (or oxlint.config.ts) config file look like?
import { defineConfig } from 'oxlint';
export default defineConfig({
categories: {
correctness: 'off',
},
plugins: ['react'],
rules: {
'react/jsx-curly-brace-presence': 'error',
},
});
What happened?
This rule ignores comments inside curly braces, but we would like to preserve them.
test.tsx:
<Component name={/* This is a comment */ 'test'} />;
<ComponentA>
{
// This is an another comment
<ComponentB />
}
</ComponentA>;
Output:
× react(jsx-curly-brace-presence): Curly braces are unnecessary here.
╭─[test.tsx:1:42]
1 │ <Component name={/* This is a comment */ 'test'} />;
· ──────
2 │
╰────
help: Replace `{/* This is a comment */ 'test'}` with `"test"`.
× react(jsx-curly-brace-presence): Curly braces are unnecessary here.
╭─[test.tsx:6:9]
5 │ // This is an another comment
6 │ <ComponentB />
· ──────────────
7 │ }
╰────
help: remove the curly braces
What version of Oxlint are you using?
1.68.0
What command did you run?
yarn oxlint -c oxlint.config.mjsWhat does your
.oxlintrc.json(oroxlint.config.ts) config file look like?What happened?
This rule ignores comments inside curly braces, but we would like to preserve them.
test.tsx:
Output: