次の状況のコード例が見つかりませんでした:
"next-line": [
true,
"check-catch",
"check-finally",
"check-else",
"check-open-brace",
"check-whitespace"
],
次の状況のコード例が見つかりませんでした:
"next-line": [
true,
"check-catch",
"check-finally",
"check-else",
"check-open-brace",
"check-whitespace"
],
next-line
コア TSLint のルール部分はありませんが、one-line
ルールはあります。ドキュメンテーションは優れたものではありませんが、一般的に中括弧とキーワードを配置するよりコンパクトな方法を強制します。
たとえば、これらは良いです:
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
}