fix lint and fmt

This commit is contained in:
Young-Flash 2024-01-22 19:33:26 +08:00
parent e15f40e842
commit 56f54c87e7

View file

@ -140,7 +140,7 @@ function createCommands(): Record<string, CommandFactory> {
health: "stopped", health: "stopped",
}); });
}, },
disabled: (_) => async () => { }, disabled: (_) => async () => {},
}, },
analyzerStatus: { enabled: commands.analyzerStatus }, analyzerStatus: { enabled: commands.analyzerStatus },
@ -197,24 +197,28 @@ function conflictExtDetect() {
vscode.window vscode.window
.showWarningMessage( .showWarningMessage(
`You have both the rust-analyzer (rust-lang.rust-analyzer) and Rust (rust-lang.rust) ` + `You have both the rust-analyzer (rust-lang.rust-analyzer) and Rust (rust-lang.rust) ` +
"plugins enabled. These are known to conflict and cause various functions of " + "plugins enabled. These are known to conflict and cause various functions of " +
"both plugins to not work correctly. You should disable one of them.", "both plugins to not work correctly. You should disable one of them.",
"Got it" "Got it",
) )
.then(() => { }, console.error); .then(() => {}, console.error);
} }
if (vscode.extensions.getExtension("panicbit.cargo")) { if (vscode.extensions.getExtension("panicbit.cargo")) {
let isRustAnalyzerCheckOnSave = vscode.workspace.getConfiguration("rust-analyzer").get("checkOnSave"); const isRustAnalyzerCheckOnSave = vscode.workspace
let isCargoAutomaticCheck = vscode.workspace.getConfiguration("cargo").get("automaticCheck"); .getConfiguration("rust-analyzer")
.get("checkOnSave");
const isCargoAutomaticCheck = vscode.workspace
.getConfiguration("cargo")
.get("automaticCheck");
if (isRustAnalyzerCheckOnSave && isCargoAutomaticCheck) { if (isRustAnalyzerCheckOnSave && isCargoAutomaticCheck) {
vscode.window vscode.window
.showWarningMessage( .showWarningMessage(
`You have Cargo (panicbit.cargo) enabled with 'cargo.automaticCheck' set to true(default), ` + `You have Cargo (panicbit.cargo) enabled with 'cargo.automaticCheck' set to true(default), ` +
"you can disable it or set {\"cargo.automaticCheck\": false} in settings.json to avoid invoke cargo twice", 'you can disable it or set {"cargo.automaticCheck": false} in settings.json to avoid invoke cargo twice',
"Got it" "Got it",
) )
.then(() => { }, console.error); .then(() => {}, console.error);
} }
} }
} }