We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Apologies if this is a duplicate -- it's difficult to search terms with an asterisk.
Found issue using: eslint 6.6.0, 6.8.0, 7.3.1 eslint-plugin-import 2.20.2, 2.21.2 (tried various versions to see if it had already been fixed)
eslint
eslint-plugin-import
// A.js export const FOO = 'a-foobar';
// B.js export const FOO = 'b-foobar';
// C.js export * as A from './A'; export * as B from './B';
No import/export error in C.js, since both instances of FOO are under their own namespaces (A/B).
import/export
C.js
FOO
import * as C from './C'; console.log(C.A.FOO); // 'a-foobar' console.log(C.B.FOO); // 'b-foobar' console.log(C.FOO); // undefined
Error in C.js: Multiple exports of name 'FOO'. eslint(import/export)
Multiple exports of name 'FOO'. eslint(import/export)
The following equivalent method works without errors, but annoying because ESLint is preventing me from taking advantage of newer ES syntax:
import * as A from './A'; import * as B from './B'; export { A, B };
The text was updated successfully, but these errors were encountered:
This might be a duplicate of #518?
Sorry, something went wrong.
That seems to be related to shadowing, whereas this example has no actual variable shadowing. If it was...
export * from './A'; export * from './B';
Then that would likely be the issue, but since the original code posted is equivalent to:
There are no shadowed variable names, since FOO only exists within the individual namespaces. (This works without lint errors, by the way).
07dc92a
No branches or pull requests
Apologies if this is a duplicate -- it's difficult to search terms with an asterisk.
Found issue using:
eslint
6.6.0, 6.8.0, 7.3.1eslint-plugin-import
2.20.2, 2.21.2(tried various versions to see if it had already been fixed)
Setup:
Expected:
No
import/export
error inC.js
, since both instances ofFOO
are under their own namespaces (A/B).Result:
Error in C.js:
Multiple exports of name 'FOO'. eslint(import/export)
Workaround
The following equivalent method works without errors, but annoying because ESLint is preventing me from taking advantage of newer ES syntax:
The text was updated successfully, but these errors were encountered: