Add warn-by-default lint for local binding shadowing exported glob re-export item

This commit is contained in:
许杰友 Jieyou Xu (Joe) 2023-05-09 07:15:46 +08:00
parent 1a5f8bce74
commit b9606589c4
No known key found for this signature in database
GPG key ID: C5FD5D32014FDB47
12 changed files with 207 additions and 27 deletions

View file

@ -540,6 +540,16 @@ pub enum BuiltinLintDiagnostics {
/// Span where the same name is also re-exported.
duplicate_reexport_span: Span,
},
HiddenGlobReexports {
/// The name of the local binding which shadows the glob re-export.
name: String,
/// The namespace for which the shadowing occurred in.
namespace: String,
/// The glob reexport that is shadowed by the local binding.
glob_reexport_span: Span,
/// The local binding that shadows the glob reexport.
private_item_span: Span,
},
}
/// Lints that are buffered up early on in the `Session` before the