繁体   English   中英

从JSCS到ESLint:缺少规则

[英]Coming from JSCS to ESLint: missing rules

我们已决定从JSCS切换到ESLint,因为它可以进行其他检查。 我已经设法转换了大多数规则,但是其中两个我无法与ESLint规则集匹配。 因此,在深入研究AST并尝试自己编写它之前,我想问一下它们是否还不存在。

{
    // nothing similar to this seems available
    "requireBlocksOnNewline": 2,
    // there is only rule for after spaces - space-after-keywords
    "requireSpaceBeforeKeywords": ["else", "while", "catch"]
}

http://jscs.info/rule/requireBlocksOnNewline.html http://jscs.info/rule/requireSpaceBeforeKeywords.html

brace-style: [2, "1tbs"]可以模仿requireBlockOnNewline brace-style: [2, "1tbs"] requireSpaceBeforeKeywords不存在,但是创建起来并不难。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM