google/closure-compiler

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

Aberta

#1.283 aberto em 4 de dez. de 2015

 (5 comentários) (0 reação) (0 responsável)Java (1.197 forks)batch import
enhancementhelp wanted

Métricas do repositório

Stars
 (7.176 estrelas)
Métricas de merge de PR
 (Métricas PR pendentes)

Description

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

Guia do colaborador