Linting jsxNoCommentTextnodes
MODIFY
packages/@romejs/js-compiler/lint/rules/index.ts
packages/@romejs/js-compiler/lint/rules/index.ts
@@ -100,7 +100,6 @@ export const lintTransforms = [
undeclaredVariables,
unsafeNegation,
unusedVariables,
-
// React lint rules.
...reactLintTransforms,
];

MODIFY
packages/@romejs/js-compiler/lint/rules/react/index.ts
packages/@romejs/js-compiler/lint/rules/react/index.ts
import jsxNoCommentTextnodes from './jsxNoCommentTextnodes';
// Add transforms in alphabetical order.
-export const reactLintTransforms = [
- jsxNoCommentTextnodes,
-];
+export const reactLintTransforms = [jsxNoCommentTextnodes];

MODIFY
packages/@romejs/js-compiler/lint/rules/react/jsxNoCommentTextnodes.test.md
packages/@romejs/js-compiler/lint/rules/react/jsxNoCommentTextnodes.test.md
**DO NOT MODIFY**. This file has been autogenerated. Run `rome test packages/@romejs/js-compiler/lint/rules/react/jsxNoCommentTextnodes.test.ts --update-snapshots` to update.
-## `case single statement`
+## `jsx no comment textnodes`
### `0`

MODIFY
packages/@romejs/js-compiler/lint/rules/react/jsxNoCommentTextnodes.test.ts
packages/@romejs/js-compiler/lint/rules/react/jsxNoCommentTextnodes.test.ts
@@ -9,7 +9,7 @@ import {test} from 'rome';
import {testLintMultiple} from '../../testHelpers';
test(
- 'case single statement',
+ 'jsx no comment textnodes',
async (t) => {
await testLintMultiple(
t,

MODIFY
packages/@romejs/js-compiler/lint/rules/react/jsxNoCommentTextnodes.ts
packages/@romejs/js-compiler/lint/rules/react/jsxNoCommentTextnodes.ts
@@ -16,7 +16,10 @@ export default {
if (node.type === 'JSXText') {
if (/^\s*\/(\/|\*)/m.test(node.value)) {
- path.context.addNodeDiagnostic(node, descriptions.LINT.REACT_JSX_NO_COMMENT_TEXTNODES);
+ path.context.addNodeDiagnostic(
+ node,
+ descriptions.LINT.REACT_JSX_NO_COMMENT_TEXTNODES,
+ );
}
}

Linting jsxNoCommentTextnodes