We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
ljharb
Learn more about funding links in repositories.
Report abuse
no-import-module-exports
1 parent 790d9af commit dfc5b54Copy full SHA for dfc5b54
src/rules/no-import-module-exports.js
@@ -14,9 +14,9 @@ function getEntryPoint(context) {
14
}
15
16
function findScope(context, identifier) {
17
- const scopeManager = context.getSourceCode().scopeManager;
+ const { scopeManager } = context.getSourceCode();
18
19
- return scopeManager.scopes.slice().reverse().find((scope) => scope.variables.some(variable => variable.identifiers.some((node) => node.name === identifier)));
+ return scopeManager && scopeManager.scopes.slice().reverse().find((scope) => scope.variables.some(variable => variable.identifiers.some((node) => node.name === identifier)));
20
21
22
module.exports = {
0 commit comments