diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-12-11 16:14:41 +0000 |
---|---|---|
committer | GitHub <[email protected]> | 2019-12-11 16:14:41 +0000 |
commit | 797a6c3041f2d06d68267232e312302bb59932a3 (patch) | |
tree | 8ecd119d1595aa61c9b3076e285eb71371930e10 /editors/code/src/test/utils/diagnotics | |
parent | 143484922284b2b3177393706ba27c76a3113292 (diff) | |
parent | f0f259bda32a3cf04f45cea946b5d12368454342 (diff) |
Merge #2527
2527: Enable tsc builtin lint options for vscode/extension r=matklad a=saneyuki
* These options are not enabled by `--strict` option and these options make a code more solid.
* https://www.typescriptlang.org/docs/handbook/compiler-options.html
* For `noUnusedParameters` , we need to tweak tslint option to allow `_bar` style.
Co-authored-by: Tetsuharu OHZEKI <[email protected]>
Diffstat (limited to 'editors/code/src/test/utils/diagnotics')
3 files changed, 10 insertions, 5 deletions
diff --git a/editors/code/src/test/utils/diagnotics/SuggestedFix.test.ts b/editors/code/src/test/utils/diagnotics/SuggestedFix.test.ts index 96ec8c614..2b25eb705 100644 --- a/editors/code/src/test/utils/diagnotics/SuggestedFix.test.ts +++ b/editors/code/src/test/utils/diagnotics/SuggestedFix.test.ts | |||
@@ -114,7 +114,8 @@ describe('SuggestedFix', () => { | |||
114 | 114 | ||
115 | const edit = codeAction.edit; | 115 | const edit = codeAction.edit; |
116 | if (!edit) { | 116 | if (!edit) { |
117 | return assert.fail('Code Action edit unexpectedly missing'); | 117 | assert.fail('Code Action edit unexpectedly missing'); |
118 | return; | ||
118 | } | 119 | } |
119 | 120 | ||
120 | const editEntries = edit.entries(); | 121 | const editEntries = edit.entries(); |
diff --git a/editors/code/src/test/utils/diagnotics/SuggestedFixCollection.test.ts b/editors/code/src/test/utils/diagnotics/SuggestedFixCollection.test.ts index 4c1467b57..ef09013f4 100644 --- a/editors/code/src/test/utils/diagnotics/SuggestedFixCollection.test.ts +++ b/editors/code/src/test/utils/diagnotics/SuggestedFixCollection.test.ts | |||
@@ -53,7 +53,8 @@ describe('SuggestedFixCollection', () => { | |||
53 | 53 | ||
54 | const { diagnostics } = codeAction; | 54 | const { diagnostics } = codeAction; |
55 | if (!diagnostics) { | 55 | if (!diagnostics) { |
56 | return assert.fail('Diagnostics unexpectedly missing'); | 56 | assert.fail('Diagnostics unexpectedly missing'); |
57 | return; | ||
57 | } | 58 | } |
58 | 59 | ||
59 | assert.strictEqual(diagnostics.length, 1); | 60 | assert.strictEqual(diagnostics.length, 1); |
@@ -114,7 +115,8 @@ describe('SuggestedFixCollection', () => { | |||
114 | const { diagnostics } = codeAction; | 115 | const { diagnostics } = codeAction; |
115 | 116 | ||
116 | if (!diagnostics) { | 117 | if (!diagnostics) { |
117 | return assert.fail('Diagnostics unexpectedly missing'); | 118 | assert.fail('Diagnostics unexpectedly missing'); |
119 | return; | ||
118 | } | 120 | } |
119 | 121 | ||
120 | // We should be associated with both diagnostics | 122 | // We should be associated with both diagnostics |
diff --git a/editors/code/src/test/utils/diagnotics/rust.test.ts b/editors/code/src/test/utils/diagnotics/rust.test.ts index cee59061f..0222dbbaa 100644 --- a/editors/code/src/test/utils/diagnotics/rust.test.ts +++ b/editors/code/src/test/utils/diagnotics/rust.test.ts | |||
@@ -120,7 +120,8 @@ describe('mapRustDiagnosticToVsCode', () => { | |||
120 | // One related information for the original definition | 120 | // One related information for the original definition |
121 | const relatedInformation = diagnostic.relatedInformation; | 121 | const relatedInformation = diagnostic.relatedInformation; |
122 | if (!relatedInformation) { | 122 | if (!relatedInformation) { |
123 | return assert.fail('Related information unexpectedly undefined'); | 123 | assert.fail('Related information unexpectedly undefined'); |
124 | return; | ||
124 | } | 125 | } |
125 | assert.strictEqual(relatedInformation.length, 1); | 126 | assert.strictEqual(relatedInformation.length, 1); |
126 | const [related] = relatedInformation; | 127 | const [related] = relatedInformation; |
@@ -154,7 +155,8 @@ describe('mapRustDiagnosticToVsCode', () => { | |||
154 | // One related information for the lint definition | 155 | // One related information for the lint definition |
155 | const relatedInformation = diagnostic.relatedInformation; | 156 | const relatedInformation = diagnostic.relatedInformation; |
156 | if (!relatedInformation) { | 157 | if (!relatedInformation) { |
157 | return assert.fail('Related information unexpectedly undefined'); | 158 | assert.fail('Related information unexpectedly undefined'); |
159 | return; | ||
158 | } | 160 | } |
159 | assert.strictEqual(relatedInformation.length, 1); | 161 | assert.strictEqual(relatedInformation.length, 1); |
160 | const [related] = relatedInformation; | 162 | const [related] = relatedInformation; |