Enable noUnusedParameters option for vscode extension

This commit is contained in:
Tetsuharu OHZEKI 2019-12-12 00:41:16 +09:00
parent 1434849222
commit b21bb44c8d
5 changed files with 8 additions and 5 deletions

View file

@ -9,7 +9,7 @@ export class TextDocumentContentProvider
public syntaxTree: string = 'Not available';
public provideTextDocumentContent(
uri: vscode.Uri,
_uri: vscode.Uri,
): vscode.ProviderResult<string> {
const editor = vscode.window.activeTextEditor;
if (editor == null) {

View file

@ -11,7 +11,7 @@ export class ExpandMacroContentProvider
public eventEmitter = new vscode.EventEmitter<vscode.Uri>();
public provideTextDocumentContent(
uri: vscode.Uri,
_uri: vscode.Uri,
): vscode.ProviderResult<string> {
async function handle() {
const editor = vscode.window.activeTextEditor;

View file

@ -178,7 +178,7 @@ export async function startCargoWatch(
}
const label = 'install-cargo-watch';
const taskFinished = new Promise((resolve, reject) => {
const taskFinished = new Promise((resolve, _reject) => {
const disposable = vscode.tasks.onDidEndTask(({ execution }) => {
if (execution.task.name === label) {
disposable.dispose();

View file

@ -7,7 +7,8 @@
"sourceMap": true,
"rootDir": "src",
"strict": true,
"noUnusedLocals": true
"noUnusedLocals": true,
"noUnusedParameters": true
},
"exclude": ["node_modules", ".vscode-test"]
}

View file

@ -4,6 +4,8 @@
"rules": {
"quotemark": [true, "single"],
"interface-name": false,
"object-literal-sort-keys": false
"object-literal-sort-keys": false,
// Allow `_bar` to sort with tsc's `noUnusedParameters` option
"variable-name": [true, "allow-leading-underscore"]
}
}