File tree Expand file tree Collapse file tree 1 file changed +2
-4
lines changed
packages/plugins/eslint-plugin-react-x/src/rules Expand file tree Collapse file tree 1 file changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -36,6 +36,7 @@ export default createRule<[], MessageID>({
3636 } ,
3737 name : RULE_NAME ,
3838 create ( context ) {
39+ if ( ! context . sourceCode . getText ( ) . includes ( "key=" ) ) return { } ;
3940 const keyedEntries : Map < TSESTree . Node , KeyedEntry > = new Map ( ) ;
4041 function isKeyValueEqual (
4142 a : TSESTree . JSXAttribute ,
@@ -44,10 +45,7 @@ export default createRule<[], MessageID>({
4445 const aValue = a . value ;
4546 const bValue = b . value ;
4647 if ( aValue === null || bValue === null ) return false ;
47- return VAR . isNodeValueEqual ( aValue , bValue , [
48- context . sourceCode . getScope ( aValue ) ,
49- context . sourceCode . getScope ( bValue ) ,
50- ] ) ;
48+ return AST . isNodeEqual ( aValue , bValue ) ;
5149 }
5250 return {
5351 "JSXAttribute[name.name='key']" ( node : TSESTree . JSXAttribute ) {
You can’t perform that action at this time.
0 commit comments