Skip to content

Next.js does not pick up external eslint configΒ #67596

@EliasVal

Description

@EliasVal

Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/serene-napier-go8s7s

To Reproduce

  1. Set up monorepo (pnpm workspaces)
  2. Have a root eslint config file (with settings.next.rootDir set as per docs)
  3. Run next lint

Current vs. Expected behavior

Currently, when running next lint with the above reproduction steps, next tries to go through eslint config setup.
Expected Behaviour: For next lint to pick up the root eslint config, possibly through an option in next.config.js

Provide environment information

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Pro
  Available memory (MB): 32457
  Available CPU cores: 24
Binaries:
  Node: 20.12.2
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 15.0.0-canary.53 // There is a newer canary version (15.0.0-canary.59) available, please upgrade!
  eslint-config-next: 15.0.0-canary.54
  react: 19.0.0-rc-58af67a8f8-20240628
  react-dom: 19.0.0-rc-58af67a8f8-20240628
  typescript: 5.4.5
Next.js Config:
  output: N/A

Which area(s) are affected? (Select all that apply)

Developer Experience, Linting

Which stage(s) are affected? (Select all that apply)

next dev (local), next build (local), next start (local)

Additional context

Unfortunately, I can't link to a reproduction environment, since company policy is tight on keeping the repo private, and setting a monorepo again is gonna be hell for me πŸ˜…

Metadata

Metadata

Assignees

No one assigned

    Labels

    LintingRelated to `next lint` or ESLint with Next.js.bugIssue was opened via the bug report template.locked

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions