这是我的 JavaScript(非常精简):
function addContent() {
var content = [];
content.append(
makeVal({
value : 1
})
); // Generates lint message
}
在此运行 lint 程序,我收到消息
unexpected end of line; it is ambiguous whether these lines are part of the same statement
在第 7 行。如果我连接第 6 行和第 7 行,消息就会消失。
谁能解释这种歧义在哪里?在我看来,第 7 行的括号明确地关闭了对 append() 的调用。