Skip to content
New issue

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

[import/export] "Multiple default exports" in Typescript ambient module declarations #1773

Closed
andreubotella opened this issue May 20, 2020 · 0 comments · Fixed by #1889
Closed

Comments

@andreubotella
Copy link
Contributor

If a Typescript file (or, more likely, a .d.ts file) has several ambient module declarations with default exports, sometimes they're mistakenly reported as "multiple default exports".

declare module "a" {
  function a(): void;
  export {a as default};
}

declare module "b" {
  function b(): void;
  export {b as default};
}
plugins:
  - import
rules:
  import/export: error

Here's a case where that doesn't happen, though:

declare module "a" {
  export default function a(): void;
}

declare module "b" {
  export default function b(): void;
}
@andreubotella andreubotella changed the title [import/exports] "Multiple default exports" in Typescript ambient module declarations [import/export] "Multiple default exports" in Typescript ambient module declarations May 20, 2020
andreubotella pushed a commit to andreubotella/eslint-plugin-import that referenced this issue Aug 20, 2020
andreubotella pushed a commit to andreubotella/eslint-plugin-import that referenced this issue Aug 26, 2020
ljharb pushed a commit to andreubotella/eslint-plugin-import that referenced this issue Oct 3, 2020
@ljharb ljharb closed this as completed in a00727e Oct 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants