nextjs - 💡(How to fix) Fix Codemod adds extra dot path [2 comments, 2 participants]

Official PRs (…)
ON THIS PAGE

Recommended Tools

×6

Utilities matched from this issue’s tags and category — try them while you read without losing context.

GitHub issue graph ai analysis

Paste a GitHub issue URL. We fetch that issue, discover linked issues from bodies/comments/timeline, collect linked pull requests, and produce a structured English report.

The report is written in English Markdown for sharing and archival.

Helpful · Quick feedback

Loading…
GitHub stats
vercel/next.js#84616Fetched 2026-04-08 02:18:56
View on GitHub
Comments
2
Participants
2
Timeline
7
Reactions
0
Author
Timeline (top)
commented ×2issue_type_added ×1labeled ×1mentioned ×1

Code Example

pnpm create next-app@canary --example reproduction-template reproduction-app
cd reproduction-app
pnpx @next/codemod@canary next-lint-to-eslint-cli .

---

-    "lint": "next lint",
-    "lint:fix": "next lint --fix .",
+    "lint": "eslint .",
+    "lint:fix": "eslint --fix . .",

---

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Mon Apr 21 17:08:54 UTC 2025
  Available memory (MB): 31770
  Available CPU cores: 12
Binaries:
  Node: 24.2.0
  npm: 11.3.0
  Yarn: N/A
  pnpm: 10.15.0
Relevant Packages:
  next: 15.6.0-canary.51 // Latest available version is detected (15.6.0-canary.51).
  eslint-config-next: N/A
  react: 19.2.0
  react-dom: 19.2.0
  typescript: N/A
Next.js Config:
  output: N/A
RAW_BUFFERClick to expand / collapse

Link to the code that reproduces this issue

https://github.com/boiseiben/reproduction-app

To Reproduce

Starting from scratch (alternatively, just run the last command after cloning the repo linked above):


pnpm create next-app@canary --example reproduction-template reproduction-app
cd reproduction-app
pnpx @next/codemod@canary next-lint-to-eslint-cli .

Current vs. Expected behavior

The diff on package.json includes in part:

-    "lint": "next lint",
-    "lint:fix": "next lint --fix .",
+    "lint": "eslint .",
+    "lint:fix": "eslint --fix . .",

That last line seems to have an extra . at the end.

Provide environment information

Operating System:
  Platform: linux
  Arch: x64
  Version: #1 SMP PREEMPT_DYNAMIC Mon Apr 21 17:08:54 UTC 2025
  Available memory (MB): 31770
  Available CPU cores: 12
Binaries:
  Node: 24.2.0
  npm: 11.3.0
  Yarn: N/A
  pnpm: 10.15.0
Relevant Packages:
  next: 15.6.0-canary.51 // Latest available version is detected (15.6.0-canary.51).
  eslint-config-next: N/A
  react: 19.2.0
  react-dom: 19.2.0
  typescript: N/A
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)

next dev (local)

Additional context

I am pretty sure the issue came from this commit and is on or near this line, which should have another conditional around it based on checking for what paths might already exist in the command.

extent analysis

TL;DR

Remove the extra . at the end of the lint:fix script in package.json to fix the linting issue.

Guidance

  • Verify the issue by running pnpx @next/codemod@canary next-lint-to-eslint-cli . and checking the generated package.json for the extra ..
  • Manually edit the package.json file to remove the extra . from the lint:fix script, changing it to "lint:fix": "eslint --fix ." to match the expected behavior.
  • If the issue persists, review the relevant commit and code line to understand the intended behavior and potential fixes.
  • Consider opening an issue or pull request with the Next.js team to address the potential bug in the next-lint-to-eslint-cli codemod.

Notes

The provided information suggests that the issue is related to a specific commit and code line in the Next.js repository, but without further context or debugging, it's difficult to provide a more comprehensive solution.

Recommendation

Apply workaround: manually editing the package.json file to remove the extra . from the lint:fix script, as this is a straightforward fix that addresses the immediate issue.

Vote matrix · Quick signals

Works
Did the solution work? Tap to confirm.
Easy Fix
Was it a quick fix?
Time Saver
Did it save you time?
Blocking
Was it severely blocking?
Common Issue
Are others likely hitting this too?
Flaky / Intermittent
Is it intermittent?
Verified / Reproducible
Can you reproduce it reliably?
Loading…

Still need to ship something?

×6

Another batch ranked right after the header list — different links, same matching logic.

Back to top recommendations

TRENDING