eslint-plugin-import
eslint-plugin-import copied to clipboard
`default`, `export`, and `namespace` rules should be disabled in the `typescript` config.
If I understand correctly, TypeScript already highlights the same issues as import/default, import/export and import/namespace rules. If that's true, then these rules should be disabled in the typescript config similarly to import/named here: https://github.com/import-js/eslint-plugin-import/blob/68cea3e6b6fe5fd61e5cf2e2c7c0be9e8dc597cb/config/typescript.js#L25-L30
Please correct me if I'm wrong in my assumption. Otherwise, I can create a PR with the changes.
That’s incorrect. I believe TS doesn’t check CJS files, or files without types.
Would it be within the scope of this project to maintain an extendable config for projects that are TS only, with rules like this disabled? Something like plugin:import/typescript-only, alongside the current plugin:import/typescript.
No projects are TS only, because all published code is CJS or ESM.
I came here for this same reason. import/export is NOT redundant with TypeScript, but import/default, import/named, import/namespace, and import/no-unresolved all are. Additionally, import/default doesn't seem to trigger when I expect it to (but TS always does in those places). Instead of excluding all these rules, I replaced plugin:import/recommended and plugin:import/typescript with plugin:import/warnings in my config and manually added import/export to my rules, since that was the only useful one in my project.