You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Re-exporting in general is something best avoided, especially in a barrel-file context. Rather than having a rule that enforces a consistent way to do something unadvisable, I'd rather have one that discourages re-exports entirely in favor of requiring consumers to deep-import.
I do agree that it's a bad practice ; but we have some legacy code bases where it's used all over the place, and a rule enforcing a particular writing style would be really appreciated.
It could be named some like unrecommended-reexport-barrel-files or something like that to emphasize the fact that it shouldn't be used for new projects, but is still relevant for older ones.
Here is a proposal for a new rule: forbidding imports followed by equivalent exports, and prefer re-export syntax instead.
Example:
I didn't find any similar rule in the docs, and I think it would be nice to have one to enforce consistent styling of re-exports.
The text was updated successfully, but these errors were encountered: