File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -23,9 +23,9 @@ module.exports = {
2323 * @returns {string | undefined } The name of the module the identifier was imported from, if it was imported
2424 */
2525function getSourceModuleNameForIdentifier ( context , node ) {
26+ const { ast } = context . sourceCode ?? context . getSourceCode ( ) ;
2627 const sourceModuleName = getSourceModuleName ( node ) ;
27- const [ program ] = context . getAncestors ( node ) ;
28- const importDeclaration = program . body
28+ const importDeclaration = ast . body
2929 . filter ( isImportDeclaration )
3030 . find ( ( importDeclaration ) =>
3131 importDeclaration . specifiers . some ( ( specifier ) => specifier . local . name === sourceModuleName )
Original file line number Diff line number Diff line change 5959 "coverageThreshold" : {
6060 "global" : {
6161 "branches" : 95 ,
62- "functions" : 99 ,
62+ "functions" : 98.95 ,
6363 "lines" : 98 ,
6464 "statements" : 98
6565 }
You can’t perform that action at this time.
0 commit comments