@@ -694,8 +694,10 @@ const getUtils = (
694
694
indent ,
695
695
) => {
696
696
const ancestors = /** @type {import('eslint').Rule.Node[] } */ ( context . getAncestors ( ) ) ;
697
+
698
+ // istanbul ignore next -- Fallback to deprecated method
697
699
const {
698
- sourceCode,
700
+ sourceCode = context . getSourceCode ( ) ,
699
701
} = context ;
700
702
701
703
const utils = /** @type {Utils } */ ( getBasicUtils ( context , settings ) ) ;
@@ -2149,8 +2151,9 @@ const iterateAllJsdocs = (iterator, ruleConfig, contexts, additiveCommentContext
2149
2151
* @returns {void }
2150
2152
*/
2151
2153
const callIterator = ( context , node , jsdocNodes , state , lastCall ) => {
2154
+ // istanbul ignore next -- Fallback to deprecated method
2152
2155
const {
2153
- sourceCode,
2156
+ sourceCode = context . getSourceCode ( ) ,
2154
2157
} = context ;
2155
2158
const {
2156
2159
lines,
@@ -2262,8 +2265,9 @@ const iterateAllJsdocs = (iterator, ruleConfig, contexts, additiveCommentContext
2262
2265
return {
2263
2266
// @ts -expect-error ESLint accepts
2264
2267
create ( context ) {
2268
+ // istanbul ignore next -- Fallback to deprecated method
2265
2269
const {
2266
- sourceCode,
2270
+ sourceCode = context . getSourceCode ( ) ,
2267
2271
} = context ;
2268
2272
settings = getSettings ( context ) ;
2269
2273
if ( ! settings ) {
@@ -2340,8 +2344,9 @@ const iterateAllJsdocs = (iterator, ruleConfig, contexts, additiveCommentContext
2340
2344
const checkFile = ( iterator , ruleConfig ) => {
2341
2345
return {
2342
2346
create ( context ) {
2347
+ // istanbul ignore next -- Fallback to deprecated method
2343
2348
const {
2344
- sourceCode,
2349
+ sourceCode = context . getSourceCode ( ) ,
2345
2350
} = context ;
2346
2351
const settings = getSettings ( context ) ;
2347
2352
if ( ! settings ) {
@@ -2459,8 +2464,9 @@ export default function iterateJsdoc (iterator, ruleConfig) {
2459
2464
}
2460
2465
}
2461
2466
2467
+ // istanbul ignore next -- Fallback to deprecated method
2462
2468
const {
2463
- sourceCode,
2469
+ sourceCode = context . getSourceCode ( ) ,
2464
2470
} = context ;
2465
2471
const {
2466
2472
lines,
0 commit comments