Clean up react rules
MODIFY
packages/@romejs/js-compiler/lint/rules/index.ts
packages/@romejs/js-compiler/lint/rules/index.ts
@@ -51,7 +51,7 @@ import sparseArray from './sparseArray';
import undeclaredVariables from './undeclaredVariables';
import unsafeNegation from './unsafeNegation';
import unusedVariables from './unusedVariables';
-import {reactLintTransforms} from './react';
+import {reactLintTransforms as reactLintRules} from './react';
// Add transforms in alphabetical order.
export const lintTransforms = [
@@ -100,6 +100,5 @@ export const lintTransforms = [
undeclaredVariables,
unsafeNegation,
unusedVariables,
- // React lint rules.
- ...reactLintTransforms,
+ ...reactLintRules,
];

MODIFY
packages/@romejs/js-compiler/lint/rules/react/index.ts
packages/@romejs/js-compiler/lint/rules/react/index.ts
-import jsxNoCommentTextnodes from './jsxNoCommentTextnodes';
+/**
+ * Copyright (c) Facebook, Inc. and its affiliates.
+ *
+ * This source code is licensed under the MIT license found in the
+ * LICENSE file in the root directory of this source tree.
+ */
+
+import jsxNoCommentText from './jsxNoCommentText';
// Add transforms in alphabetical order.
-export const reactLintTransforms = [jsxNoCommentTextnodes];
+export const reactLintTransforms = [jsxNoCommentText];

RENAME
packages/@romejs/js-compiler/lint/rules/react/jsxNoCommentTextnodes.test.ts
packages/@romejs/js-compiler/lint/rules/react/jsxNoCommentText.test.ts
RENAME
packages/@romejs/js-compiler/lint/rules/react/jsxNoCommentTextnodes.ts
packages/@romejs/js-compiler/lint/rules/react/jsxNoCommentText.ts
@@ -10,7 +10,7 @@ import {AnyNode} from '@romejs/js-ast';
import {descriptions} from '@romejs/diagnostics';
export default {
- name: 'jsxNoCommentTextnodes',
+ name: 'jsxNoCommentText',
enter(path: Path): AnyNode {
const {node} = path;
@@ -18,7 +18,7 @@ export default {
if (/^\s*\/(\/|\*)/m.test(node.value)) {
path.context.addNodeDiagnostic(
node,
- descriptions.LINT.REACT_JSX_NO_COMMENT_TEXTNODES,
+ descriptions.LINT.REACT_JSX_NO_COMMENT_TEXT,
);
}
}

Clean up react rules