google/closure-compiler

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

オープン

#1,283 opened on 2015/12/04

 (5 件のコメント) (0 件のリアクション) (0 人の担当者)Java (1,197 件のフォーク)batch import
enhancementhelp wanted

Repository metrics

Stars
 (7,176 個のスター)
PR merge metrics
 (PR metrics pending)

説明

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

コントリビューターガイド