extension/eslint.config.js: report unused disable directives as error This change remove all unused directives and change the severity from warning to error to prevent future regression. Change-Id: Ida997256d500c37d74f25cc2b514e167d967acf8 Reviewed-on: https://go-review.googlesource.com/c/vscode-go/+/809540 Reviewed-by: Peter Weinberger <pjw@google.com> LUCI-TryBot-Result: golang-scoped@luci-project-accounts.iam.gserviceaccount.com <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
diff --git a/extension/eslint.config.js b/extension/eslint.config.js index 1220505..0c0a2a8 100644 --- a/extension/eslint.config.js +++ b/extension/eslint.config.js
@@ -7,18 +7,13 @@ }, { linterOptions: { - reportUnusedDisableDirectives: 'warn' + reportUnusedDisableDirectives: 'error' }, rules: { // TODO(hxjiang): fix problem reported and enable all the rules below. '@typescript-eslint/no-floating-promises': 'off', '@typescript-eslint/no-explicit-any': 'off', - '@typescript-eslint/no-unused-vars': 'off', - 'n/no-missing-import': 'off', - 'n/no-unpublished-import': 'off', - 'n/no-extraneous-import': 'off', - 'n/no-deprecated-api': 'off', - 'n/no-unsupported-features/node-builtins': 'off' + '@typescript-eslint/no-unused-vars': 'off' } } ];
diff --git a/extension/src/commands/index.ts b/extension/src/commands/index.ts index 64a1195..820ffec 100644 --- a/extension/src/commands/index.ts +++ b/extension/src/commands/index.ts
@@ -24,7 +24,6 @@ type CommandCallback<T extends unknown[]> = (...args: T) => Promise<unknown> | unknown; -// eslint-disable-next-line @typescript-eslint/no-explicit-any export type CommandFactory<T extends unknown[] = any[]> = ( ctx: vscode.ExtensionContext, goCtx: GoExtensionContext
diff --git a/extension/src/config.ts b/extension/src/config.ts index 8a386c8..7abbe95 100644 --- a/extension/src/config.ts +++ b/extension/src/config.ts
@@ -4,7 +4,6 @@ *--------------------------------------------------------*/ // vscode.WorkspaceConfiguration.get() returns any type. -/* eslint-disable @typescript-eslint/no-explicit-any */ import * as semver from 'semver'; import * as vscode from 'vscode';
diff --git a/extension/src/debugAdapter/goDebug.ts b/extension/src/debugAdapter/goDebug.ts index 8883233..d65d19e 100644 --- a/extension/src/debugAdapter/goDebug.ts +++ b/extension/src/debugAdapter/goDebug.ts
@@ -1,9 +1,6 @@ -/* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable no-case-declarations */ -/* eslint-disable eqeqeq */ /* eslint-disable no-useless-escape */ /* eslint-disable no-async-promise-executor */ -/* eslint-disable @typescript-eslint/no-explicit-any */ /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information.
diff --git a/extension/src/developerSurvey/config.ts b/extension/src/developerSurvey/config.ts index df18ee1..f9e232f 100644 --- a/extension/src/developerSurvey/config.ts +++ b/extension/src/developerSurvey/config.ts
@@ -86,7 +86,6 @@ } const [content, version] = res; - // eslint-disable-next-line @typescript-eslint/no-explicit-any const config = JSON.parse(content.toString(), (key: string, value: any) => { // Manually parse date fields. if (key === 'StartDate' || key === 'EndDate') {
diff --git a/extension/src/diagnostics/goCheck.ts b/extension/src/diagnostics/goCheck.ts index 92828f2..510f6f0 100644 --- a/extension/src/diagnostics/goCheck.ts +++ b/extension/src/diagnostics/goCheck.ts
@@ -1,5 +1,4 @@ /* eslint-disable @typescript-eslint/no-this-alias */ -/* eslint-disable @typescript-eslint/no-explicit-any */ /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information.
diff --git a/extension/src/goBrowsePackage.ts b/extension/src/goBrowsePackage.ts index e633345..fe2520f 100644 --- a/extension/src/goBrowsePackage.ts +++ b/extension/src/goBrowsePackage.ts
@@ -1,5 +1,3 @@ -/* eslint-disable @typescript-eslint/no-unused-vars */ -/* eslint-disable @typescript-eslint/no-explicit-any */ /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information.
diff --git a/extension/src/goCover.ts b/extension/src/goCover.ts index 6734c66..d8a4803 100644 --- a/extension/src/goCover.ts +++ b/extension/src/goCover.ts
@@ -1,6 +1,5 @@ /* eslint-disable no-useless-escape */ /* eslint-disable no-prototype-builtins */ -/* eslint-disable @typescript-eslint/no-explicit-any */ /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information.
diff --git a/extension/src/goDebugCommands.ts b/extension/src/goDebugCommands.ts index 7ed1a2e..9410d3b 100644 --- a/extension/src/goDebugCommands.ts +++ b/extension/src/goDebugCommands.ts
@@ -76,7 +76,6 @@ let offset = 0; const full: Uint8Array[] = []; - // eslint-disable-next-line no-constant-condition while (true) { const resp = (await session.customRequest('readMemory', { memoryReference: v.memoryReference,
diff --git a/extension/src/goDebugConfiguration.ts b/extension/src/goDebugConfiguration.ts index d381cab..d798a88 100644 --- a/extension/src/goDebugConfiguration.ts +++ b/extension/src/goDebugConfiguration.ts
@@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable no-prototype-builtins */ /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved.
diff --git a/extension/src/goDebugFactory.ts b/extension/src/goDebugFactory.ts index a3eaf40..98db54c 100644 --- a/extension/src/goDebugFactory.ts +++ b/extension/src/goDebugFactory.ts
@@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ /*--------------------------------------------------------- * Copyright 2021 The Go Authors. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information. @@ -200,7 +199,6 @@ private handleDataFromServer(data: Buffer): void { this.rawData = Buffer.concat([this.rawData, data]); - // eslint-disable-next-line no-constant-condition while (true) { if (this.contentLength >= 0) { if (this.rawData.length >= this.contentLength) { @@ -666,10 +664,7 @@ // toggleHideSystemGoroutineCustomRequest is a helper function extracted // for testing the command. -export async function toggleHideSystemGoroutinesCustomRequest( - // eslint-disable-next-line @typescript-eslint/no-explicit-any - cr: (command: string, args?: any) => Thenable<any> -) { +export async function toggleHideSystemGoroutinesCustomRequest(cr: (command: string, args?: any) => Thenable<any>) { const debugConsole = vscode.debug.activeDebugConsole; try { const response = await cr('evaluate', {
diff --git a/extension/src/goGenerateTests.ts b/extension/src/goGenerateTests.ts index 5296a5f..39cffdc 100644 --- a/extension/src/goGenerateTests.ts +++ b/extension/src/goGenerateTests.ts
@@ -1,6 +1,4 @@ -/* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable eqeqeq */ -/* eslint-disable @typescript-eslint/no-explicit-any */ /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information.
diff --git a/extension/src/goImpl.ts b/extension/src/goImpl.ts index 61ac926..8baf5c6 100644 --- a/extension/src/goImpl.ts +++ b/extension/src/goImpl.ts
@@ -1,5 +1,5 @@ /* eslint-disable no-useless-escape */ -/* eslint-disable @typescript-eslint/no-explicit-any */ + /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information.
diff --git a/extension/src/goImport.ts b/extension/src/goImport.ts index 1693d0b..825a688 100644 --- a/extension/src/goImport.ts +++ b/extension/src/goImport.ts
@@ -1,5 +1,3 @@ -/* eslint-disable @typescript-eslint/no-unused-vars */ -/* eslint-disable @typescript-eslint/no-explicit-any */ /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information.
diff --git a/extension/src/goInstallTools.ts b/extension/src/goInstallTools.ts index 7f44c23..969d8b8 100644 --- a/extension/src/goInstallTools.ts +++ b/extension/src/goInstallTools.ts
@@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable eqeqeq */ /* eslint-disable no-case-declarations */ /*---------------------------------------------------------
diff --git a/extension/src/goMain.ts b/extension/src/goMain.ts index 71e9de0..5d03c06 100644 --- a/extension/src/goMain.ts +++ b/extension/src/goMain.ts
@@ -1,5 +1,3 @@ -/* eslint-disable @typescript-eslint/no-unused-vars */ -/* eslint-disable @typescript-eslint/no-explicit-any */ /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. * Modification copyright 2020 The Go Authors. All rights reserved.
diff --git a/extension/src/goModifytags.ts b/extension/src/goModifytags.ts index aecfe8a..7ef101e 100644 --- a/extension/src/goModifytags.ts +++ b/extension/src/goModifytags.ts
@@ -1,5 +1,3 @@ -/* eslint-disable no-prototype-builtins */ -/* eslint-disable @typescript-eslint/no-explicit-any */ /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information.
diff --git a/extension/src/goModules.ts b/extension/src/goModules.ts index 367b5f0..87248b0 100644 --- a/extension/src/goModules.ts +++ b/extension/src/goModules.ts
@@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information.
diff --git a/extension/src/goPackages.ts b/extension/src/goPackages.ts index 99105b0..1a82e0d 100644 --- a/extension/src/goPackages.ts +++ b/extension/src/goPackages.ts
@@ -1,5 +1,3 @@ -/* eslint-disable @typescript-eslint/no-unused-vars */ -/* eslint-disable @typescript-eslint/no-explicit-any */ /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information.
diff --git a/extension/src/goPlayground.ts b/extension/src/goPlayground.ts index 237c153..776747f 100644 --- a/extension/src/goPlayground.ts +++ b/extension/src/goPlayground.ts
@@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information.
diff --git a/extension/src/goStatus.ts b/extension/src/goStatus.ts index b7d875e..4a4ae0c 100644 --- a/extension/src/goStatus.ts +++ b/extension/src/goStatus.ts
@@ -1,4 +1,3 @@ -/* eslint-disable no-case-declarations */ /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. * Modification copyright 2020 The Go Authors. All rights reserved.
diff --git a/extension/src/goSurvey.ts b/extension/src/goSurvey.ts index cd6399e..b5b47ea 100644 --- a/extension/src/goSurvey.ts +++ b/extension/src/goSurvey.ts
@@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ /*--------------------------------------------------------- * Copyright 2021 The Go Authors. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information.
diff --git a/extension/src/goTaskProvider.ts b/extension/src/goTaskProvider.ts index 0465dc7..b6e954f 100644 --- a/extension/src/goTaskProvider.ts +++ b/extension/src/goTaskProvider.ts
@@ -45,7 +45,6 @@ } // provides the default tasks. - // eslint-disable-next-line @typescript-eslint/no-unused-vars provideTasks(_: vscode.CancellationToken): vscode.ProviderResult<vscode.Task[]> { const folders = this.workspace.workspaceFolders; if (!folders || !folders.length) { @@ -81,7 +80,6 @@ } // fill an incomplete task definition ('tasks.json') whose type is "go". - // eslint-disable-next-line @typescript-eslint/no-unused-vars resolveTask(_task: vscode.Task, _: vscode.CancellationToken): vscode.ProviderResult<vscode.Task> { // vscode calls resolveTask for every 'go' type task in tasks.json. const def = _task.definition;
diff --git a/extension/src/goTest.ts b/extension/src/goTest.ts index 1977fd4..9a30a64 100644 --- a/extension/src/goTest.ts +++ b/extension/src/goTest.ts
@@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information.
diff --git a/extension/src/goTest/profile.ts b/extension/src/goTest/profile.ts index 82fc88e..bfd1bae 100644 --- a/extension/src/goTest/profile.ts +++ b/extension/src/goTest/profile.ts
@@ -1,4 +1,3 @@ -/* eslint-disable n/no-unsupported-features/node-builtins */ /*--------------------------------------------------------- * Copyright 2021 The Go Authors. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information. @@ -153,7 +152,6 @@ const proc = spawn(correctBinname('dot'), ['-V']); proc.on('error', (err) => { - // eslint-disable-next-line @typescript-eslint/no-explicit-any if ((err as any).code === 'ENOENT') resolve(false); else reject(err); });
diff --git a/extension/src/goTest/run.ts b/extension/src/goTest/run.ts index 6619b0b..dd82d7b 100644 --- a/extension/src/goTest/run.ts +++ b/extension/src/goTest/run.ts
@@ -69,7 +69,6 @@ } clear() {} - // eslint-disable-next-line @typescript-eslint/no-unused-vars show(...args: unknown[]) {} hide() {} dispose() {}
diff --git a/extension/src/goTools.ts b/extension/src/goTools.ts index 4aa009e..2a8a557 100644 --- a/extension/src/goTools.ts +++ b/extension/src/goTools.ts
@@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information.
diff --git a/extension/src/language/form.ts b/extension/src/language/form.ts index 87257b0..e78ad4a 100644 --- a/extension/src/language/form.ts +++ b/extension/src/language/form.ts
@@ -1,16 +1,3 @@ -/* eslint-disable id-blacklist */ -/* eslint-disable @typescript-eslint/no-unnecessary-type-assertion */ -/* eslint-disable no-underscore-dangle */ -/* eslint-disable @typescript-eslint/consistent-indexed-object-style */ -/* eslint-disable arrow-body-style */ -/* eslint-disable no-bitwise */ -/* eslint-disable object-shorthand */ -/* eslint-disable quotes */ -/* eslint-disable @typescript-eslint/no-unsafe-return */ -/* eslint-disable @typescript-eslint/no-explicit-any */ -/* eslint-disable @typescript-eslint/prefer-function-type */ -/* eslint-disable @typescript-eslint/no-explicit-any */ - /* --------------------------------------------------------- * Copyright 2025 The Go Authors. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information.
diff --git a/extension/src/language/goLanguageServer.ts b/extension/src/language/goLanguageServer.ts index f6770d5..7672205 100644 --- a/extension/src/language/goLanguageServer.ts +++ b/extension/src/language/goLanguageServer.ts
@@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. * Modification copyright 2020 The Go Authors. All rights reserved.
diff --git a/extension/src/language/legacy/goFormat.ts b/extension/src/language/legacy/goFormat.ts index 676cbff..739aeb1 100644 --- a/extension/src/language/legacy/goFormat.ts +++ b/extension/src/language/legacy/goFormat.ts
@@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information.
diff --git a/extension/src/language/registerDefaultProviders.ts b/extension/src/language/registerDefaultProviders.ts index f02fea6..c63b613 100644 --- a/extension/src/language/registerDefaultProviders.ts +++ b/extension/src/language/registerDefaultProviders.ts
@@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. * Modification copyright 2020 The Go Authors. All rights reserved.
diff --git a/extension/src/pickProcess.ts b/extension/src/pickProcess.ts index 0111b63..ad4209c 100644 --- a/extension/src/pickProcess.ts +++ b/extension/src/pickProcess.ts
@@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable no-async-promise-executor */ /*--------------------------------------------------------- * Copyright 2021 The Go Authors. All rights reserved.
diff --git a/extension/src/stateUtils.ts b/extension/src/stateUtils.ts index 97119fe..bd260b5 100644 --- a/extension/src/stateUtils.ts +++ b/extension/src/stateUtils.ts
@@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information.
diff --git a/extension/src/testUtils.ts b/extension/src/testUtils.ts index ddd15fa..c3ae2aa 100644 --- a/extension/src/testUtils.ts +++ b/extension/src/testUtils.ts
@@ -1,8 +1,6 @@ -/* eslint-disable @typescript-eslint/no-unused-vars */ /* eslint-disable no-useless-escape */ /* eslint-disable no-async-promise-executor */ /* eslint-disable no-prototype-builtins */ -/* eslint-disable @typescript-eslint/no-explicit-any */ /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information.
diff --git a/extension/src/util.ts b/extension/src/util.ts index 7042170..c4dd3c3 100644 --- a/extension/src/util.ts +++ b/extension/src/util.ts
@@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information.
diff --git a/extension/src/utils/argsUtil.ts b/extension/src/utils/argsUtil.ts index df2077f..38bba2c 100644 --- a/extension/src/utils/argsUtil.ts +++ b/extension/src/utils/argsUtil.ts
@@ -1,4 +1,3 @@ -/* eslint-disable quotes */ /*--------------------------------------------------------- * Copyright 2023 The Go Authors. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information.
diff --git a/extension/src/utils/lsofProcessParser.ts b/extension/src/utils/lsofProcessParser.ts index 1c9a15c..5320b4f 100644 --- a/extension/src/utils/lsofProcessParser.ts +++ b/extension/src/utils/lsofProcessParser.ts
@@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-unused-vars */ /*--------------------------------------------------------- * Copyright 2021 The Go Authors. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information.
diff --git a/extension/src/utils/processUtils.ts b/extension/src/utils/processUtils.ts index 88807f3..c66dc55 100644 --- a/extension/src/utils/processUtils.ts +++ b/extension/src/utils/processUtils.ts
@@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ /*--------------------------------------------------------- * Copyright 2020 The Go Authors. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information.
diff --git a/extension/test/gopls/codelens.test.ts b/extension/test/gopls/codelens.test.ts index 93733ed..305d911 100644 --- a/extension/test/gopls/codelens.test.ts +++ b/extension/test/gopls/codelens.test.ts
@@ -21,7 +21,6 @@ let document: vscode.TextDocument; - // eslint-disable-next-line @typescript-eslint/no-explicit-any const ctx = new MockExtensionContext() as any; const cancellationTokenSource = new vscode.CancellationTokenSource();
diff --git a/extension/test/gopls/configuration.test.ts b/extension/test/gopls/configuration.test.ts index c10c8d1..1b1a760 100644 --- a/extension/test/gopls/configuration.test.ts +++ b/extension/test/gopls/configuration.test.ts
@@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information.
diff --git a/extension/test/gopls/extension.test.ts b/extension/test/gopls/extension.test.ts index 41d405c..5b0dd04 100644 --- a/extension/test/gopls/extension.test.ts +++ b/extension/test/gopls/extension.test.ts
@@ -1,5 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -/* eslint-disable n/no-unpublished-import */ /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information.
diff --git a/extension/test/gopls/formatting.test.ts b/extension/test/gopls/formatting.test.ts index 4b82a8b..c641830 100644 --- a/extension/test/gopls/formatting.test.ts +++ b/extension/test/gopls/formatting.test.ts
@@ -3,11 +3,8 @@ * Licensed under the MIT License. See LICENSE in the project root for license information. *--------------------------------------------------------*/ -/* eslint-disable n/no-unpublished-import */ - // vscode.WorkspaceConfiguration.get() returns any type. So MockWorkspaceConfiguration // need to take a input of a Map containing any type. -/* eslint-disable @typescript-eslint/no-explicit-any */ import * as assert from 'assert'; import * as fs from 'fs-extra';
diff --git a/extension/test/gopls/goTest.utils.ts b/extension/test/gopls/goTest.utils.ts index caa727f..37bd20f 100644 --- a/extension/test/gopls/goTest.utils.ts +++ b/extension/test/gopls/goTest.utils.ts
@@ -9,7 +9,6 @@ import { Workspace } from '../../src/goTest/utils'; import { MockTestWorkspace } from '../mocks/MockTest'; -// eslint-disable-next-line @typescript-eslint/no-unused-vars export function getSymbols_Regex(doc: TextDocument, token: unknown): Thenable<DocumentSymbol[]> { const syms: DocumentSymbol[] = []; const range = new Range(new Position(0, 0), new Position(0, 0)); @@ -53,8 +52,6 @@ // Force didOpenTextDocument to fire. Without this, the test may run // before the event is handled. - // - // eslint-disable-next-line @typescript-eslint/no-explicit-any await (testExplorer as any).didOpenTextDocument(doc); return doc;
diff --git a/extension/test/gopls/goplsTestEnv.utils.ts b/extension/test/gopls/goplsTestEnv.utils.ts index 78fa816..e543159 100644 --- a/extension/test/gopls/goplsTestEnv.utils.ts +++ b/extension/test/gopls/goplsTestEnv.utils.ts
@@ -1,4 +1,3 @@ -/* eslint-disable n/no-unpublished-import */ /*--------------------------------------------------------- * Copyright 2023 The Go Authors. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information. @@ -47,15 +46,10 @@ public append = (v: string) => this.enqueue(v); public appendLine = (v: string) => this.enqueue(v); - // eslint-disable-next-line @typescript-eslint/no-explicit-any public error = (...args: any[]) => this.enqueue(args.join(' ')); - // eslint-disable-next-line @typescript-eslint/no-explicit-any public warn = (...args: any[]) => this.enqueue(args.join(' ')); - // eslint-disable-next-line @typescript-eslint/no-explicit-any public info = (...args: any[]) => this.enqueue(args.join(' ')); - // eslint-disable-next-line @typescript-eslint/no-explicit-any public debug = (...args: any[]) => this.enqueue(args.join(' ')); - // eslint-disable-next-line @typescript-eslint/no-explicit-any public trace = (...args: any[]) => this.enqueue(args.join(' ')); public clear = () => { this.buf = [];
diff --git a/extension/test/gopls/index.ts b/extension/test/gopls/index.ts index f98b445..16a2e28 100644 --- a/extension/test/gopls/index.ts +++ b/extension/test/gopls/index.ts
@@ -1,5 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -/* eslint-disable n/no-unpublished-import */ /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information.
diff --git a/extension/test/gopls/interactive.test.ts b/extension/test/gopls/interactive.test.ts index 42c2f1f..5aedaf4 100644 --- a/extension/test/gopls/interactive.test.ts +++ b/extension/test/gopls/interactive.test.ts
@@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ /*--------------------------------------------------------- * Copyright 2026 The Go Authors. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information.
diff --git a/extension/test/gopls/telemetry.test.ts b/extension/test/gopls/telemetry.test.ts index a1d57be..d5ff3b4 100644 --- a/extension/test/gopls/telemetry.test.ts +++ b/extension/test/gopls/telemetry.test.ts
@@ -1,4 +1,3 @@ -/* eslint-disable n/no-unpublished-import */ /*--------------------------------------------------------- * Copyright 2023 The Go Authors. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information.
diff --git a/extension/test/gopls/update.test.ts b/extension/test/gopls/update.test.ts index 9d3402f..dd3dd07 100644 --- a/extension/test/gopls/update.test.ts +++ b/extension/test/gopls/update.test.ts
@@ -1,6 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -/* eslint-disable n/no-deprecated-api */ -/* eslint-disable @typescript-eslint/no-unused-vars */ /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information.
diff --git a/extension/test/integration/configuration.test.ts b/extension/test/integration/configuration.test.ts index a61a20a..2f7f885 100644 --- a/extension/test/integration/configuration.test.ts +++ b/extension/test/integration/configuration.test.ts
@@ -3,11 +3,8 @@ * Licensed under the MIT License. See LICENSE in the project root for license information. *--------------------------------------------------------*/ -/* eslint-disable n/no-unpublished-import */ - // vscode.WorkspaceConfiguration.get() returns any type. So MockWorkspaceConfiguration // need to take a input of a Map containing any type. -/* eslint-disable @typescript-eslint/no-explicit-any */ import assert from 'assert'; import * as sinon from 'sinon';
diff --git a/extension/test/integration/coverage.test.ts b/extension/test/integration/coverage.test.ts index f06451f..6178522 100644 --- a/extension/test/integration/coverage.test.ts +++ b/extension/test/integration/coverage.test.ts
@@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-unused-vars */ /*--------------------------------------------------------- * Copyright 2020 The Go Authors. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information.
diff --git a/extension/test/integration/extension.test.ts b/extension/test/integration/extension.test.ts index 39905f8..9cef5cc 100644 --- a/extension/test/integration/extension.test.ts +++ b/extension/test/integration/extension.test.ts
@@ -1,6 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -/* eslint-disable eqeqeq */ -/* eslint-disable n/no-unpublished-import */ /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information.
diff --git a/extension/test/integration/goDebug.test.ts b/extension/test/integration/goDebug.test.ts index d0f8472..56f2e67 100644 --- a/extension/test/integration/goDebug.test.ts +++ b/extension/test/integration/goDebug.test.ts
@@ -1,8 +1,9 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -/* eslint-disable @typescript-eslint/no-unused-vars */ -/* eslint-disable n/no-unsupported-features/node-builtins */ /* eslint-disable no-async-promise-executor */ -/* eslint-disable n/no-unpublished-import */ +/*--------------------------------------------------------- + * Copyright 2026 The Go Authors. All rights reserved. + * Licensed under the MIT License. See LICENSE in the project root for license information. + *--------------------------------------------------------*/ + import assert from 'assert'; import * as cp from 'child_process'; import * as fs from 'fs'; @@ -2235,7 +2236,6 @@ private _handleData(data: Buffer): void { this._rawData = Buffer.concat([this._rawData!, data]); - // eslint-disable-next-line no-constant-condition while (true) { if (this._contentLength! >= 0) { if (this._rawData.length >= this._contentLength!) {
diff --git a/extension/test/integration/goDebugConfiguration.test.ts b/extension/test/integration/goDebugConfiguration.test.ts index 7607448..44ecd9e 100644 --- a/extension/test/integration/goDebugConfiguration.test.ts +++ b/extension/test/integration/goDebugConfiguration.test.ts
@@ -1,6 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -/* eslint-disable @typescript-eslint/no-unused-vars */ -/* eslint-disable no-prototype-builtins */ import assert = require('assert'); import fs = require('fs'); import os = require('os');
diff --git a/extension/test/integration/goversion.test.ts b/extension/test/integration/goversion.test.ts index 5f9433f..a318d1e 100644 --- a/extension/test/integration/goversion.test.ts +++ b/extension/test/integration/goversion.test.ts
@@ -1,6 +1,3 @@ -/* eslint-disable prettier/prettier */ -/* eslint-disable @typescript-eslint/no-unused-vars */ -/* eslint-disable n/no-unpublished-import */ /*--------------------------------------------------------- * Copyright 2020 The Go Authors. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information.
diff --git a/extension/test/integration/index.ts b/extension/test/integration/index.ts index 3386f34..ac19949 100644 --- a/extension/test/integration/index.ts +++ b/extension/test/integration/index.ts
@@ -1,5 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -/* eslint-disable n/no-unpublished-import */ /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information.
diff --git a/extension/test/integration/install.test.ts b/extension/test/integration/install.test.ts index de03b96..28d00dd 100644 --- a/extension/test/integration/install.test.ts +++ b/extension/test/integration/install.test.ts
@@ -1,5 +1,4 @@ /* eslint-disable no-async-promise-executor */ -/* eslint-disable @typescript-eslint/no-explicit-any */ /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See License.txt in the project root for license information.
diff --git a/extension/test/integration/linting.test.ts b/extension/test/integration/linting.test.ts index 28ad750..f2e5ff8 100644 --- a/extension/test/integration/linting.test.ts +++ b/extension/test/integration/linting.test.ts
@@ -1,5 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -/* eslint-disable n/no-unpublished-import */ /*--------------------------------------------------------- * Copyright 2025 The Go Authors. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information.
diff --git a/extension/test/integration/mocks/configuration.ts b/extension/test/integration/mocks/configuration.ts index f9cf53d..c04b605 100644 --- a/extension/test/integration/mocks/configuration.ts +++ b/extension/test/integration/mocks/configuration.ts
@@ -2,7 +2,6 @@ * Copyright 2025 The Go Authors. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information. *--------------------------------------------------------*/ -/* eslint-disable @typescript-eslint/no-explicit-any */ import * as vscode from 'vscode'; /**
diff --git a/extension/test/integration/stateUtils.test.ts b/extension/test/integration/stateUtils.test.ts index 8a47d57..82a8a26 100644 --- a/extension/test/integration/stateUtils.test.ts +++ b/extension/test/integration/stateUtils.test.ts
@@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ /*--------------------------------------------------------- * Copyright 2021 The Go Authors. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information.
diff --git a/extension/test/integration/statusbar.test.ts b/extension/test/integration/statusbar.test.ts index b7fbe64..79bc790 100644 --- a/extension/test/integration/statusbar.test.ts +++ b/extension/test/integration/statusbar.test.ts
@@ -1,5 +1,3 @@ -/* eslint-disable no-prototype-builtins */ -/* eslint-disable n/no-unpublished-import */ /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. * Modification copyright 2020 The Go Authors. All rights reserved.
diff --git a/extension/test/integration/test.test.ts b/extension/test/integration/test.test.ts index 1010fbc..83e1478 100644 --- a/extension/test/integration/test.test.ts +++ b/extension/test/integration/test.test.ts
@@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ /*--------------------------------------------------------- * Copyright 2020 The Go Authors. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information.
diff --git a/extension/test/integration/utils.test.ts b/extension/test/integration/utils.test.ts index 25d7b54..d04ca1f 100644 --- a/extension/test/integration/utils.test.ts +++ b/extension/test/integration/utils.test.ts
@@ -1,5 +1,3 @@ -/* eslint-disable prettier/prettier */ -/* eslint-disable @typescript-eslint/no-unused-vars */ /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information.
diff --git a/extension/test/mocks/MockCfg.ts b/extension/test/mocks/MockCfg.ts index a23fe17..f0d9be1 100644 --- a/extension/test/mocks/MockCfg.ts +++ b/extension/test/mocks/MockCfg.ts
@@ -1,5 +1,3 @@ -/* eslint-disable @typescript-eslint/no-unused-vars */ -/* eslint-disable @typescript-eslint/no-explicit-any */ /*--------------------------------------------------------- * Copyright 2021 The Go Authors. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information.
diff --git a/extension/test/mocks/MockMemento.ts b/extension/test/mocks/MockMemento.ts index c0b34e3..0aeefea 100644 --- a/extension/test/mocks/MockMemento.ts +++ b/extension/test/mocks/MockMemento.ts
@@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ /* eslint-disable no-prototype-builtins */ /*--------------------------------------------------------- * Copyright (C) Microsoft Corporation. All rights reserved.
diff --git a/extension/test/mocks/MockTest.ts b/extension/test/mocks/MockTest.ts index 921b68c..14553c9 100644 --- a/extension/test/mocks/MockTest.ts +++ b/extension/test/mocks/MockTest.ts
@@ -1,5 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ -/* eslint-disable @typescript-eslint/no-unused-vars */ /*--------------------------------------------------------- * Copyright 2021 The Go Authors. All rights reserved. * Licensed under the MIT License. See LICENSE in the project root for license information.
diff --git a/extension/test/runTest.ts b/extension/test/runTest.ts index 8eb8415..2266fc9 100644 --- a/extension/test/runTest.ts +++ b/extension/test/runTest.ts
@@ -1,5 +1,3 @@ -/* eslint-disable no-process-exit */ -/* eslint-disable n/no-unpublished-import */ import * as path from 'path'; import { SilentReporter, runTests } from '@vscode/test-electron';