Skip to content

build: shared eslint config uses packages the root never declares #896

Open

Description

@bpowers

The root eslint.config.shared.js requires @eslint/js, @typescript-eslint/eslint-plugin, @typescript-eslint/parser, eslint-plugin-react, and eslint-config-prettier, but the root package.json declares none of them.
Lint works only because ESLint resolves the config's requires from its own location inside pnpm's store: @eslint/js because eslint itself depends on it, the rest through pnpm's internal hoist directory.
Loading the config with plain node fails: node -e "require('./src/core/eslint.config.js')" gives Cannot find module '@eslint/js'.

Why it matters

A dependency update or a pnpm hoisting change can break linting in every package at once, with an error naming a package nobody declared.
The shared config also silently uses whichever plugin version pnpm surfaced, not the one the linted package declares.
No failure has been seen yet.

Fix

Add the five packages plus eslint to the root package.json devDependencies, at the versions the packages already use.
Optionally drop the duplicate per-package declarations so there is a single version of the lint toolchain.

Pointers

Activity

  1. added
    bug
    dependencies
    hygiene
    javascript
    on Jul 8, 2026
  2. changed the title [-]build: eslint.config.shared.js requires five packages the root package.json never declares (resolves only via pnpm's virtual store)[/-] [+]build: shared eslint config uses packages the root never declares[/+] on Oct 12, 2026
  3. added
    ci
    on Oct 12, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugcidependencieshygienejavascript

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions