Skip to content

Incorrect eslint-config-next Type Export #85379

@elliot-huffman

Description

@elliot-huffman

Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/serene-feather-cv73x3?file=%2Fapp%2Fpage.tsx%3A2%2C61

To Reproduce

  1. Attempt to import eslint-config-next/typescript or eslint-config-next/core-web-vitals.
  2. TypeScript will complain about no types being available for the package or the import will be an import type with no Config[] type being inherited from the package as expected.

Current vs. Expected behavior

Look at the package.json's exports field and notice that the types are pointing to the /dist/ folder, not the /dist/src/ folder.
This is causing issues when referencing the eslint-config-next/typescript or eslint-config-next/core-web-vitals

Provide environment information

'yarn' is not recognized as an internal or external command,
operable program or batch file.
'pnpm' is not recognized as an internal or external command,
operable program or batch file.

Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Enterprise
  Available memory (MB): 65361
  Available CPU cores: 20
Binaries:
  Node: 22.21.0
  npm: 11.6.2
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  next: 16.0.0 // Latest available version is detected (16.0.0).
  eslint-config-next: N/A
  react: 19.2.0
  react-dom: 19.2.0
  typescript: 5.9.3
Next.js Config:
  output: N/A

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

Linting

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

Other (Deployed)

Additional context

It may be better to emit the type definitions along side the executable content or update the type exports to include the correct path.
Either way, the pathing is incorrect in the project manafest.

Metadata

Metadata

Assignees

No one assigned

    Labels

    LintingRelated to `next lint` or ESLint with Next.js.

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions