diff --git a/client/src/extension.ts b/client/src/extension.ts index df67c33..a8e4e8a 100644 --- a/client/src/extension.ts +++ b/client/src/extension.ts @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-var-requires */ /* -------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information. @@ -42,7 +41,7 @@ function findNushellExecutable(): string | null { // Fall back to searching PATH for 'nu' return which.sync('nu', { nothrow: true }); - } catch (error) { + } catch { return null; } } @@ -184,6 +183,8 @@ export function activate(context: vscode.ExtensionContext) { provideTerminalProfile( token: vscode.CancellationToken, ): vscode.ProviderResult { + // Consume token to satisfy no-unused-vars without changing behavior + void token; if (found_nushell_path == null) { console.log( 'Nushell not found in env:PATH or any of the heuristic locations.', diff --git a/eslint.config.js b/eslint.config.js index e69de29..4f3a06e 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -0,0 +1,17 @@ +module.exports = [ + { + files: ['**/*.ts'], // Apply to all TypeScript files + languageOptions: { + parser: require('@typescript-eslint/parser'), // Use TypeScript parser + sourceType: 'module', + }, + plugins: { + '@typescript-eslint': require('@typescript-eslint/eslint-plugin'), + }, + rules: { + // Add your preferred rules here, or start with recommended + '@typescript-eslint/no-unused-vars': 'warn', + // Add more rules as needed + }, + }, +]; diff --git a/package-lock.json b/package-lock.json index 098705d..c16e385 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,11 +19,11 @@ "@types/node": "24.3.0", "@types/tmp": "0.2.6", "@types/vscode": "^1.93.0", - "@typescript-eslint/eslint-plugin": "8.42.0", - "@typescript-eslint/parser": "8.42.0", + "@typescript-eslint/eslint-plugin": "^8.42.0", + "@typescript-eslint/parser": "^8.42.0", "@vscode/vsce": "3.6.0", "esbuild": "0.25.9", - "eslint": "9.34.0", + "eslint": "^9.34.0", "mocha": "11.7.2", "prettier": "3.6.2", "ts-loader": "9.5.4", diff --git a/package.json b/package.json index 6f1fcde..76bb311 100644 --- a/package.json +++ b/package.json @@ -173,11 +173,11 @@ "@types/node": "24.3.0", "@types/tmp": "0.2.6", "@types/vscode": "^1.93.0", - "@typescript-eslint/eslint-plugin": "8.42.0", - "@typescript-eslint/parser": "8.42.0", + "@typescript-eslint/eslint-plugin": "^8.42.0", + "@typescript-eslint/parser": "^8.42.0", "@vscode/vsce": "3.6.0", "esbuild": "0.25.9", - "eslint": "9.34.0", + "eslint": "^9.34.0", "mocha": "11.7.2", "prettier": "3.6.2", "ts-loader": "9.5.4",