File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change 33import  minimatch  from  'minimatch' ; 
44import  includes  from  'array-includes' ; 
55import  groupBy  from  'object.groupby' ; 
6- import  {  getSourceCode  }  from  'eslint-module-utils/contextCompat' ; 
6+ import  {  getScope ,   getSourceCode  }  from  'eslint-module-utils/contextCompat' ; 
77
88import  importType  from  '../core/importType' ; 
99import  isStaticRequire  from  '../core/staticRequire' ; 
@@ -182,10 +182,10 @@ function isCJSExports(context, node) {
182182      &&  node . property . type  ===  'Identifier' 
183183      &&  node . object . name  ===  'module' 
184184      &&  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 ; 
186186  }  else  if  ( node . type  ===  'Identifier' 
187187      &&  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 ; 
189189  } 
190190} 
191191
 
 
   
 
     
   
   
          
    
    
     
    
      
     
     
    You can’t perform that action at this time.
  
 
    
  
    
      
        
     
       
      
     
   
 
    
    
  
 
  
 
     
    
0 commit comments