Google closure linter将对以下代码中的每一行都发出警告,因为键名后面有额外的空格。有没有办法禁用额外的空间检查?我也找不到配置.gjslintrc文件的文档。
我也找不到在“gjslint --help”结果中使用的正确标志。
var ngTemplatesOptions = {
prefix : '/',
module : 'lc.directive.tpls',
standalone: false,
htmlmin : {
collapseBooleanAttributes : true,
collapseWhitespace : true,
removeAttributeQuotes : true,
removeComments : true, // Only if you don't use comment directives!
removeEmptyAttributes : true,
removeRedundantAttributes : true,
removeScriptTypeAttributes : true,
removeStyleLinkTypeAttributes: true
}
};发布于 2014-12-17 22:46:38
您可以使用disable标志禁用特定错误。在您的示例中,您需要执行以下操作:
gjslint --strict --disable 0001,0002 yourfile.js其中,错误代码0001表示额外的空间,错误代码0002表示缺少空间。根据您的情况,您可能还希望忽略缩进错误。在这种情况下,您可能希望将错误代码0006添加到列表中。
https://stackoverflow.com/questions/27498543
复制相似问题