简体   繁体   中英

Coming from JSCS to ESLint: missing rules

We have decided to switch over from JSCS to ESLint as it allows more checks for other things. I've managed to convert most of the rules, but two of them I am unable to match with ESLint ruleset. So before I dig into AST and trying to write it on my own, I would like to ask if these aren't already in there.

{
    // 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不存在,但是创建起来并不难。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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