question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Handle re-exports

See original GitHub issue

Some modules re-export members directly. This is also sort of an import.

I.e.

export { default as Foo, Fooz, Foob } from './Foo';
export { default, NonDefault } from './qwe';
export * from './asd';
export * as bar from './bar';

It would be nice if this would be sorted automatically as well following the same rules as imports.

I think this is mostly not combined with regular imports, but it could be. This means there should be rules for this.

Candidate rules I could come up with:

  1. re-exports before imports
  2. re-exports after imports
  3. re-exports mixed with imports

Personally I’d go with 2.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:5
  • Comments:8 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
remcohaszingcommented, Nov 9, 2020

Actually my use case is the simplest one possible. My packages contain an index.ts which re-exports named packages.

Examples:

Also I have moved away from this plugin, because the import/order ESLint rule can do pretty much the same now, works with require, and doesn’t require me to install a separate package. I may want to use this plugin again if re-exports are supported though.

0reactions
lydellcommented, Nov 15, 2020

Released in v6.0.0.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Deemed Exports FAQs - What is a "deemed re-export"?
License requirements for exports or reexports to the home country of the embassy ... How are individuals handled who are permanent residents or...
Read more >
15 CFR Part 732 -- Steps for Using the EAR - eCFR
(i) General Prohibition One (Exports and Reexports): Export and reexport of controlled items to ... (4) Employees need to know how to handle...
Read more >
Expansion of Export, Reexport, and Transfer (in-Country ...
A license is required for exports and reexports to all destinations, ... related to nuclear material handling and processing and to nuclear ...
Read more >
DDTC Issues Proposed Rule Expanding the Scope of ...
DDTC Issues Proposed Rule Expanding the Scope of Activities That Are Not Exports, Reexports, Retransfers, or Temporary Imports.
Read more >
swc_bundler: does not handle namespace re-exports #1110
Describe the bug swc_bundler does not appear to handle re-exports Input code example2.ts import * as b from "./b.ts"; console.log(b.b); ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found