-
Notifications
You must be signed in to change notification settings - Fork 7
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
Remove CJS support for config file #222
Comments
This'd also drastically simplify #161. I think it'd better to fix |
I mean, this is the exact outcome that Sindresorhus wants, i'm not going against the will of that guy haha. |
Well, thanks I guess! I've been slowly rewriting #161 and this'll make it much easier (if not obsolete) |
I think this might does the trick? https://github.com/andrewbranch/example-subpath-exports-ts-compat. I'm not sure, will have to check. |
I was going to say no, but actually it should work: Doesn't work at runtime though, so I'd argue it's still wrong. One ought to be using modern moduleResolution settings. |
eslint.config.js
with CJS syntax has been broken for months now.The issue started when i integrated eslint-config-flat-gitignore.
eslint-config-flat-gitignore
is not compatible with CJS and will throw an error at runtime ifeslint.config.js
is treated as a CJS module (funnily enough, it was my own PR that broke CJS support).Now, considering that the config file can be .mjs file without any drawback (@antfu/eslint-config also adopt this approach), and even better it should be a .ts file, i see no downsides to removing the CJS support all togheter.
The text was updated successfully, but these errors were encountered: