Eslint-plugin-import: Disallow importing "default" as a named import

Created on 10 Aug 2016  路  2Comments  路  Source: benmosher/eslint-plugin-import

Babel allows import { default as Foo } from 'foo' - I'm not sure if the spec does too.

I'd like a rule that requires import { default as Foo, Bar } be written as import Foo, { Bar }.

accepted help wanted rule proposal semver-minor style-guide

Most helpful comment

Last I checked, importing a default export as a name is valid ES6, but this seems like a reasonable style-guide rule.

Name: no-named-default?

All 2 comments

Last I checked, importing a default export as a name is valid ES6, but this seems like a reasonable style-guide rule.

Name: no-named-default?

This should be closed now that #596 is merged right?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

dizzyn picture dizzyn  路  43Comments

mieszko4 picture mieszko4  路  25Comments

rhettlivingston picture rhettlivingston  路  31Comments

ljharb picture ljharb  路  29Comments

graingert picture graingert  路  22Comments