Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migrate to ESLint flat config #19029

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

nicolo-ribaudo
Copy link
Contributor

Migrate to ESLint flat config

Flat config is the new config system used by ESLint 9. To make the migration easier, they also added flat config support to ESLint 8.

This commit migrates the various ESLint configs in the repository to use the new system, **without** upgrading to ESLint 9 yet.

You can see that the right files are being linted with DEBUG=eslint:flat-eslint npx gulp lint. I tried playing around in various files and it seems like the right rules are being applied.

Ref #17928

Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for doing this!
I've not yet tested this locally, but leaving a couple of comments based on a cursory look at the patch.

eslint.config.mjs Outdated Show resolved Hide resolved
eslint.config.mjs Show resolved Hide resolved
Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems to work fine in local testing, however I've got a couple of minor questions before we land this.

eslint.config.mjs Outdated Show resolved Hide resolved
eslint.config.mjs Show resolved Hide resolved
Flat config is the new config system used by ESLint 9.
To make the migration easier, they also added
flat config support to ESLint 8.

This commit migrates the various ESLint configs in the repository to use
the new system, **without** upgrading to ESLint 9 yet.
Copy link
Collaborator

@Snuffleupagus Snuffleupagus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me, thank you for implementing this.

@Snuffleupagus Snuffleupagus merged commit fe5967c into mozilla:master Nov 12, 2024
9 checks passed
@nicolo-ribaudo nicolo-ribaudo deleted the eslint-flat-config branch November 12, 2024 15:31
@timvandermeij
Copy link
Contributor

Nice work; thank you @nicolo-ribaudo!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants