Closed Bug 1776828 Opened 2 years ago Closed 2 years ago

Support ESM API in convertCallExpressionToGlobals

Categories

(Developer Infrastructure :: Lint and Formatting, task)

Tracking

(firefox104 fixed)

RESOLVED FIXED
104 Branch
Tracking Status
firefox104 --- fixed

People

(Reporter: arai, Assigned: arai)

References

Details

Attachments

(1 file)

https://searchfox.org/mozilla-central/rev/b7642d0089449244d6361680bc619c94bf11725f/tools/lint/eslint/eslint-plugin-mozilla/lib/helpers.js#279-295

/**
 * Attempts to convert an CallExpressions that look like module imports
 * into global variable definitions.
 *
 * @param  {Object} node
 *         The AST node to convert.
 * @param  {boolean} isGlobal
 *         True if the current node is in the global scope.
 *
 * @return {Array}
 *         An array of objects that contain details about the globals:
 *         - {String} name
 *                    The name of the global.
 *         - {Boolean} writable
 *                     If the global is writeable or not.
 */
convertCallExpressionToGlobals(node, isGlobal) {

To support out-of-system-module use of ESM lazy getter APIs, we should support it in the linting.

Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/e0c50a17b0ff Reflect ESM lazy getter to the global. r=Standard8
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 104 Branch
Product: Firefox Build System → Developer Infrastructure
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: