Closed Bug 1795880 Opened 2 years ago Closed 2 years ago

Add an ESLint rule to enforce using static imports where possible

Categories

(Developer Infrastructure :: Lint and Formatting, task, P2)

Tracking

(firefox108 fixed)

RESOLVED FIXED
Tracking Status
firefox108 --- fixed

People

(Reporter: standard8, Assigned: standard8)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

We have various places where we are now not using a static import ... from ... where we could be (we're using ChromeUtils.importESModule instead).

I'm working on a rule to report these instances and automatically fix them.

We need to make sure this only applies to top-level, i.e. not inside block, function nor conditional expressions.

We'll need to do this after bug 1795873 is fixed as otherwise there will be some test failures.

Pushed by mbanner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/98e4ac853eab Add an ESLint rule to enforce using static imports where possible. r=arai,geckoview-reviewers,m_kato
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: