Skip to content

⬆️ build(deps-dev): move to eslint 10 and declare @eslint/js - #82

Merged
JadRizk merged 3 commits into
mainfrom
claude/eslint-10-with-eslint-js
Oct 11, 2026
Merged

JadRizk merged 3 commits into
mainfrom
claude/eslint-10-with-eslint-js

Conversation

@JadRizk

@JadRizk JadRizk commented Oct 9, 2026

Copy link
Copy Markdown
Owner

Supersedes #70. Dependabot's eslint 10 bump failed its lint step outright, and the cause is a dependency this repo uses but never declared.

Error [ERR_MODULE_NOT_FOUND]: Cannot find package '@eslint/js'
  imported from eslint.config.mjs

eslint.config.mjs:1 has always done import js from "@eslint/js", but @eslint/js was never in devDependencies — under eslint 9 it arrived transitively, because eslint itself depended on it. eslint 10 no longer does (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 on its own merits: a config file's imports should not depend on another package's dependency tree.

Worth knowing: @eslint/js versions independently of eslint. The current release is 10.0.1; there is no 10.12.x, so ^10.12.0 would not install.

What changes

  • eslint → ^10.12.0, and @eslint/js declared at ^10.0.1.
  • .claude/** added to the lint config's ignores.

The .claude/** ignore

npm run lint on a clean main reported 534 errors, every one from six stale .claude/worktrees/*/reference/preview.jsx copies. Agent worktrees are whole checkouts of this repository living inside it: gitignored, but not invisible to a linter walking the tree. reference/preview.jsx is 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 one react-hooks/exhaustive-deps warning 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.
  • No changeset: 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

🤖 Generated with Claude Code

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>
JadRizk and others added 2 commits October 11, 2026 02:24
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>
@JadRizk
JadRizk merged commit 27952db into main Oct 11, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant