File tree 1 file changed +3
-2
lines changed
1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -95,14 +95,15 @@ module.exports = {
95
95
ruleReportsSuggestions = true ;
96
96
}
97
97
} ,
98
- 'Program:exit' ( ) {
98
+ 'Program:exit' ( node ) {
99
+ const scope = sourceCode . getScope ?. ( node ) || context . getScope ( ) ; // TODO: just use sourceCode.getScope() when we drop support for ESLint < v9.0.0
99
100
const metaNode = ruleInfo && ruleInfo . meta ;
100
101
const hasSuggestionsProperty = utils
101
102
. evaluateObjectProperties ( metaNode , scopeManager )
102
103
. find ( ( prop ) => utils . getKeyName ( prop ) === 'hasSuggestions' ) ;
103
104
const hasSuggestionsStaticValue =
104
105
hasSuggestionsProperty &&
105
- getStaticValue ( hasSuggestionsProperty . value , context . getScope ( ) ) ;
106
+ getStaticValue ( hasSuggestionsProperty . value , scope ) ;
106
107
107
108
if ( ruleReportsSuggestions ) {
108
109
if ( ! hasSuggestionsProperty ) {
You can’t perform that action at this time.
0 commit comments