-
Notifications
You must be signed in to change notification settings - Fork 1
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
Missing "import" key in package.json exports for ESM compatibility #38
Comments
A sample project would be helpful. |
@DaveMBush the bug report has a correct suggestion. CommonJS file can be imported into ES modules. But as you explicitly set Variant A:
Variant B:
|
Yes, and thank you. The reason I want a project that exhibits the problem is so I have something I can test the change against, at least manually, so I can prove to myself that the change fixes the problem and so that the problem does not show up in the future. |
Thank you so much |
https://arethetypeswrong.github.io/?p=%40smarttools%2Feslint-plugin-rxjs%401.0.13 highlights some problem that kinda works right now but relies on Typescript bug, if I understood correctly. -- I have this same problem on versions > 1.0.8 Minimalish eslint config file: import rxjs from '@smarttools/eslint-plugin-rxjs';
import tseslint from 'typescript-eslint';
export default tseslint.config(
{
plugins: {
'@typescript-eslint': tseslint.plugin,
rxjs,
},
},
{
files: ['**/*.ts'],
extends: [
rxjs.configs.recommended,
],
},
); |
This should be fixed in 1.0.14 |
Describe the bug
Upgraded to 1.0.12 from 1.0.9 and after running eslint with this update, I see the following error:
Repro
Version of @smarttools/eslint-plugin-rxjs you are using: 1.0.12
Repository that has a reproduction of the problem: Private
Additional context
Downgrading to @smarttools/[email protected] resolves the issue for my project.
Adding
"import": "./index.cjs",
to the exports inpackage.json#33
fixes the issue in 1.0.12 for ESM based configs:"exports": { ".": { "require": "./index.cjs", "import": "./index.cjs", "types": "./index.d.ts" } }
The text was updated successfully, but these errors were encountered: