aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTetsuharu OHZEKI <[email protected]>2019-12-11 15:41:16 +0000
committerTetsuharu OHZEKI <[email protected]>2019-12-11 15:56:29 +0000
commitb21bb44c8dcd43e9e42ef7e3d752dd550e6505ad (patch)
treebb800455698b200c4fdb7fdfeda736eb91c06663
parent143484922284b2b3177393706ba27c76a3113292 (diff)
Enable noUnusedParameters option for vscode extension
-rw-r--r--editors/code/src/commands/analyzer_status.ts2
-rw-r--r--editors/code/src/commands/expand_macro.ts2
-rw-r--r--editors/code/src/commands/runnables.ts2
-rw-r--r--editors/code/tsconfig.json3
-rw-r--r--editors/code/tslint.json4
5 files changed, 8 insertions, 5 deletions
diff --git a/editors/code/src/commands/analyzer_status.ts b/editors/code/src/commands/analyzer_status.ts
index 9e4ce0eb3..2777ced24 100644
--- a/editors/code/src/commands/analyzer_status.ts
+++ b/editors/code/src/commands/analyzer_status.ts
@@ -9,7 +9,7 @@ export class TextDocumentContentProvider
9 public syntaxTree: string = 'Not available'; 9 public syntaxTree: string = 'Not available';
10 10
11 public provideTextDocumentContent( 11 public provideTextDocumentContent(
12 uri: vscode.Uri, 12 _uri: vscode.Uri,
13 ): vscode.ProviderResult<string> { 13 ): vscode.ProviderResult<string> {
14 const editor = vscode.window.activeTextEditor; 14 const editor = vscode.window.activeTextEditor;
15 if (editor == null) { 15 if (editor == null) {
diff --git a/editors/code/src/commands/expand_macro.ts b/editors/code/src/commands/expand_macro.ts
index 842898020..17c78280a 100644
--- a/editors/code/src/commands/expand_macro.ts
+++ b/editors/code/src/commands/expand_macro.ts
@@ -11,7 +11,7 @@ export class ExpandMacroContentProvider
11 public eventEmitter = new vscode.EventEmitter<vscode.Uri>(); 11 public eventEmitter = new vscode.EventEmitter<vscode.Uri>();
12 12
13 public provideTextDocumentContent( 13 public provideTextDocumentContent(
14 uri: vscode.Uri, 14 _uri: vscode.Uri,
15 ): vscode.ProviderResult<string> { 15 ): vscode.ProviderResult<string> {
16 async function handle() { 16 async function handle() {
17 const editor = vscode.window.activeTextEditor; 17 const editor = vscode.window.activeTextEditor;
diff --git a/editors/code/src/commands/runnables.ts b/editors/code/src/commands/runnables.ts
index 9b1c6643d..c81d7ce0f 100644
--- a/editors/code/src/commands/runnables.ts
+++ b/editors/code/src/commands/runnables.ts
@@ -178,7 +178,7 @@ export async function startCargoWatch(
178 } 178 }
179 179
180 const label = 'install-cargo-watch'; 180 const label = 'install-cargo-watch';
181 const taskFinished = new Promise((resolve, reject) => { 181 const taskFinished = new Promise((resolve, _reject) => {
182 const disposable = vscode.tasks.onDidEndTask(({ execution }) => { 182 const disposable = vscode.tasks.onDidEndTask(({ execution }) => {
183 if (execution.task.name === label) { 183 if (execution.task.name === label) {
184 disposable.dispose(); 184 disposable.dispose();
diff --git a/editors/code/tsconfig.json b/editors/code/tsconfig.json
index 8cb1e9035..9ddf56347 100644
--- a/editors/code/tsconfig.json
+++ b/editors/code/tsconfig.json
@@ -7,7 +7,8 @@
7 "sourceMap": true, 7 "sourceMap": true,
8 "rootDir": "src", 8 "rootDir": "src",
9 "strict": true, 9 "strict": true,
10 "noUnusedLocals": true 10 "noUnusedLocals": true,
11 "noUnusedParameters": true
11 }, 12 },
12 "exclude": ["node_modules", ".vscode-test"] 13 "exclude": ["node_modules", ".vscode-test"]
13} 14}
diff --git a/editors/code/tslint.json b/editors/code/tslint.json
index bdeb4895e..b69c5574d 100644
--- a/editors/code/tslint.json
+++ b/editors/code/tslint.json
@@ -4,6 +4,8 @@
4 "rules": { 4 "rules": {
5 "quotemark": [true, "single"], 5 "quotemark": [true, "single"],
6 "interface-name": false, 6 "interface-name": false,
7 "object-literal-sort-keys": false 7 "object-literal-sort-keys": false,
8 // Allow `_bar` to sort with tsc's `noUnusedParameters` option
9 "variable-name": [true, "allow-leading-underscore"]
8 } 10 }
9} 11}