diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-15 03:35:49 +0000 |
commit | d8bbc7858622b6d9c278469aab701ca0b609cddf (patch) | |
tree | eff41dc61d9f714852212739e6b3738b82a2af87 /tools/lint/eslint/eslint-plugin-mozilla/lib/globals.js | |
parent | Releasing progress-linux version 125.0.3-1~progress7.99u1. (diff) | |
download | firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.tar.xz firefox-d8bbc7858622b6d9c278469aab701ca0b609cddf.zip |
Merging upstream version 126.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
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, |