Skip to content

Commit 4291bd1

Browse files
committed
perf(plugins/x): improve perf of 'no-forward-ref'
1 parent 8f350f0 commit 4291bd1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

packages/plugins/eslint-plugin-react-x/src/rules/no-forward-ref.ts

+1
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ export default createRule<[], MessageID>({
2222
},
2323
name: RULE_NAME,
2424
create(context) {
25+
if (!context.sourceCode.text.includes("forwardRef")) return {};
2526
const { version } = normalizeSettings(decodeSettings(context.settings));
2627
if (compare(version, "19.0.0", "<")) return {};
2728
return {

0 commit comments

Comments
 (0)