build(deps-dev): bump ESLint to v10 with flat config#345
Open
caugner wants to merge 2 commits into
Open
Conversation
ESLint v10 removes eslintrc support, so move the inline `eslintConfig` from `package.json` to a standalone `eslint.config.mjs` flat config. Add `@eslint/js` and `globals` (required by flat config) and bump `typescript-eslint` for `eslint` v10 peer compatibility. Drop `.eslintignore` in favour of the flat config's `ignores`.
The flat config now lints `.js`/`.mjs` files (`updates/src/*.js` and `eslint.config.mjs`), matching `npm run lint`'s `eslint .`. Extend the pre-commit hook glob so those files are checked on commit too, keeping the hook aligned with the full lint run.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Bump
eslintfrom v8 to v10 and move the configuration out ofpackage.json'seslintConfigkey into a standaloneeslint.config.mjsflat config.eslintto^10,typescript-eslintto^8.64(foreslintv10 peer compatibility).@eslint/jsandglobals(required by flat config)..eslintignorein favour of the flat config'signores.Motivation
Ensure the linter stays on a supported major. ESLint v10 removes support for the legacy eslintrc format entirely, so migrating to flat config is required to upgrade.
Additional details
Related issues and pull requests
Part of mdn/fred#1291.