Skip to content

14.2 breaks lint option --report-unused-disable-directives #64402

@Kamahl19

Description

@Kamahl19

Link to the code that reproduces this issue

https://codesandbox.io/p/devbox/stoic-morse-kdqd86

To Reproduce

  1. use next 14.2.0
  2. update lint command to be "lint": "next lint --report-unused-disable-directives error"
  3. npm run lint

Current vs. Expected behavior

Up until 14.1.4 it lints properly and reports unused directives. 14.2.0 throws an error "Invalid project directory provided, no such directory: /workspace/error". For some reason it appends the "error" to the project dir

Provide environment information

Operating System:
  Platform: darwin
  Arch: arm64
  Version: Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:49 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6020
  Available memory (MB): 65536
  Available CPU cores: 12
Binaries:
  Node: 20.11.0
  npm: 10.5.0
  Yarn: 1.22.19
  pnpm: 8.15.6
Relevant Packages:
  next: 14.2.0 // Latest available version is detected (14.2.0).
  eslint-config-next: 14.2.0
  react: 18.2.0
  react-dom: 18.2.0
  typescript: 5.4.5
Next.js Config:
  output: N/A

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

CLI (create-next-app), ESLint (eslint-config-next)

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

Other (Deployed)

Additional context

This seems to start happening in 14.2.0-canary.0 and it seems to be connected to updating the commander because the directory here

mod.nextLint(options, directory)
now happens to be 'error'

Metadata

Metadata

Assignees

Labels

bugIssue was opened via the bug report template.create-next-appRelated to our CLI tool for quickly starting a new Next.js application.locked

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions