Repository navigation
⬆️ build(deps-dev): move to eslint 10 and declare @eslint/js - #82
Merged
Merged
Conversation
Dependabot's eslint 10 pull request (#70) failed lint outright: Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@eslint/js' imported from eslint.config.mjs eslint.config.mjs has always imported @eslint/js, but it was never a declared devDependency — under eslint 9 it arrived transitively, because eslint depended on it. eslint 10 does not (its @eslint/* dependencies are config-array, config-helpers, core and plugin-kit), so the import had nothing to resolve to. Declaring it is the fix, and it is worth declaring regardless: a config file's own imports should not rely on another package's dependency tree. @eslint/js versions independently of eslint, so the ceiling here is ^10.0.1, not ^10.12.x — there is no such release. Also ignores .claude/** in the lint config. Agent worktrees are whole checkouts of this repository living inside it: gitignored, but not invisible to a linter walking the tree. Each carries its own reference/preview.jsx, which the existing relative `reference/preview.jsx` ignore does not match, so a developer with worktrees present saw 534 errors from six copies of a generated file while CI — which never has those directories — stayed green. Supersedes #70, which also needed a lockfile rebase after the jsdom bump in #71 landed. Verified under Node 22.13.0: eslint 10 reports 0 errors and the one pre-existing exhaustive-deps warning that eslint 9 also reported, so the upgrade surfaces nothing new. format:check, typecheck, the full unit suites (313 tests), check-docs, check-peer-floor and the token and preview drift checks all pass. No changeset: scripts/check-changeset.mjs confirms no package source changed. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
GitHub's update-branch merge textually combined package-lock.json, so npm ci failed (Missing: lodash.merge@4.6.2). Regenerated from main's lockfile with npm install, so only the ESLint 10 tree and the dedupes it allows change. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
Supersedes #70. Dependabot's eslint 10 bump failed its lint step outright, and the cause is a dependency this repo uses but never declared.
eslint.config.mjs:1has always doneimport js from "@eslint/js", but@eslint/jswas never indevDependencies— under eslint 9 it arrived transitively, because eslint itself depended on it. eslint 10 no longer does (its@eslint/*dependencies areconfig-array,config-helpers,coreandplugin-kit), so the import had nothing to resolve to. Declaring it is the fix, and it is worth declaring on its own merits: a config file's imports should not depend on another package's dependency tree.Worth knowing:
@eslint/jsversions independently ofeslint. The current release is10.0.1; there is no10.12.x, so^10.12.0would not install.What changes
eslint→^10.12.0, and@eslint/jsdeclared at^10.0.1..claude/**added to the lint config'signores.The
.claude/**ignorenpm run linton a cleanmainreported 534 errors, every one from six stale.claude/worktrees/*/reference/preview.jsxcopies. Agent worktrees are whole checkouts of this repository living inside it: gitignored, but not invisible to a linter walking the tree.reference/preview.jsxis ignored as a root-anchored relative path, so it matches only the repo's own copy, never the worktrees'. CI never has those directories, which is why CI stayed green while local lint was unusable.Tests
Verified under Node 22.13.0:
eslint .exits 0 — 0 errors and onereact-hooks/exhaustive-depswarning that eslint 9 reported too, so the upgrade surfaces nothing new.format:check,typecheck, the full unit suites (313 tests),check-docs(15 assertions),check-peer-floor, and the token and preview drift checks all pass.scripts/check-changeset.mjs— the gate that landed in 🔧 ci: fail the changeset gate closed and require the PR to add one #78 — confirms no package source changed.Notes for the reviewer
typescript-eslint@8.68.0andeslint-plugin-react-hooks@7.1.1both list^10.0.0), so nothing else needed moving.main. ⬆️ Bump eslint from 9.39.5 to 10.12.0 #70 additionally conflicted onpackage-lock.jsonafter the jsdom bump in build(deps-dev): Bump jsdom from 25.0.1 to 30.1.2 #71 landed, so it needed a rebase regardless.🤖 Generated with Claude Code