我们决定从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
发布于 2015-07-04 01:00:09
requireBlockOnNewline可以用brace-style: [2, "1tbs"]模仿,不存在requireSpaceBeforeKeywords,但是创建起来并不太困难。
https://stackoverflow.com/questions/31207552
复制相似问题