Closed Bug 1779988 Opened 3 years ago Closed 3 years ago

Add ESLint rule that rejects multiple `ChromeUtils.defineESModuleGetters` call on the same object

Categories

(Developer Infrastructure :: Lint and Formatting, task)

Tracking

(firefox105 fixed)

RESOLVED FIXED
105 Branch
Tracking Status
firefox105 --- fixed

People

(Reporter: arai, Assigned: arai)

References

Details

Attachments

(2 files)

Related to bug 1779927.

Calling ChromeUtils.defineESModuleGetters multiple times on the same object is not optimal, and ./mach esmify doesn't cover merging all lazy getter calls into one (bug 1779927 adds some coverage, but it doesn't work if there's other statement in between them).

It's better having an ESLint rule that checks multiple ChromeUtils.defineESModuleGetters calls, at the same level (e.g. top-level, without any branch or block), and rejects it, and also possibly merge them with --fix

Component: XPConnect → Lint and Formatting
Product: Core → Firefox Build System
Assignee: nobody → arai.unmht
Status: NEW → ASSIGNED
Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/5b16f2dec7a3 Part 1: Merge multiple ChromeUtils.defineESModuleGetters calls into one. r=Standard8 https://hg.mozilla.org/integration/autoland/rev/9f72ffc8275d Part 2: Add ESLint rule that rejects multiple `ChromeUtils.defineESModuleGetters` call on the same object. r=Standard8
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 105 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: