Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Add stub CJS exports for old ESLint plugins #701

Merged
merged 1 commit into from
Oct 23, 2024
Merged

Conversation

franky47
Copy link
Member

@franky47 franky47 commented Oct 23, 2024

The eslint-import-resolver-alias ESLint plugin chokes on nuqs adapters imports when running next lint:

 Error while loading rule 'import/no-cycle': Package subpath './adapters/next/app' is not defined by "exports" in /[...]/node_modules/nuqs/package.json

Adding a stub CJS file for all exports that throws with a link to the original issue seems to satisfy the module resolution graph (the contents of the file aren't actually interpreted, but there needs to be one, exports.*.require: null doesn't cut it).

Closes #691.

Copy link

vercel bot commented Oct 23, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
nuqs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 23, 2024 10:43am

Copy link

pkg-pr-new bot commented Oct 23, 2024

Open in Stackblitz

pnpm add https://pkg.pr.new/nuqs@701

commit: fae1945

@franky47 franky47 merged commit 464506b into next Oct 23, 2024
23 checks passed
@franky47 franky47 deleted the fix/691-eslint-cjs branch October 23, 2024 11:25
Copy link

🎉 This PR is included in version 2.0.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Error while loading rule 'import/no-cycle': Package subpath './adapters/next/app' is not defined by "exports"
1 participant