Perfect the codebase for wamr-ide (#1817)

Fix errors and warnings reported by eslint
Add CONTRIBUTING document for vscode-extension
This commit is contained in:
Wang Ning
2022-12-27 15:04:36 +08:00
committed by GitHub
parent 676c3c7b04
commit 679a8ab3cb
14 changed files with 316 additions and 299 deletions

View File

@ -37,6 +37,7 @@ function getLLDBUnzipFilePath(destinationFolder: string, filename: string) {
export function getWAMRExtensionVersion(
context: vscode.ExtensionContext
): string {
// eslint-disable-next-line @typescript-eslint/no-var-requires
return require(path.join(context.extensionPath, 'package.json')).version;
}
@ -64,7 +65,9 @@ export function isLLDBInstalled(context: vscode.ExtensionContext): boolean {
return checkIfFileExists(lldbBinaryPath);
}
export async function promptInstallLLDB(context: vscode.ExtensionContext) {
export async function promptInstallLLDB(
context: vscode.ExtensionContext
): Promise<void> {
const extensionPath = context.extensionPath;
const setupPrompt = 'setup';
const skipPrompt = 'skip';
@ -111,5 +114,7 @@ export async function promptInstallLLDB(context: vscode.ExtensionContext) {
);
// Remove the bundle.zip
fs.unlink(lldbZipPath, () => {});
fs.unlink(lldbZipPath, () => {
return;
});
}