Lint for merging equal import/exports with different show
combinators
#59722
Labels
analyzer-linter
Issues with the analyzer's support for the linter package
area-analyzer
Use area-analyzer for Dart analyzer issues, including the analysis server and code completion.
linter-lint-proposal
P3
A lower priority bug or feature request
When you have duplicate import/exports like:
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 withshow
/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 othershow
/hide
values. This should be warned to make them a single export. Even more important if they are using thehide
combinator since the other may show unwanted things.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)
The text was updated successfully, but these errors were encountered: