-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
feat(eslint): rename eslint.config.js to eslint.config.cjs to resolve them as CommonJS #29334
base: master
Are you sure you want to change the base?
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Your CI Pipeline Execution ↗ for commit f27e9c6 ⏳ is in progress.
Last updated at 2024-12-13 21:49:06UTC Sent with 💌 from NxCloud. |
144e881
to
0fa0b93
Compare
0fa0b93
to
224a3ee
Compare
224a3ee
to
29bb7fe
Compare
4506885
to
b6aa8af
Compare
b6aa8af
to
5d373e1
Compare
5d373e1
to
3126725
Compare
3126725
to
053838f
Compare
…e resolved as CommonJS
053838f
to
f27e9c6
Compare
@@ -51,7 +51,7 @@ export function updateFilesForRootProjects( | |||
if (!allowedExt.includes(ext)) { | |||
continue; | |||
} | |||
if (file === '.eslintrc.json' || file === 'eslint.config.js') { | |||
if (file === '.eslintrc.json' || file === 'eslint.config.cjs') { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why was this one a replacement when others were applied in addition to the existing?
This PR updates our generators to use
eslint.config.cjs
instead ofeslint.config.js
so that Node resolution will treat it as CommonJS. This solves an issue where having"type": "module"
inpackage.json
will result in an error when Node tries to resolve the config file as ESM.Also allows us to clean up out Remix generators to not have to rename to
eslint.config.cjs
to solve the same issue.Current Behavior
Expected Behavior
Related Issue(s)
Fixes #