import-js/eslint-plugin-import

import/named and import/namespace errors after upgrading Babel

Open

#1,845 opened on Jul 2, 2020

 (11 comments) (1 reaction) (0 assignees)JavaScript (1,549 forks)batch import
bughelp wanted

Repository metrics

Stars
 (5,940 stars)
PR merge metrics
 (Avg merge 138d 22h) (3 merged PRs in 30d)

Description

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