google/closure-compiler

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

開放

#1,283 建立於 2015年12月4日

 (5 則留言) (0 個反應) (0 位負責人)Java (1,197 個分叉)batch import
enhancementhelp wanted

倉庫指標

星標
 (7,176 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

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

貢獻者指南