0
私はSonarTsPluginを設定しています。私はtslint.jsonに何を入れるべきかを考えています(私はまだ持っていません)。まず、SonarQubeで利用可能なすべてのTypeScriptルールを有効にしたいと思います。私はこの1つを発見し、ランダムに私のプロジェクトに追加しました:tslint.jsonファイルのすべてのTsLintルールを取得する
{
"jsRules": {
"class-name": true,
"comment-format": [
true,
"check-space"
],
"indent": [
true,
"spaces"
],
"no-duplicate-variable": true,
"no-eval": true,
"no-trailing-whitespace": true,
"no-unsafe-finally": true,
"one-line": [
true,
"check-open-brace",
"check-whitespace"
],
"quotemark": [
true,
"double"
],
"semicolon": [
true,
"always"
],
"triple-equals": [
true,
"allow-null-check"
],
"variable-name": [
true,
"ban-keywords"
],
"whitespace": [
true,
"check-branch",
"check-decl",
"check-operator",
"check-separator",
"check-type"
]
},
"rules": {
"class-name": true,
"comment-format": [
true,
"check-space"
],
"curly": true,
"indent": [
true,
"spaces"
],
"no-eval": true,
"no-internal-module": true,
"no-trailing-whitespace": true,
"no-unsafe-finally": true,
"no-var-keyword": true,
"one-line": [
true,
"check-open-brace",
"check-whitespace"
],
"quotemark": [
true,
"double"
],
"semicolon": [
true,
"always"
],
"triple-equals": [
true,
"allow-null-check"
],
"typedef-whitespace": [
true,
{
"call-signature": "nospace",
"index-signature": "nospace",
"parameter": "nospace",
"property-declaration": "nospace",
"variable-declaration": "nospace"
}
],
"variable-name": [
true,
"ban-keywords"
],
"whitespace": [
true,
"check-branch",
"check-decl",
"check-operator",
"check-separator",
"check-type"
]
}
}
活字体のプラグインはそれでうまく動作しますが、私はそれが可能なすべてのルールを可能にしますかわかりません。誰もそれを行うtslint.jsonの例を持っていますか?ありがとうございました。
注:デフォルト設定ファイルを生成するためにtsc --init
コマンドを起動しましたが、私は同じ質問をしています。 SonarQubeには100以上のルールがありますが、ファイルには〜50しか含まれていません。
です。これは便利です。ですから、SonarQube設定からtslint.jsonファイルを生成することはできません。これはあまりにも悪く、SonarQubeのTypeScript品質プロファイルとプロジェクトのカスタム設定の両方を持つのはちょっと面倒です。私はなぜそれがこのように実装されたのだろうか。 –