首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >如何禁用google closure linter的额外空间检查?

如何禁用google closure linter的额外空间检查?
EN

Stack Overflow用户
提问于 2014-12-16 14:05:30
回答 1查看 484关注 0票数 2

Google closure linter将对以下代码中的每一行都发出警告,因为键名后面有额外的空格。有没有办法禁用额外的空间检查?我也找不到配置.gjslintrc文件的文档。

我也找不到在“gjslint --help”结果中使用的正确标志。

代码语言:javascript
复制
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
    }
};
EN

回答 1

Stack Overflow用户

发布于 2014-12-17 22:46:38

您可以使用disable标志禁用特定错误。在您的示例中,您需要执行以下操作:

代码语言:javascript
复制
gjslint --strict --disable 0001,0002 yourfile.js

其中,错误代码0001表示额外的空间,错误代码0002表示缺少空间。根据您的情况,您可能还希望忽略缩进错误。在这种情况下,您可能希望将错误代码0006添加到列表中。

票数 2
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/27498543

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档