@@ -979,7 +979,7 @@ const getIndentAndJSDoc = function (lines, jsdocNode) {
979
979
* @param {boolean } additiveContexts
980
980
*/
981
981
const iterateAllJsdocs = ( iterator , ruleConfig , contexts , additiveContexts ) => {
982
- const trackedJsdocs = [ ] ;
982
+ const trackedJsdocs = new Set ( ) ;
983
983
984
984
let handler ;
985
985
let settings ;
@@ -1107,7 +1107,7 @@ const iterateAllJsdocs = (iterator, ruleConfig, contexts, additiveContexts) => {
1107
1107
}
1108
1108
1109
1109
const commentNode = getJSDocComment ( sourceCode , node , settings ) ;
1110
- if ( trackedJsdocs . includes ( commentNode ) ) {
1110
+ if ( trackedJsdocs . has ( commentNode ) ) {
1111
1111
return ;
1112
1112
}
1113
1113
@@ -1122,15 +1122,15 @@ const iterateAllJsdocs = (iterator, ruleConfig, contexts, additiveContexts) => {
1122
1122
return ;
1123
1123
}
1124
1124
1125
- trackedJsdocs . push ( commentNode ) ;
1125
+ trackedJsdocs . add ( commentNode ) ;
1126
1126
callIterator ( context , node , [
1127
1127
commentNode ,
1128
1128
] , state ) ;
1129
1129
} ,
1130
1130
'Program:exit' ( ) {
1131
1131
const allComments = sourceCode . getAllComments ( ) ;
1132
1132
const untrackedJSdoc = allComments . filter ( ( node ) => {
1133
- return ! trackedJsdocs . includes ( node ) ;
1133
+ return ! trackedJsdocs . has ( node ) ;
1134
1134
} ) ;
1135
1135
1136
1136
callIterator ( context , null , untrackedJSdoc , state , true ) ;
0 commit comments