diff --git a/.eslintignore b/.eslintignore index 083b9d650d0c..20ecc74387d9 100644 --- a/.eslintignore +++ b/.eslintignore @@ -149,7 +149,6 @@ src/client/interpreter/virtualEnvs/condaInheritEnvPrompt.ts src/client/interpreter/activation/service.ts src/client/interpreter/display/index.ts -src/client/api.ts src/client/extension.ts src/client/sourceMapSupport.ts src/client/startupTelemetry.ts diff --git a/src/client/api.ts b/src/client/api.ts index 78663feab712..787b4d8ba32c 100644 --- a/src/client/api.ts +++ b/src/client/api.ts @@ -1,3 +1,4 @@ +/* eslint-disable @typescript-eslint/no-explicit-any */ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. @@ -13,10 +14,11 @@ import { getDebugpyLauncherArgs, getDebugpyPackagePath } from './debugger/extens import { IInterpreterService } from './interpreter/contracts'; import { IServiceContainer, IServiceManager } from './ioc/types'; import { JupyterExtensionIntegration } from './jupyter/jupyterIntegration'; +import { IDataViewerDataProvider, IJupyterUriProvider } from './jupyter/types'; import { traceError } from './logging'; export function buildApi( - ready: Promise, + ready: Promise, serviceManager: IServiceManager, serviceContainer: IServiceContainer, ): IExtensionApi { @@ -47,7 +49,7 @@ export function buildApi( async getRemoteLauncherCommand( host: string, port: number, - waitUntilDebuggerAttaches: boolean = true, + waitUntilDebuggerAttaches = true, ): Promise { return getDebugpyLauncherArgs({ host, @@ -62,7 +64,7 @@ export function buildApi( settings: { onDidChangeExecutionDetails: interpreterService.onDidChangeInterpreterConfiguration, getExecutionDetails(resource?: Resource) { - const pythonPath = configurationService.getSettings(resource).pythonPath; + const { pythonPath } = configurationService.getSettings(resource); // If pythonPath equals an empty string, no interpreter is set. return { execCommand: pythonPath === '' ? undefined : [pythonPath] }; }, @@ -72,10 +74,10 @@ export function buildApi( datascience: { registerRemoteServerProvider: jupyterIntegration ? jupyterIntegration.registerRemoteServerProvider.bind(jupyterIntegration) - : (noop as any), + : ((noop as unknown) as (serverProvider: IJupyterUriProvider) => void), showDataViewer: jupyterIntegration ? jupyterIntegration.showDataViewer.bind(jupyterIntegration) - : (noop as any), + : ((noop as unknown) as (dataProvider: IDataViewerDataProvider, title: string) => Promise), }, pylance: { getPythonPathVar: async (resource?: Uri) => {