mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-27 12:25:05 +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 syntaxTree: string = 'Not available';
|
||||||
|
|
||||||
public provideTextDocumentContent(
|
public provideTextDocumentContent(
|
||||||
uri: vscode.Uri,
|
_uri: vscode.Uri,
|
||||||
): vscode.ProviderResult<string> {
|
): vscode.ProviderResult<string> {
|
||||||
const editor = vscode.window.activeTextEditor;
|
const editor = vscode.window.activeTextEditor;
|
||||||
if (editor == null) {
|
if (editor == null) {
|
||||||
|
|
|
@ -11,7 +11,7 @@ export class ExpandMacroContentProvider
|
||||||
public eventEmitter = new vscode.EventEmitter<vscode.Uri>();
|
public eventEmitter = new vscode.EventEmitter<vscode.Uri>();
|
||||||
|
|
||||||
public provideTextDocumentContent(
|
public provideTextDocumentContent(
|
||||||
uri: vscode.Uri,
|
_uri: vscode.Uri,
|
||||||
): vscode.ProviderResult<string> {
|
): vscode.ProviderResult<string> {
|
||||||
async function handle() {
|
async function handle() {
|
||||||
const editor = vscode.window.activeTextEditor;
|
const editor = vscode.window.activeTextEditor;
|
||||||
|
|
|
@ -178,7 +178,7 @@ export async function startCargoWatch(
|
||||||
}
|
}
|
||||||
|
|
||||||
const label = 'install-cargo-watch';
|
const label = 'install-cargo-watch';
|
||||||
const taskFinished = new Promise((resolve, reject) => {
|
const taskFinished = new Promise((resolve, _reject) => {
|
||||||
const disposable = vscode.tasks.onDidEndTask(({ execution }) => {
|
const disposable = vscode.tasks.onDidEndTask(({ execution }) => {
|
||||||
if (execution.task.name === label) {
|
if (execution.task.name === label) {
|
||||||
disposable.dispose();
|
disposable.dispose();
|
||||||
|
|
|
@ -7,7 +7,8 @@
|
||||||
"sourceMap": true,
|
"sourceMap": true,
|
||||||
"rootDir": "src",
|
"rootDir": "src",
|
||||||
"strict": true,
|
"strict": true,
|
||||||
"noUnusedLocals": true
|
"noUnusedLocals": true,
|
||||||
|
"noUnusedParameters": true
|
||||||
},
|
},
|
||||||
"exclude": ["node_modules", ".vscode-test"]
|
"exclude": ["node_modules", ".vscode-test"]
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,8 @@
|
||||||
"rules": {
|
"rules": {
|
||||||
"quotemark": [true, "single"],
|
"quotemark": [true, "single"],
|
||||||
"interface-name": false,
|
"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