import-js/eslint-plugin-import

Make optional reporting of "import/export: Multiple exports of name ..."

Open

#2.167 geöffnet am 27. Juli 2021

Auf GitHub ansehen
 (1 Kommentar) (0 Reaktionen) (0 zugewiesene Personen)JavaScript (1.540 Forks)batch import
enhancementhelp wanted

Repository-Metriken

Stars
 (4.946 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 138T 22h) (3 gemergte PRs in 30 T)

Beschreibung

Multiple exports of name is always reported as an error but it's a legitimate feature disciplined by ECMASCRIPT specs.

Es:

// D.js 
const f = () => 'D::f'
export { f }

// E.js
export * from './D.js'
const f = () => 'E::f'
export { f }

Report -> import/export: Multiple exports of name 'f'.

Maybe eslint-plugin-import could give an optionable error that can ben disabled by config?

See also here and #1704

Contributor Guide