build(deps-dev): bump ESLint to v10#29933
Draft
caugner wants to merge 5 commits into
Draft
Conversation
The plugin is listed in `devDependencies` but is never referenced in `eslint.config.js`. It is also long-deprecated (superseded by `eslint-plugin-n`) and caps its `eslint` peer at older majors, which would obstruct an ESLint 10 upgrade.
Contributor
|
Tip: Review these changes grouped by change (recommended for most PRs), or grouped by feature (for large PRs). |
Replace `eslint-plugin-import` with the maintained fork `eslint-plugin-import-x`. Upstream `eslint-plugin-import` caps its `eslint` peer at `^9` with no ESLint 10 release, whereas `eslint-plugin-import-x@4.17.0` supports `^10.0.0`, unblocking the upcoming ESLint 10 bump. All `import/*` rules and the resolver setting map 1:1 to the `import-x/*` namespace. The manual plugin registration is dropped because `plugin:import-x/recommended` already defines the namespace, which the stricter config array would otherwise reject as a redefine.
Bump `eslint` `~9.39.1` → `~10.5.0`, `@eslint/js` → `^10.0.1`, `eslint-plugin-unicorn` `^65` → `^69`, and `eslint-plugin-promise` `~7.2.1` → `~7.3.0`. All remaining ESLint plugins already declare `^10` support, so no further bumps are required.
Pass the caught error as `cause` to the wrapping `Error` in `getDiff` so the original failure is preserved in the error chain. Also required by ESLint 10's `preserve-caught-error` recommended rule.
ESLint 10 promotes `no-useless-assignment` into `eslint:recommended`. It flags intentional dead stores that document intent (e.g. the `previousKey` resets in `scripts/diff-flat.js`); satisfying it would require out-of-scope behavioral changes, so disable it ahead of the ESLint 10 bump.
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.
Summary
Bump ESLint to v10. The blocker was
eslint-plugin-import, whoseeslintpeer is capped at^9with no v10 release, so it is replaced with the maintained forkeslint-plugin-import-x. Split into focused commits:eslint-plugin-node(never referenced ineslint.config.js).eslint-plugin-import→eslint-plugin-import-x(^4.17.0, the first release supporting ESLint^10). Allimport/*rules and the resolver setting map 1:1 to theimport-x/*namespace.causewhen re-throwing inscripts/release/changes.js(required by ESLint 10's newpreserve-caught-errorrule).no-useless-assignment(new ineslint:recommended); it flags intentional dead stores that would need out-of-scope behavioral changes.eslint~9.39.1→~10.5.0,@eslint/js→^10.0.1,eslint-plugin-unicorn^65→^69,eslint-plugin-promise~7.2.1→~7.3.0.Test results and supporting details
npm testpasses: ESLint reports 0 errors,tsc --noEmitpasses, and all 300 unit tests pass.npm installresolves with noERESOLVEpeer conflicts.Related issues
Part of mdn/fred#1291.