next.js: Next.js does not pick up external eslint config

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 😅

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Reactions: 2
  • Comments: 18 (7 by maintainers)

Most upvoted comments

Sure @devjiwonchoi. I will try to get one out later tonight!

Works fine. Thanks @devjiwonchoi !

Thank you so much for reporting! Identified the issue, will fix ASAP!