Closed Bug 1881696 Opened 11 months ago Closed 3 months ago

Add ESLint flat config support to eslint-plugin-mozilla

Categories

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

Tracking

(firefox133 fixed)

RESOLVED FIXED
133 Branch
Tracking Status
firefox133 --- fixed

People

(Reporter: standard8, Assigned: standard8)

References

(Blocks 2 open bugs)

Details

Attachments

(2 files)

As part of migrating to ESLint v9, we'll need to update eslint-plugin-mozilla to support the new flat configuration.

There are instructions on how to do this here: https://eslint.org/docs/next/extend/plugin-migration-flat-config

Blocks: eslint-flat
Depends on: 1917529
Depends on: 1917532

This makes it easier for subscribers of eslint-plugin-mozilla to use it more generally as a set of recommended
rules. The only environment definitions are for mozilla-specific file types, where we should be safe to specify
them.

Assignee: nobody → standard8
Status: NEW → ASSIGNED

This provides additional "flat/...." configurations which work with the flat config of ESLint. The changes in recommended.js make it easier to handle the two different types of configuration. The changes in index.js are to ensure that the resultant configurations are correct for legacy or flat configs. The index.js changes also inject the plugin object back into itself, as required by ESLint.

Once we have switched mozilla-central to flat configuration, we can drop support for the legacy config.

Pushed by mbanner@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/1489623017f8 Rework the ESLint environment so that eslint-plugin-mozilla is not enforcing the environment everywhere. r=frontend-codestyle-reviewers,Gijs https://hg.mozilla.org/integration/autoland/rev/f95d44008654 Make the eslint-plugin-mozilla recommended configuration work with the ESLint flat config. r=frontend-codestyle-reviewers,mossop
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 133 Branch
See Also: → 1925771
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: