import-js/eslint-plugin-import

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

Aberta

#3.136 aberto em 4 de jan. de 2025

 (3 comentários) (0 reação) (0 responsável)JavaScript (1.548 forks)batch import
bughelp wantedtypescript

Métricas do repositório

Stars
 (5.940 estrelas)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

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

Guia do colaborador