File tree 1 file changed +3
-3
lines changed
1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 3
3
import minimatch from 'minimatch' ;
4
4
import includes from 'array-includes' ;
5
5
import groupBy from 'object.groupby' ;
6
- import { getSourceCode } from 'eslint-module-utils/contextCompat' ;
6
+ import { getScope , getSourceCode } from 'eslint-module-utils/contextCompat' ;
7
7
8
8
import importType from '../core/importType' ;
9
9
import isStaticRequire from '../core/staticRequire' ;
@@ -182,10 +182,10 @@ function isCJSExports(context, node) {
182
182
&& node . property . type === 'Identifier'
183
183
&& node . object . name === 'module'
184
184
&& node . property . name === 'exports' ) {
185
- return ( context . sourceCode || context ) . getScope ( node ) . variables . findIndex ( ( variable ) => variable . name === 'module' ) === - 1 ;
185
+ return getScope ( context , node ) . variables . findIndex ( ( variable ) => variable . name === 'module' ) === - 1 ;
186
186
} else if ( node . type === 'Identifier'
187
187
&& node . name === 'exports' ) {
188
- return ( context . sourceCode || context ) . getScope ( node ) . variables . findIndex ( ( variable ) => variable . name === 'exports' ) === - 1 ;
188
+ return getScope ( context , node ) . variables . findIndex ( ( variable ) => variable . name === 'exports' ) === - 1 ;
189
189
}
190
190
}
191
191
You can’t perform that action at this time.
0 commit comments