diff --git a/packages/salesforcedx-utils/src/types/localization/localizationProvider.ts b/packages/salesforcedx-utils/src/types/localization/localizationProvider.ts index b671764ee2..3a281f4a61 100644 --- a/packages/salesforcedx-utils/src/types/localization/localizationProvider.ts +++ b/packages/salesforcedx-utils/src/types/localization/localizationProvider.ts @@ -5,6 +5,5 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ export type LocalizationProvider = { - // eslint-disable-next-line @typescript-eslint/no-explicit-any localize(label: string, ...args: any[]): string; }; diff --git a/packages/salesforcedx-visualforce-language-server/src/visualforceServer.ts b/packages/salesforcedx-visualforce-language-server/src/visualforceServer.ts index 72c06295aa..b9bb97295e 100644 --- a/packages/salesforcedx-visualforce-language-server/src/visualforceServer.ts +++ b/packages/salesforcedx-visualforce-language-server/src/visualforceServer.ts @@ -25,7 +25,6 @@ import { ColorInformation, ColorPresentationRequest, DocumentColorRequest, - // eslint-disable-next-line @typescript-eslint/no-unused-vars ServerCapabilities as CPServerCapabilities } from 'vscode-languageserver-protocol'; import { ConfigurationParams, ConfigurationRequest } from 'vscode-languageserver-protocol'; diff --git a/packages/salesforcedx-vscode-apex-debugger/src/adapter/debugConfigurationProvider.ts b/packages/salesforcedx-vscode-apex-debugger/src/adapter/debugConfigurationProvider.ts index bb98d9daee..01c8f9dff5 100644 --- a/packages/salesforcedx-vscode-apex-debugger/src/adapter/debugConfigurationProvider.ts +++ b/packages/salesforcedx-vscode-apex-debugger/src/adapter/debugConfigurationProvider.ts @@ -26,7 +26,7 @@ export class DebugConfigurationProvider implements vscode.DebugConfigurationProv public provideDebugConfigurations( folder: vscode.WorkspaceFolder | undefined, - // eslint-disable-next-line @typescript-eslint/no-unused-vars + token?: vscode.CancellationToken ): vscode.ProviderResult { return [DebugConfigurationProvider.getConfig(folder)]; @@ -35,7 +35,7 @@ export class DebugConfigurationProvider implements vscode.DebugConfigurationProv public resolveDebugConfiguration( folder: vscode.WorkspaceFolder | undefined, config: vscode.DebugConfiguration, - // eslint-disable-next-line @typescript-eslint/no-unused-vars + token?: vscode.CancellationToken ): vscode.ProviderResult { return this.asyncDebugConfig(folder, config).catch(async err => { diff --git a/packages/salesforcedx-vscode-apex-debugger/src/context/isvContext.ts b/packages/salesforcedx-vscode-apex-debugger/src/context/isvContext.ts index 28352b8ba5..830dfd8f0d 100644 --- a/packages/salesforcedx-vscode-apex-debugger/src/context/isvContext.ts +++ b/packages/salesforcedx-vscode-apex-debugger/src/context/isvContext.ts @@ -27,11 +27,11 @@ export const registerIsvAuthWatcher = (extensionContext: vscode.ExtensionContext if (vscode.workspace.workspaceFolders instanceof Array && vscode.workspace.workspaceFolders.length > 0) { const configPath = projectPaths.salesforceProjectConfig(); const isvAuthWatcher = vscode.workspace.createFileSystemWatcher(configPath); - /* eslint-disable @typescript-eslint/no-unused-vars */ + isvAuthWatcher.onDidChange(uri => setupGlobalDefaultUserIsvAuth()); isvAuthWatcher.onDidCreate(uri => setupGlobalDefaultUserIsvAuth()); isvAuthWatcher.onDidDelete(uri => setupGlobalDefaultUserIsvAuth()); - /* eslint-enable @typescript-eslint/no-unused-vars */ + extensionContext.subscriptions.push(isvAuthWatcher); } }; diff --git a/packages/salesforcedx-vscode-apex-debugger/src/index.ts b/packages/salesforcedx-vscode-apex-debugger/src/index.ts index b7ea763ae3..2b57340130 100644 --- a/packages/salesforcedx-vscode-apex-debugger/src/index.ts +++ b/packages/salesforcedx-vscode-apex-debugger/src/index.ts @@ -185,7 +185,7 @@ export const getExceptionBreakpointCache = (): Map { const clsWatcher = vscode.workspace.createFileSystemWatcher('**/*.cls'); - /* eslint-disable @typescript-eslint/no-unused-vars */ + clsWatcher.onDidChange(uri => notifyDebuggerSessionFileChanged()); clsWatcher.onDidCreate(uri => notifyDebuggerSessionFileChanged()); clsWatcher.onDidDelete(uri => notifyDebuggerSessionFileChanged()); @@ -193,7 +193,7 @@ const registerFileWatchers = (): vscode.Disposable => { trgWatcher.onDidChange(uri => notifyDebuggerSessionFileChanged()); trgWatcher.onDidCreate(uri => notifyDebuggerSessionFileChanged()); trgWatcher.onDidDelete(uri => notifyDebuggerSessionFileChanged()); - /* eslint-enable @typescript-eslint/no-unused-vars */ + return vscode.Disposable.from(clsWatcher, trgWatcher); }; diff --git a/packages/salesforcedx-vscode-apex/out/apex-jorje-lsp.jar b/packages/salesforcedx-vscode-apex/out/apex-jorje-lsp.jar index ab6563a0dd..5aa0f5388c 100644 Binary files a/packages/salesforcedx-vscode-apex/out/apex-jorje-lsp.jar and b/packages/salesforcedx-vscode-apex/out/apex-jorje-lsp.jar differ diff --git a/packages/salesforcedx-vscode-apex/package.json b/packages/salesforcedx-vscode-apex/package.json index b35080fac4..aa4afa61c4 100644 --- a/packages/salesforcedx-vscode-apex/package.json +++ b/packages/salesforcedx-vscode-apex/package.json @@ -387,6 +387,11 @@ "type": "boolean", "default": false, "description": "%apex_code_disable-warnings-for-missing-coverage%" + }, + "salesforcedx-vscode-apex.enable-apex-ls-error-to-telemetry": { + "type": "boolean", + "default": false, + "description": "%enable-apex-ls-error-to-telemetry%" } } }, diff --git a/packages/salesforcedx-vscode-apex/package.nls.ja.json b/packages/salesforcedx-vscode-apex/package.nls.ja.json index 4e2d97476e..7b40d7e557 100644 --- a/packages/salesforcedx-vscode-apex/package.nls.ja.json +++ b/packages/salesforcedx-vscode-apex/package.nls.ja.json @@ -19,6 +19,7 @@ "apex_verbose_level_trace_description": "Output everything, including details about notifications and responses received by the client, and requests sent by the server.", "configuration_title": "Salesforce Apex Configuration", "collapse_tests_title": "SFDX: Apex テストを隠す", + "enable-apex-ls-error-to-telemetry": "Allow the Apex Language Server to collect telemetry of errors", "go_to_definition_title": "定義に移動", "java_home_description": "Specifies the folder path to the Java 11, Java 17, or Java 21 runtime used to launch the Apex Language Server. Note on Windows the backslashes must be escaped.\n\nMac Example: `/Library/Java/JavaVirtualMachines/openjdk-11.jdk/Contents/Home`\n\nWindows Example: `C:\\\\Program Files\\\\Zulu\\\\zulu-17`\n\nLinux Example: `/usr/lib/jvm/java-21-openjdk-amd64`", "refresh_test_title": "テストを更新", diff --git a/packages/salesforcedx-vscode-apex/package.nls.json b/packages/salesforcedx-vscode-apex/package.nls.json index f0adbccdb1..dec2adcb71 100644 --- a/packages/salesforcedx-vscode-apex/package.nls.json +++ b/packages/salesforcedx-vscode-apex/package.nls.json @@ -19,6 +19,7 @@ "apex_verbose_level_trace_description": "Output everything, including details about notifications and responses received by the client, and requests sent by the server.", "configuration_title": "Salesforce Apex Configuration", "collapse_tests_title": "SFDX: Collapse All Apex Tests", + "enable-apex-ls-error-to-telemetry": "Allow the Apex Language Server to collect telemetry of errors", "go_to_definition_title": "Go to Definition", "java_home_description": "Specifies the folder path to the Java 11, Java 17, or Java 21 runtime used to launch the Apex Language Server. Note on Windows the backslashes must be escaped.\n\nMac Example: `/Library/Java/JavaVirtualMachines/openjdk-11.jdk/Contents/Home`\n\nWindows Example: `C:\\\\Program Files\\\\Zulu\\\\zulu-17`\n\nLinux Example: `/usr/lib/jvm/java-21-openjdk-amd64`", "java_memory_description": "Specifies the amount of memory allocation to the Apex Language Server in MB, or null to use the system default value.", diff --git a/packages/salesforcedx-vscode-apex/src/languageServer.ts b/packages/salesforcedx-vscode-apex/src/languageServer.ts index b92c54a24b..9ef8b0137f 100644 --- a/packages/salesforcedx-vscode-apex/src/languageServer.ts +++ b/packages/salesforcedx-vscode-apex/src/languageServer.ts @@ -14,7 +14,7 @@ import { LSP_ERR, UBER_JAR_NAME } from './constants'; import { soqlMiddleware } from './embeddedSoql'; import { nls } from './messages'; import * as requirements from './requirements'; -import { retrieveEnableSyncInitJobs } from './settings'; +import { retrieveEnableApexLSErrorToTelemetry, retrieveEnableSyncInitJobs } from './settings'; import { getTelemetryService } from './telemetry/telemetry'; const JDWP_DEBUG_PORT = 2739; @@ -153,7 +153,8 @@ export const buildClientOptions = (): LanguageClientOptions => { }, initializationOptions: { enableEmbeddedSoqlCompletion: soqlExtensionInstalled, - enableSynchronizedInitJobs: retrieveEnableSyncInitJobs() + enableSynchronizedInitJobs: retrieveEnableSyncInitJobs(), + enableErrorToTelemetry: retrieveEnableApexLSErrorToTelemetry() }, ...(soqlExtensionInstalled ? { middleware: soqlMiddleware } : {}), errorHandler: new ApexErrorHandler() diff --git a/packages/salesforcedx-vscode-apex/src/settings.ts b/packages/salesforcedx-vscode-apex/src/settings.ts index cbf58c5d2f..4e195223dd 100644 --- a/packages/salesforcedx-vscode-apex/src/settings.ts +++ b/packages/salesforcedx-vscode-apex/src/settings.ts @@ -17,3 +17,9 @@ export const retrieveTestCodeCoverage = (): boolean => { export const retrieveEnableSyncInitJobs = (): boolean => { return vscode.workspace.getConfiguration().get('salesforcedx-vscode-apex.wait-init-jobs', true); }; + +export const retrieveEnableApexLSErrorToTelemetry = (): boolean => { + return vscode.workspace + .getConfiguration() + .get('salesforcedx-vscode-apex.enable-apex-ls-error-to-telemetry', false); +}; diff --git a/packages/salesforcedx-vscode-apex/src/views/testOutlineProvider.ts b/packages/salesforcedx-vscode-apex/src/views/testOutlineProvider.ts index 6d1cd7bf6d..d687db56bb 100644 --- a/packages/salesforcedx-vscode-apex/src/views/testOutlineProvider.ts +++ b/packages/salesforcedx-vscode-apex/src/views/testOutlineProvider.ts @@ -14,7 +14,6 @@ import { nls } from '../messages'; import { IconsEnum, iconHelpers } from './icons'; import { ApexTestMethod } from './lspConverter'; -// eslint-disable-next-line @typescript-eslint/no-unsafe-call, @typescript-eslint/no-unsafe-member-access const safeLocalize = (val: string) => nls.localize(val); // Message @@ -161,7 +160,7 @@ export class ApexTestOutlineProvider implements vscode.TreeDataProvider { testLevel: TestLevel.RunSpecifiedTests }); const apexLibExecutor = new ApexLibraryTestRunExecutor(['testClass', 'secondTestClass'], 'path/to/dir', false); - runTestStub.callsFake( - // eslint-disable-next-line @typescript-eslint/no-unused-vars - (payload, codecoverage, exitEarly, progressReporter, token) => { - progressReporter.report({ - type: 'StreamingClientProgress', - value: 'streamingTransportUp', - message: 'Listening for streaming state changes...' - }); - progressReporter.report({ - type: 'StreamingClientProgress', - value: 'streamingProcessingTestRun', - message: 'Processing test run 707500000000000001', - testRunId: '707500000000000001' - }); - progressReporter.report({ - type: 'FormatTestResultProgress', - value: 'retrievingTestRunSummary', - message: 'Retrieving test run summary record' - }); - progressReporter.report({ - type: 'FormatTestResultProgress', - value: 'queryingForAggregateCodeCoverage', - message: 'Querying for aggregate code coverage results' - }); - return passingResult; - } - ); + runTestStub.callsFake((payload, codecoverage, exitEarly, progressReporter, token) => { + progressReporter.report({ + type: 'StreamingClientProgress', + value: 'streamingTransportUp', + message: 'Listening for streaming state changes...' + }); + progressReporter.report({ + type: 'StreamingClientProgress', + value: 'streamingProcessingTestRun', + message: 'Processing test run 707500000000000001', + testRunId: '707500000000000001' + }); + progressReporter.report({ + type: 'FormatTestResultProgress', + value: 'retrievingTestRunSummary', + message: 'Retrieving test run summary record' + }); + progressReporter.report({ + type: 'FormatTestResultProgress', + value: 'queryingForAggregateCodeCoverage', + message: 'Querying for aggregate code coverage results' + }); + return passingResult; + }); await apexLibExecutor.run(undefined, progress, cancellationToken); diff --git a/packages/salesforcedx-vscode-core/src/commands/aliasList.ts b/packages/salesforcedx-vscode-core/src/commands/aliasList.ts index e2eefd6718..673ce1c7f5 100644 --- a/packages/salesforcedx-vscode-core/src/commands/aliasList.ts +++ b/packages/salesforcedx-vscode-core/src/commands/aliasList.ts @@ -10,7 +10,6 @@ import { nls } from '../messages'; import { EmptyParametersGatherer, SfCommandlet, SfCommandletExecutor, SfWorkspaceChecker } from './util'; export class AliasList extends SfCommandletExecutor<{}> { - // eslint-disable-next-line @typescript-eslint/no-unused-vars public build(data: {}): Command { return new SfCommandBuilder() .withDescription(nls.localize('alias_list_text')) diff --git a/packages/salesforcedx-vscode-core/src/commands/auth/orgLoginAccessToken.ts b/packages/salesforcedx-vscode-core/src/commands/auth/orgLoginAccessToken.ts index 80696e5713..8832805f82 100644 --- a/packages/salesforcedx-vscode-core/src/commands/auth/orgLoginAccessToken.ts +++ b/packages/salesforcedx-vscode-core/src/commands/auth/orgLoginAccessToken.ts @@ -19,7 +19,6 @@ export class OrgLoginAccessTokenExecutor extends LibraryCommandletExecutor, progress?: vscode.Progress<{ @@ -27,7 +26,6 @@ export class OrgLoginAccessTokenExecutor extends LibraryCommandletExecutor, token?: vscode.CancellationToken - /* eslint-enable @typescript-eslint/no-unused-vars */ ): Promise { const { instanceUrl, accessToken, alias } = response.data; try { diff --git a/packages/salesforcedx-vscode-core/src/commands/auth/orgLogout.ts b/packages/salesforcedx-vscode-core/src/commands/auth/orgLogout.ts index bf4ff1d446..aa3fa5d42c 100644 --- a/packages/salesforcedx-vscode-core/src/commands/auth/orgLogout.ts +++ b/packages/salesforcedx-vscode-core/src/commands/auth/orgLogout.ts @@ -35,7 +35,6 @@ export class OrgLogoutAll extends SfCommandletExecutor<{}> { return instance; } - // eslint-disable-next-line @typescript-eslint/no-unused-vars public build(data: {}): Command { return new SfCommandBuilder() .withDescription(nls.localize('org_logout_all_text')) @@ -61,7 +60,6 @@ export class OrgLogoutDefault extends LibraryCommandletExecutor { super(nls.localize('org_logout_default_text'), 'org_logout_default', OUTPUT_CHANNEL); } - /* eslint-disable @typescript-eslint/no-unused-vars */ public async run( response: ContinueResponse, progress?: Progress<{ @@ -69,7 +67,6 @@ export class OrgLogoutDefault extends LibraryCommandletExecutor { increment?: number | undefined; }>, token?: CancellationToken - /* eslint-enable @typescript-eslint/no-unused-vars */ ): Promise { try { await removeUsername(response.data); diff --git a/packages/salesforcedx-vscode-core/src/commands/configList.ts b/packages/salesforcedx-vscode-core/src/commands/configList.ts index bfc3790c79..5d52a6e65a 100644 --- a/packages/salesforcedx-vscode-core/src/commands/configList.ts +++ b/packages/salesforcedx-vscode-core/src/commands/configList.ts @@ -10,7 +10,6 @@ import { nls } from '../messages'; import { EmptyParametersGatherer, SfCommandlet, SfCommandletExecutor, SfWorkspaceChecker } from './util'; export class ConfigList extends SfCommandletExecutor<{}> { - // eslint-disable-next-line @typescript-eslint/no-unused-vars public build(data: {}): Command { return new SfCommandBuilder() .withDescription(nls.localize('config_list_text')) diff --git a/packages/salesforcedx-vscode-core/src/commands/configSet.ts b/packages/salesforcedx-vscode-core/src/commands/configSet.ts index bca30d5efa..54c37f6aff 100644 --- a/packages/salesforcedx-vscode-core/src/commands/configSet.ts +++ b/packages/salesforcedx-vscode-core/src/commands/configSet.ts @@ -33,7 +33,6 @@ export class ConfigSetExecutor extends LibraryCommandletExecutor<{}> { this.usernameOrAlias = `${usernameOrAlias}`.split(',')[0]; } - // eslint-disable-next-line @typescript-eslint/no-unused-vars public async run(response: ContinueResponse): Promise { let result: boolean; let message: string | undefined; diff --git a/packages/salesforcedx-vscode-core/src/commands/dataQuery.ts b/packages/salesforcedx-vscode-core/src/commands/dataQuery.ts index d1787f37b5..2212eed3c8 100644 --- a/packages/salesforcedx-vscode-core/src/commands/dataQuery.ts +++ b/packages/salesforcedx-vscode-core/src/commands/dataQuery.ts @@ -87,7 +87,6 @@ export enum ApiType { const workspaceChecker = new SfWorkspaceChecker(); -// eslint-disable-next-line @typescript-eslint/no-unused-vars export const dataQuery = (explorerDir?: any): void => { const parameterGatherer = new GetQueryAndApiInputs(); const commandlet = new SfCommandlet(workspaceChecker, parameterGatherer, new DataQueryExecutor()); diff --git a/packages/salesforcedx-vscode-core/src/commands/debuggerStop.ts b/packages/salesforcedx-vscode-core/src/commands/debuggerStop.ts index b982189361..faf45cdf51 100644 --- a/packages/salesforcedx-vscode-core/src/commands/debuggerStop.ts +++ b/packages/salesforcedx-vscode-core/src/commands/debuggerStop.ts @@ -58,7 +58,6 @@ export class DebuggerSessionDetachExecutor extends SfCommandletExecutor { - // eslint-disable-next-line @typescript-eslint/no-unused-vars public build(data: {}): Command { return new SfCommandBuilder() .withArg('data:query') diff --git a/packages/salesforcedx-vscode-core/src/commands/describeMetadata.ts b/packages/salesforcedx-vscode-core/src/commands/describeMetadata.ts index 73e22f9206..3626ea745c 100644 --- a/packages/salesforcedx-vscode-core/src/commands/describeMetadata.ts +++ b/packages/salesforcedx-vscode-core/src/commands/describeMetadata.ts @@ -23,7 +23,6 @@ export class DescribeMetadataExecutor extends SfCommandletExecutor { super(); } - // eslint-disable-next-line @typescript-eslint/no-unused-vars public build(data: {}): Command { return new SfCommandBuilder() .withArg('org:list:metadata-types') diff --git a/packages/salesforcedx-vscode-core/src/commands/isvdebugging/bootstrapCmd.ts b/packages/salesforcedx-vscode-core/src/commands/isvdebugging/bootstrapCmd.ts index 1467f02a14..bc873f5415 100644 --- a/packages/salesforcedx-vscode-core/src/commands/isvdebugging/bootstrapCmd.ts +++ b/packages/salesforcedx-vscode-core/src/commands/isvdebugging/bootstrapCmd.ts @@ -35,7 +35,7 @@ import { } from '../projectGenerate'; import { CompositeParametersGatherer, EmptyPreChecker, SfCommandlet, SfCommandletExecutor } from '../util'; // below uses require due to bundling restrictions -// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-unused-vars +// eslint-disable-next-line @typescript-eslint/no-var-requires const AdmZip = require('adm-zip'); export type InstalledPackageInfo = { @@ -56,7 +56,6 @@ export class IsvDebugBootstrapExecutor extends SfCommandletExecutor<{}> { public readonly relativeApexPackageXmlPath = path.join(this.relativeMetadataTempPath, PACKAGE_XML); public readonly relativeInstalledPackagesPath = path.join(projectPaths.relativeToolsFolder(), INSTALLED_PACKAGES); - // eslint-disable-next-line @typescript-eslint/no-unused-vars public build(data: {}): Command { throw new Error('not in use'); } @@ -349,12 +348,10 @@ export class IsvDebugBootstrapExecutor extends SfCommandletExecutor<{}> { return result; } - /* eslint-disable @typescript-eslint/no-unused-vars */ protected attachExecution( execution: CommandExecution, cancellationTokenSource: vscode.CancellationTokenSource, cancellationToken: vscode.CancellationToken - /* eslint-enable @typescript-eslint/no-unused-vars */ ) { channelService.streamCommandOutput(execution); channelService.showChannelOutput(); diff --git a/packages/salesforcedx-vscode-core/src/commands/listMetadata.ts b/packages/salesforcedx-vscode-core/src/commands/listMetadata.ts index 5cc9a84eb8..f8e61fb38c 100644 --- a/packages/salesforcedx-vscode-core/src/commands/listMetadata.ts +++ b/packages/salesforcedx-vscode-core/src/commands/listMetadata.ts @@ -28,7 +28,6 @@ export class ListMetadataExecutor extends SfCommandletExecutor { this.folder = folder; } - // eslint-disable-next-line @typescript-eslint/no-unused-vars public build(data: {}): Command { const builder = new SfCommandBuilder() .withArg('org:list:metadata') diff --git a/packages/salesforcedx-vscode-core/src/commands/orgCreate.ts b/packages/salesforcedx-vscode-core/src/commands/orgCreate.ts index e4cb51e3c1..9b0e3b99cb 100644 --- a/packages/salesforcedx-vscode-core/src/commands/orgCreate.ts +++ b/packages/salesforcedx-vscode-core/src/commands/orgCreate.ts @@ -74,7 +74,6 @@ export class OrgCreateExecutor extends SfCommandletExecutor { this.logMetric(execution.command.logName, startTime); try { diff --git a/packages/salesforcedx-vscode-core/src/commands/orgList.ts b/packages/salesforcedx-vscode-core/src/commands/orgList.ts index 01e343c243..a4740c31e6 100644 --- a/packages/salesforcedx-vscode-core/src/commands/orgList.ts +++ b/packages/salesforcedx-vscode-core/src/commands/orgList.ts @@ -10,7 +10,6 @@ import { nls } from '../messages'; import { PromptConfirmGatherer, SfCommandlet, SfCommandletExecutor, SfWorkspaceChecker } from './util'; export class OrgListExecutor extends SfCommandletExecutor<{}> { - // eslint-disable-next-line @typescript-eslint/no-unused-vars public build(data: { choice?: string }): Command { return new SfCommandBuilder() .withDescription(nls.localize('org_list_clean_text')) diff --git a/packages/salesforcedx-vscode-core/src/commands/orgOpen.ts b/packages/salesforcedx-vscode-core/src/commands/orgOpen.ts index 7e0a45f5e4..d86f1ff9fe 100644 --- a/packages/salesforcedx-vscode-core/src/commands/orgOpen.ts +++ b/packages/salesforcedx-vscode-core/src/commands/orgOpen.ts @@ -24,7 +24,6 @@ import { workspaceUtils } from '../util'; import { EmptyParametersGatherer, SfCommandlet, SfCommandletExecutor, SfWorkspaceChecker } from './util'; export class OrgOpenContainerExecutor extends SfCommandletExecutor<{}> { - // eslint-disable-next-line @typescript-eslint/no-unused-vars public build(data: {}): Command { return new SfCommandBuilder() .withDescription(nls.localize('org_open_default_scratch_org_text')) @@ -94,7 +93,7 @@ export class OrgOpenContainerExecutor extends SfCommandletExecutor<{}> { export class OrgOpenExecutor extends SfCommandletExecutor<{}> { protected showChannelOutput = false; - // eslint-disable-next-line @typescript-eslint/no-unused-vars + public build(data: {}): Command { return new SfCommandBuilder() .withDescription(nls.localize('org_open_default_scratch_org_text')) diff --git a/packages/salesforcedx-vscode-core/src/commands/projectGenerateManifest.ts b/packages/salesforcedx-vscode-core/src/commands/projectGenerateManifest.ts index aea1b3e8a7..76edf544ad 100644 --- a/packages/salesforcedx-vscode-core/src/commands/projectGenerateManifest.ts +++ b/packages/salesforcedx-vscode-core/src/commands/projectGenerateManifest.ts @@ -30,7 +30,7 @@ export class GenerateManifestExecutor extends LibraryCommandletExecutor this.sourcePaths = sourcePaths; this.responseText = responseText; } - /* eslint-disable @typescript-eslint/no-unused-vars */ + public async run( response: ContinueResponse, progress?: vscode.Progress<{ @@ -38,7 +38,6 @@ export class GenerateManifestExecutor extends LibraryCommandletExecutor increment?: number | undefined; }>, token?: vscode.CancellationToken - /* eslint-enable @typescript-eslint/no-unused-vars */ ): Promise { if (this.sourcePaths) { const packageXML = await ComponentSet.fromSource(this.sourcePaths).getPackageXml(); diff --git a/packages/salesforcedx-vscode-core/src/commands/projectRetrieveStart.ts b/packages/salesforcedx-vscode-core/src/commands/projectRetrieveStart.ts index a525ac956c..2deaf6fb06 100644 --- a/packages/salesforcedx-vscode-core/src/commands/projectRetrieveStart.ts +++ b/packages/salesforcedx-vscode-core/src/commands/projectRetrieveStart.ts @@ -50,7 +50,6 @@ export class ProjectRetrieveStartExecutor extends SfCommandletExecutor<{}> { this.flag = flag; } - // eslint-disable-next-line @typescript-eslint/no-unused-vars public build(data: {}): Command { const builder = new SfCommandBuilder() .withDescription(nls.localize(this.params.description.default)) diff --git a/packages/salesforcedx-vscode-core/src/commands/refreshSObjects.ts b/packages/salesforcedx-vscode-core/src/commands/refreshSObjects.ts index 0ca8e3f91a..8987df7d4b 100644 --- a/packages/salesforcedx-vscode-core/src/commands/refreshSObjects.ts +++ b/packages/salesforcedx-vscode-core/src/commands/refreshSObjects.ts @@ -83,7 +83,7 @@ export class RefreshSObjectsExecutor extends SfCommandletExecutor<{}> { public static readonly onRefreshSObjectsCommandCompletion = RefreshSObjectsExecutor.refreshSObjectsCommandCompletionEventEmitter.event; private static isActive = false; - // eslint-disable-next-line @typescript-eslint/no-unused-vars + public build(data: {}): Command { return new SfCommandBuilder() .withDescription(nls.localize('sobjects_refresh')) diff --git a/packages/salesforcedx-vscode-core/src/commands/source/sourceTrackingGetStatusExecutor.ts b/packages/salesforcedx-vscode-core/src/commands/source/sourceTrackingGetStatusExecutor.ts index aeea66004d..8ef460eb47 100644 --- a/packages/salesforcedx-vscode-core/src/commands/source/sourceTrackingGetStatusExecutor.ts +++ b/packages/salesforcedx-vscode-core/src/commands/source/sourceTrackingGetStatusExecutor.ts @@ -27,7 +27,6 @@ export class SourceTrackingGetStatusExecutor extends LibraryCommandletExecutor): Promise { await this.execute(); return true; diff --git a/packages/salesforcedx-vscode-core/src/commands/startApexDebugLogging.ts b/packages/salesforcedx-vscode-core/src/commands/startApexDebugLogging.ts index 56a52daf2f..a0e80adbd7 100644 --- a/packages/salesforcedx-vscode-core/src/commands/startApexDebugLogging.ts +++ b/packages/salesforcedx-vscode-core/src/commands/startApexDebugLogging.ts @@ -37,7 +37,6 @@ export class StartApexDebugLoggingExecutor extends SfCommandletExecutor<{}> { channelService.streamCommandOutput(execution); } - // eslint-disable-next-line @typescript-eslint/no-unused-vars public async execute(response: ContinueResponse<{}>): Promise { const startTime = process.hrtime(); const executionWrapper = new CompositeCliCommandExecutor(this.build()).execute(this.cancellationToken); diff --git a/packages/salesforcedx-vscode-core/src/commands/stopApexDebugLogging.ts b/packages/salesforcedx-vscode-core/src/commands/stopApexDebugLogging.ts index 4069f60aed..751b1bbdb3 100644 --- a/packages/salesforcedx-vscode-core/src/commands/stopApexDebugLogging.ts +++ b/packages/salesforcedx-vscode-core/src/commands/stopApexDebugLogging.ts @@ -20,7 +20,6 @@ export class StopApexDebugLoggingExecutor extends SfCommandletExecutor<{}> { return deleteTraceFlag(); } - // eslint-disable-next-line @typescript-eslint/no-unused-vars public execute(response: ContinueResponse<{}>): void { const startTime = process.hrtime(); const cancellationTokenSource = new vscode.CancellationTokenSource(); diff --git a/packages/salesforcedx-vscode-core/src/commands/templates/baseTemplateCommand.ts b/packages/salesforcedx-vscode-core/src/commands/templates/baseTemplateCommand.ts index 9b8e0ea5a1..ce3c50154d 100644 --- a/packages/salesforcedx-vscode-core/src/commands/templates/baseTemplateCommand.ts +++ b/packages/salesforcedx-vscode-core/src/commands/templates/baseTemplateCommand.ts @@ -49,7 +49,6 @@ export abstract class BaseTemplateCommand extends SfCommandletExecutor implements CommandletExecutor { return parsed; } - /* eslint-disable @typescript-eslint/no-unused-vars */ protected getTelemetryData( success: boolean, response: ContinueResponse, output: string - /* eslint-enable @typescript-eslint/no-unused-vars */ ): TelemetryData | undefined { return; } @@ -117,7 +115,7 @@ export abstract class SfCommandletExecutor implements CommandletExecutor { * timestamps post-operation, in order to be in sync for the * "Detect Conflicts at Sync" setting. */ - // eslint-disable-next-line @typescript-eslint/no-unused-vars + protected updateCache(result: any): void {} public abstract build(data: T): Command; diff --git a/packages/salesforcedx-vscode-core/src/conflict/conflictNode.ts b/packages/salesforcedx-vscode-core/src/conflict/conflictNode.ts index cec0a1f975..28e2179fd6 100644 --- a/packages/salesforcedx-vscode-core/src/conflict/conflictNode.ts +++ b/packages/salesforcedx-vscode-core/src/conflict/conflictNode.ts @@ -52,7 +52,7 @@ export class ConflictNode extends vscode.TreeItem { } // TODO: create issue to track this - // eslint-disable-next-line @typescript-eslint/ban-ts-comment + // @ts-ignore get tooltip() { if (this._conflict) { diff --git a/packages/salesforcedx-vscode-core/src/index.ts b/packages/salesforcedx-vscode-core/src/index.ts index 554e21bd36..9a42218b71 100644 --- a/packages/salesforcedx-vscode-core/src/index.ts +++ b/packages/salesforcedx-vscode-core/src/index.ts @@ -113,17 +113,14 @@ const flagIgnoreConflicts: FlagParameter = { flag: '--ignore-conflicts' }; -const registerCommands = ( - // eslint-disable-next-line @typescript-eslint/no-unused-vars - extensionContext: vscode.ExtensionContext -): vscode.Disposable => { +const registerCommands = (extensionContext: vscode.ExtensionContext): vscode.Disposable => { // Customer-facing commands const orgLoginAccessTokenCmd = vscode.commands.registerCommand('sf.org.login.access.token', orgLoginAccessToken); const orgLoginWebCmd = vscode.commands.registerCommand('sf.org.login.web', orgLoginWeb); const orgLoginWebDevHubCmd = vscode.commands.registerCommand('sf.org.login.web.dev.hub', orgLoginWebDevHub); - // eslint-disable-next-line @typescript-eslint/no-unused-vars + const orgLogoutAllCmd = vscode.commands.registerCommand('sf.org.logout.all', orgLogoutAll); - // eslint-disable-next-line @typescript-eslint/no-unused-vars + const orgLogoutDefaultCmd = vscode.commands.registerCommand('sf.org.logout.default', orgLogoutDefault); const openDocumentationCmd = vscode.commands.registerCommand('sf.open.documentation', openDocumentation); const orgCreateCmd = vscode.commands.registerCommand('sf.org.create', orgCreate); @@ -241,12 +238,10 @@ const registerCommands = ( const diffFile = vscode.commands.registerCommand('sf.diff', sourceDiff); - // eslint-disable-next-line @typescript-eslint/no-unused-vars const diffFolder = vscode.commands.registerCommand('sf.folder.diff', sourceFolderDiff); const forceRefreshSObjectsCmd = vscode.commands.registerCommand('sf.internal.refreshsobjects', refreshSObjects); - // eslint-disable-next-line @typescript-eslint/no-unused-vars const renameLightningComponentCmd = vscode.commands.registerCommand( 'sf.rename.lightning.component', renameLightningComponent @@ -323,10 +318,7 @@ const registerCommands = ( ); }; -const registerInternalDevCommands = ( - // eslint-disable-next-line @typescript-eslint/no-unused-vars - extensionContext: vscode.ExtensionContext -): vscode.Disposable => { +const registerInternalDevCommands = (extensionContext: vscode.ExtensionContext): vscode.Disposable => { const internalLightningGenerateAppCmd = vscode.commands.registerCommand( 'sf.internal.lightning.generate.app', internalLightningGenerateApp diff --git a/packages/salesforcedx-vscode-core/src/orgBrowser/metadataOutlineProvider.ts b/packages/salesforcedx-vscode-core/src/orgBrowser/metadataOutlineProvider.ts index f5e394e0be..0057e22334 100644 --- a/packages/salesforcedx-vscode-core/src/orgBrowser/metadataOutlineProvider.ts +++ b/packages/salesforcedx-vscode-core/src/orgBrowser/metadataOutlineProvider.ts @@ -68,7 +68,6 @@ export class MetadataOutlineProvider implements vscode.TreeDataProvider { - // eslint-disable-next-line @typescript-eslint/no-unused-vars public apply(item: typeof workspace): PredicateResponse { if (!workspaceUtils.hasRootWorkspace()) { return PredicateResponse.of(false, nls.localize('predicates_no_folder_opened_text')); diff --git a/packages/salesforcedx-vscode-core/src/services/getCoreLoggerService.ts b/packages/salesforcedx-vscode-core/src/services/getCoreLoggerService.ts index 88144baba4..d1fbd27337 100644 --- a/packages/salesforcedx-vscode-core/src/services/getCoreLoggerService.ts +++ b/packages/salesforcedx-vscode-core/src/services/getCoreLoggerService.ts @@ -5,8 +5,6 @@ * For full license text, see LICENSE.txt file in the repo root or https://opensource.org/licenses/BSD-3-Clause */ -/* eslint-disable @typescript-eslint/no-unused-vars */ - import { FieldValue, Fields, LoggerInterface, LogLine, LoggerLevelValue } from '@salesforce/vscode-service-provider'; export class CoreLoggerService implements LoggerInterface { diff --git a/packages/salesforcedx-vscode-lwc/src/commands/lightningLwcStart.ts b/packages/salesforcedx-vscode-lwc/src/commands/lightningLwcStart.ts index 799832a933..f5ef918d27 100644 --- a/packages/salesforcedx-vscode-lwc/src/commands/lightningLwcStart.ts +++ b/packages/salesforcedx-vscode-lwc/src/commands/lightningLwcStart.ts @@ -66,7 +66,6 @@ export class LightningLwcStartExecutor extends SfCommandletExecutor<{}> { ); } - // eslint-disable-next-line @typescript-eslint/no-unused-vars public execute(response: ContinueResponse<{}>): void { const startTime = process.hrtime(); const cancellationTokenSource = new vscode.CancellationTokenSource(); diff --git a/packages/salesforcedx-vscode-lwc/src/index.ts b/packages/salesforcedx-vscode-lwc/src/index.ts index 172f106f14..4fa485a3e0 100644 --- a/packages/salesforcedx-vscode-lwc/src/index.ts +++ b/packages/salesforcedx-vscode-lwc/src/index.ts @@ -114,7 +114,6 @@ const getActivationMode = (): string => { return config.get('activationMode') || 'autodetect'; // default to autodetect }; -// eslint-disable-next-line @typescript-eslint/no-unused-vars const registerCommands = (_extensionContext: ExtensionContext): Disposable => { return Disposable.from( commands.registerCommand('sf.lightning.lwc.start', lightningLwcStart), diff --git a/packages/salesforcedx-vscode-lwc/src/testSupport/codeLens/provideLwcTestCodeLens.ts b/packages/salesforcedx-vscode-lwc/src/testSupport/codeLens/provideLwcTestCodeLens.ts index 857b9b541d..930292476a 100644 --- a/packages/salesforcedx-vscode-lwc/src/testSupport/codeLens/provideLwcTestCodeLens.ts +++ b/packages/salesforcedx-vscode-lwc/src/testSupport/codeLens/provideLwcTestCodeLens.ts @@ -18,7 +18,7 @@ import { TestExecutionInfo, TestInfoKind, TestType } from '../types'; */ export const provideLwcTestCodeLens = async ( document: TextDocument, - // eslint-disable-next-line @typescript-eslint/no-unused-vars + token: CancellationToken ): Promise => { const fsPath = document.uri.fsPath; diff --git a/packages/salesforcedx-vscode-soql/src/editor/soqlEditorProvider.ts b/packages/salesforcedx-vscode-soql/src/editor/soqlEditorProvider.ts index bc057723ed..f12c0708e3 100644 --- a/packages/salesforcedx-vscode-soql/src/editor/soqlEditorProvider.ts +++ b/packages/salesforcedx-vscode-soql/src/editor/soqlEditorProvider.ts @@ -28,7 +28,7 @@ export class SOQLEditorProvider implements vscode.CustomTextEditorProvider { public async resolveCustomTextEditor( document: vscode.TextDocument, webviewPanel: vscode.WebviewPanel, - // eslint-disable-next-line + _token: vscode.CancellationToken ): Promise { const soqlBuilderWebAssetsPathParam: string[] = diff --git a/packages/salesforcedx-vscode-soql/src/lspClient/codeCompletion.ts b/packages/salesforcedx-vscode-soql/src/lspClient/codeCompletion.ts index 07002cd3af..495a009a33 100644 --- a/packages/salesforcedx-vscode-soql/src/lspClient/codeCompletion.ts +++ b/packages/salesforcedx-vscode-soql/src/lspClient/codeCompletion.ts @@ -60,7 +60,6 @@ async function filterByContext( return filteredItems; } -// eslint-disable-next-line @typescript-eslint/no-explicit-any function isString(x: any): x is string { return typeof x === 'string'; } @@ -208,7 +207,7 @@ const expandFunctions: { .map(v => newCompletionItem( v.value, - // eslint-disable-next-line @typescript-eslint/restrict-plus-operands + "'" + v.value + "'", CompletionItemKind.Value )