Closed Bug 1917529 Opened 1 month ago Closed 13 hours ago

Separate out overrides sections of eslint-plugin-mozilla recommended's config into separate configurations

Categories

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

Tracking

(Not tracked)

RESOLVED WONTFIX

People

(Reporter: standard8, Assigned: standard8)

References

(Blocks 1 open bug)

Details

Attachments

(7 obsolete files)

For eslint-plugin-mozilla to work with the flat configuration, we need to separate out the overrides sections of the recommended configuration into their own configurations, as the flat config doesn't allow specification of which files it should apply to.

Depends on: 1917530
Depends on: 1575506

For the time being, let's move this out of eslint-plugin-mozilla. The method for defining globals changes in flat-config/v9
and how we're going to handle that still needs figuring out. To simplify eslint-plugin-mozilla for the time being, it feels
best to move this definition out, and we can reconsider if it is worth a specific configuration later.

Requiring these in eslint-plugin-mozilla seems a bit unnecessary:

  • The html plugin is used as a parser and is only required if a project is parsing html.
  • Similary, we use the recommended config for the JSON parser, and it only applies for JSON files.
  • The prettier option is only required if a project wants to use prettier. Whilst I think we should have prettier for all Mozilla projects, I don't think we need to enforce/require it here.
Depends on: 1919709
Depends on: 1920531
Depends on: 1920532

I'm currently looking at a different approach for the configurations - rather than separating them, separate out the environment parts, and keep the module rule specifications alongside the recommended configuration. I think that'll be a lot better and easier for users of the plugin.

To help simplify landing and what's happening here, I'm moving the remove ../lib and remove peer dependencies parts out to separate bugs, so that I can get those landed and make it easier to work on the other patches.

Comment on attachment 9425571 [details]
Bug 1917529 - Remove unnecessary '../lib' path loading in requires in eslint-plugin-mozilla's index.js. r?#frontend-codestyle-reviewers!

Revision D222623 was moved to bug 1920532. Setting attachment 9425571 [details] to obsolete.

Attachment #9425571 - Attachment is obsolete: true

Comment on attachment 9425576 [details]
Bug 1917529 - Remove html, json and prettier plugin dependencies from eslint-plugin-mozilla. r?#frontend-codestyle-reviewers!

Revision D222628 was moved to bug 1920531. Setting attachment 9425576 [details] to obsolete.

Attachment #9425576 - Attachment is obsolete: true
Depends on: 1920802

Comment on attachment 9425570 [details]
Bug 1917529 - Update node_modules related to ESLint as far as possible. r?#frontend-codestyle-reviewers!

Revision D222622 was moved to bug 1920802. Setting attachment 9425570 [details] to obsolete.

Attachment #9425570 - Attachment is obsolete: true
Attachment #9425575 - Attachment is obsolete: true
Attachment #9425574 - Attachment is obsolete: true
Attachment #9425573 - Attachment is obsolete: true
Attachment #9425572 - Attachment is obsolete: true

I'm abandoning this, as on reflection I think it was the wrong approach.

Status: NEW → RESOLVED
Closed: 13 hours ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: