google/closure-compiler

Warn if a goog.scope alias uses a different name from the last part of the original name

Open

#1283 aperta il 4 dic 2015

Vedi su GitHub
 (5 commenti) (0 reazioni) (0 assegnatari)Java (1197 fork)batch import
enhancementhelp wanted

Metriche repository

Star
 (7176 star)
Metriche merge PR
 (Merge medio 3g 4h) (1 PR mergiata in 30 g)

Descrizione

When creating a short alias for some.really.long.name.Foo the alias should almost certainly be Foo. If someone writes

goog.scope(function() {
var Bar = some.really.long.name.Foo;
});

it is surprising and a violation of the style guide. We could probably warn for this pretty easily in the ScopedAliases pass

Guida contributor