import-js/eslint-plugin-import

"Multiple exports of name 'xxx' import/export" error is thrown if types are exported

Open

#3.136 geöffnet am 4. Jan. 2025

Auf GitHub ansehen
 (3 Kommentare) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (4.946 Stars) (1.540 Forks)batch import
bughelp wantedtypescript

Beschreibung

We have the following two files in the package:

m.ts

export interface Foo {}

export function f(foo: Foo): void {
}

index.ts

export {f} from 'm';
export type * from 'm';

Actual result:

While linting this code the plugin prints the following error for index.ts:

Multiple exports of name 'f' import/export

Expected result:

I don't expect the error to be thrown for the above case as the second expression in index.ts exports types, so there should be no duplicates.

Plugin version: 2.31.0

Contributor Guide