TypeScript 的 "next-line" 规则是什么?

What is the "next-line" rule at TypeScript?

我找不到以下情况的代码示例:

"next-line": [
  true,
  "check-catch",
  "check-finally",
  "check-else",
  "check-open-brace",
  "check-whitespace"
],

我不认为有下一行,我认为等同于一行:

https://palantir.github.io/tslint/rules/one-line/

核心 TSLint 没有 next-line 规则部分,但有 a one-line rule。文档不是很好,但它通常强制采用更紧凑的方式放置大括号和关键字。

例如,这些都不错:

class My Class {
 // ...
}

if (true) {
 // ...
} else {
 // ...
}

而这会很糟糕:

class MyClass
{
 // ...
}

if (true){
 // missing whitespace above
}
else
{
  // else is on the wrong line and the brace is also
}