Open
Description
When you have duplicate import/exports like:
export 'lib1.dart' show A;
export 'lib1.dart' show B;
we could have a lint for merging them together.
Old description
Say you have a package (happened to mine - due_date). You have an API that should be exported separately outside the project in different libraries (one file with multiple declarations or a barrel file).
So you write down an export
directive with show
/hide
. But later you add more things and you add another entry (forgot about the original one or didn't see it) with the same file but other show
/hide
values. This should be warned to make them a single export. Even more important if they are using the hide
combinator since the other may show unwanted things.
export 'lib1.dart' show A;
export 'lib1.dart' show B;
export 'lib2.dart' hide C;
export 'lib2.dart' hide D;
Today if we have the exact same values for the combinators it shows:
Duplicate export. Try removing all but one export of the library. dart(duplicate_export)