Closed musjj closed 1 year ago
Never mind this does not do what I thought it does, I'll think of something else.
ESM is not supported by eslint-import-plugin
right now, so the plugin must be written using CJS. There's no way around it.
Yeah, just looked through the repo issues, shame.
@musjj Have you solved this issue? I'm also facing the same problem.
In my case, I configured vite config as ESM and eslint as CJS. When using the vite.config.ts(js) file written in ESM for this plugin, I encounter an "out of module" error.
@pzmosquito I saw that you are using without any problem, do you happen to have a publicly accessible repository I can refer to?
Additionally, it would be great to have best practices or examples included in the package as well. :)
@musjj Have you solved this issue? I'm also facing the same problem.
In my case, I configured vite config as ESM and eslint as CJS. When using the vite.config.ts(js) file written in ESM for this plugin, I encounter an "out of module" error.
@pzmosquito I saw that you are using without any problem, do you happen to have a publicly accessible repository I can refer to?
Additionally, it would be great to have best practices or examples included in the package as well. :)
The How to use section in the README file is pretty much the simplifed version of my set up. I'd suggest that you set up an empty project with no other packages except eslint related ones. If you still see problem, please let me know; otherwise, gradually add more packages and see where the problem is.
The How to use section in the README file is pretty much the simplifed version of my set up. I'd suggest that you set up an empty project with no other packages except eslint related ones. If you still see problem, please let me know; otherwise, gradually add more packages and see where the problem is.
I'll retry soon. And if I can't solve the problem, I'll leave a message. Thanks to your kindness and your works.
I'm getting
[ERR_REQUIRE_ESM]: require() of ES Module from not supported.
errors ifvite.config.js
isrequire
d. Usingimport
fixes this. Not sure if this is a good general solution though, so let me know if it has any unwanted side effects.