import-js/eslint-plugin-import

import/named and import/namespace errors after upgrading Babel

Open

#1845 aperta il 2 lug 2020

Vedi su GitHub
 (11 commenti) (1 reazione) (0 assegnatari)JavaScript (1540 fork)batch import
bughelp wanted

Metriche repository

Star
 (4946 star)
Metriche merge PR
 (Merge medio 138g 22h) (3 PR mergiate in 30 g)

Descrizione

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?

Guida contributor