@@ -51,11 +51,11 @@ const noRepeatedMemberAccess = createRule({
5151 "Member chain '{{ chain }}' accessed {{ count }} times. Extract to variable." ,
5252 } ,
5353 } ,
54- defaultOptions : [ { minOccurrences : 2 } ] ,
54+ defaultOptions : [ { minOccurrences : 3 } ] ,
5555
5656 create ( context , [ options ] ) {
5757 const sourceCode = context . sourceCode ;
58- const minOccurrences = options ? .minOccurrences ?? 2 ;
58+ const minOccurrences = options . minOccurrences ;
5959
6060 // Track which chains have already been reported to avoid duplicate reports
6161 const reportedChains = new Set < string > ( ) ;
@@ -193,7 +193,7 @@ const noRepeatedMemberAccess = createRule({
193193 return result ;
194194 }
195195
196- // Tracks which chains are modified in code to avoid incorrect optimizations
196+ // Tracks which chains are modified in code
197197 //
198198 // Examples of modifications:
199199 // 1. obj.prop = value; // Direct assignment
@@ -259,9 +259,6 @@ const noRepeatedMemberAccess = createRule({
259259 // Skip single-level chains
260260 if ( ! chain . includes ( "." ) ) continue ;
261261
262- // Skip any chain that contains array access
263- if ( chain . includes ( "[" ) && chain . includes ( "]" ) ) continue ;
264-
265262 const record = scopeData . chains . get ( chain ) || {
266263 count : 0 ,
267264 nodes : [ ] ,
0 commit comments