diff options
Diffstat (limited to 'tools/lint/eslint/eslint-plugin-mozilla/lib/globals.js')
-rw-r--r-- | tools/lint/eslint/eslint-plugin-mozilla/lib/globals.js | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/tools/lint/eslint/eslint-plugin-mozilla/lib/globals.js b/tools/lint/eslint/eslint-plugin-mozilla/lib/globals.js index bbc1f9bed8..4d894b58cf 100644 --- a/tools/lint/eslint/eslint-plugin-mozilla/lib/globals.js +++ b/tools/lint/eslint/eslint-plugin-mozilla/lib/globals.js @@ -634,8 +634,8 @@ module.exports = { let globalScope; let parser = { - Program() { - globalScope = context.getScope(); + Program(node) { + globalScope = helpers.getScope(context, node); }, }; let filename = context.getFilename(); @@ -651,10 +651,14 @@ module.exports = { for (let type of Object.keys(GlobalsForNode.prototype)) { parser[type] = function (node) { if (type === "Program") { - globalScope = context.getScope(); + globalScope = helpers.getScope(context, node); helpers.addGlobals(extraHTMLGlobals, globalScope); } - let globals = handler[type](node, context.getAncestors(), globalScope); + let globals = handler[type]( + node, + helpers.getAncestors(context, node), + globalScope + ); helpers.addGlobals( globals, globalScope, |