Closed Bug 1772358 Opened 3 years ago Closed 3 years ago

Create an ESLint rule to reject defining lazy getter for Services etc

Categories

(Developer Infrastructure :: Lint and Formatting, task)

Tracking

(firefox103 fixed)

RESOLVED FIXED
103 Branch
Tracking Status
firefox103 --- fixed

People

(Reporter: arai, Assigned: arai)

References

Details

Attachments

(1 file)

Some system modules (JSM) are loaded in early startup and not necessarily be lazy getter.
bug 1608279 and depending patches discovered that there are too many cases that those modules are defined as lazy getter.
we should have an ESLint rule that rejects such definition.

This can be implemented by extending bug 1773747 rule, to always mark Services etc eager.

Depends on: 1773747

bug 1773747 is about all lazy getters, not only about import, so the logic is slightly different, and adding separate rule is better.

No longer depends on: 1773747
Assignee: nobody → arai.unmht
Status: NEW → ASSIGNED
Depends on: 1775250
Depends on: 1775251
Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/9779ccacc2d7 Add ESLint rule to reject defining lazy getters for always available modules. r=Standard8
Status: ASSIGNED → RESOLVED
Closed: 3 years ago
Resolution: --- → FIXED
Target Milestone: --- → 103 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: