Update ESLint to v10 and eslint-plugin-n to v18 - #1013
Merged
Merged
Conversation
- Use optional catch binding where the caught error is unused (no-unused-vars now checks caught errors by default) - Remove initial values and assignments that are never read (no-useless-assignment is now part of eslint:recommended) - Remove eslint-disable comments that no longer suppress anything No behavior changes. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Migrates from .eslintrc to flat config (eslint.config.js), required by ESLint 9+. @mapbox/eslint-config-mapbox (latest 5.1.0) only supports ESLint 8 and eslint-plugin-n 17, so its node/base rules are now defined directly in eslint.config.js alongside the existing repo rules. Formatting rules deprecated in ESLint core are taken from @stylistic/eslint-plugin with the same options. A lint of a file with deliberate violations reports the same problems as before, plus the two checks added to ESLint's recommended rules since v8 (no-useless-assignment, caught errors in no-unused-vars). Dropping eslint-config-mapbox also removes its typescript-eslint peer dependencies, so the typescript-eslint overrides are no longer needed. Supersedes mapbox#1004 and mapbox#1007. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
cclauss
approved these changes
Oct 5, 2026
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.
Updates ESLint to v10 and eslint-plugin-n to v18, as requested in #1011. Supersedes #1004 and #1007.
These need to go together: @mapbox/eslint-config-mapbox (latest 5.1.0) requires
eslint ^8.57.0andeslint-plugin-n ^17.9.0, and ESLint 9+ no longer supports.eslintrc.Changes
.eslintrcwith flat configeslint.config.js.base.js/node.jsrules (eslint:recommended plus ~25 rules and 4n/rules) are now defined directly ineslint.config.js, alongside the existing repo-specific rules.@stylistic/eslint-pluginwith the same options, so they won't break when ESLint removes them.eslint-disablecomments are dropped..npmignore: excludeeslint.config.jsinstead of.eslintrc.Verification
npm run lintpasses (now also lintseslint.config.js).no-useless-assignmentand caught errors inno-unused-vars.^20.19 || ^22.13 || >=24for linting only; all workflows lint on Node 22+.