diff --git a/bun.lockb b/bun.lockb index 0122828..f545937 100755 Binary files a/bun.lockb and b/bun.lockb differ diff --git a/vscode-extension/package.json b/vscode-extension/package.json index bf4e919..2a22e2e 100644 --- a/vscode-extension/package.json +++ b/vscode-extension/package.json @@ -230,7 +230,7 @@ "esbuild": "esbuild src/extension.ts --outfile=dist/extension.js --external:vscode --format=cjs --platform=node --bundle", "watch": "bun run esbuild --watch", "build": "bun run esbuild --minify", - "lint": "biome check --apply src/*.ts", + "lint": "tsc && biome check --apply src/*.ts", "schemas": "js-yaml schemas/mabo.yaml > schemas/mabo.json", "syntaxes": "js-yaml syntaxes/mabo.tmLanguage.yaml > syntaxes/mabo.tmLanguage.json", "vscode:prepublish": "bun run schemas && bun run syntaxes && bun run build", @@ -238,16 +238,17 @@ }, "engines": { "node": ">=21", - "vscode": "^1.86.0" + "vscode": "^1.82.0" }, "dependencies": { "vscode-languageclient": "^9.0.1" }, "devDependencies": { "@biomejs/biome": "^1.5.3", - "@types/vscode": "~1.86.0", + "@types/vscode": "~1.82.0", "@vscode/vsce": "~2.24.0", "esbuild": "^0.20.1", - "js-yaml": "^4.1.0" + "js-yaml": "^4.1.0", + "typescript": "^5.3.3" } } diff --git a/vscode-extension/src/extension.ts b/vscode-extension/src/extension.ts index 0717a57..df64d4a 100644 --- a/vscode-extension/src/extension.ts +++ b/vscode-extension/src/extension.ts @@ -1,9 +1,9 @@ -import { ExtensionContext, commands, workspace } from "vscode"; +import { type ExtensionContext, commands, workspace } from "vscode"; import { - Executable, + type Executable, LanguageClient, - LanguageClientOptions, - ServerOptions, + type LanguageClientOptions, + type ServerOptions, TransportKind, } from "vscode-languageclient/node"; diff --git a/vscode-extension/tsconfig.json b/vscode-extension/tsconfig.json new file mode 100644 index 0000000..0fef23a --- /dev/null +++ b/vscode-extension/tsconfig.json @@ -0,0 +1,27 @@ +{ + "compilerOptions": { + // Enable latest features + "lib": ["ESNext"], + "target": "ESNext", + "module": "ESNext", + "moduleDetection": "force", + "jsx": "react-jsx", + "allowJs": true, + + // Bundler mode + "moduleResolution": "bundler", + "allowImportingTsExtensions": true, + "verbatimModuleSyntax": true, + "noEmit": true, + + // Best practices + "strict": true, + "skipLibCheck": true, + "noFallthroughCasesInSwitch": true, + + // Some stricter flags (disabled by default) + "noUnusedLocals": false, + "noUnusedParameters": false, + "noPropertyAccessFromIndexSignature": false + } +}