mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-12 21:28:51 +00:00
Enable noUnusedParameters option for vscode extension
This commit is contained in:
parent
1434849222
commit
b21bb44c8d
5 changed files with 8 additions and 5 deletions
|
@ -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) {
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -7,7 +7,8 @@
|
|||
"sourceMap": true,
|
||||
"rootDir": "src",
|
||||
"strict": true,
|
||||
"noUnusedLocals": true
|
||||
"noUnusedLocals": true,
|
||||
"noUnusedParameters": true
|
||||
},
|
||||
"exclude": ["node_modules", ".vscode-test"]
|
||||
}
|
||||
|
|
|
@ -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"]
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue