import-js/eslint-plugin-import

import/named and import/namespace errors after upgrading Babel

Open

#1.845 geöffnet am 2. Juli 2020

Auf GitHub ansehen
 (11 Kommentare) (1 Reaktion) (0 zugewiesene Personen)JavaScript (1.540 Forks)batch import
bughelp wanted

Repository-Metriken

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

Beschreibung

I was on @babel/core 7.8.x and upgraded to 7.10.x and suddenly started seeing errors for import/named and import/namespace.

I have something similar to:

./alpha/abc.js

export const A = 'A'
export const B = 'B'
export const C = 'C'

./alpha/def.js

export const D = 'D'
export const E = 'E'
export const F = 'F'

./alpha/index.js

export * as abc from './abc'
export * as def from './def'

And then in files that need it:

import * as alpha from 'path/to/alpha/index.js'

// do stuff with alpha.abc and alpha.def

I have babel-eslint and @babel/plugin-proposal-export-namespace-from installed. I'm on the latest eslint-plugin-import. Any thoughts?

Contributor Guide