From b368ea9326c13d6497e0f070d89d810d4ff86416 Mon Sep 17 00:00:00 2001 From: Rich Chiodo Date: Thu, 14 Jan 2021 16:51:36 -0800 Subject: [PATCH] Migrate to ESLint (#4397) * Migrate to ESLint * Update contributing * Maybe tslint is still required * Fix merge problem * Fix prettier errors * Fix tsx files * Add promise watching * Remove bogus code --- .eslintrc | 121 -- .eslintrc.js | 1336 +++++++++++++++++ .github/workflows/main.yml | 4 +- .vscode/tasks.json | 16 +- .vscodeignore | 2 +- CONTRIBUTING.md | 7 +- build/.eslintrc | 41 - package-lock.json | 1156 ++++++++++---- package.json | 21 +- .../migrateDataScienceSettingsService.ts | 2 +- src/client/activation/serviceRegistry.ts | 2 +- src/client/api.ts | 6 +- src/client/api/pythonApi.ts | 22 +- .../application/applicationEnvironment.ts | 6 +- .../common/application/applicationShell.ts | 2 +- .../common/application/commandManager.ts | 2 +- .../common/application/customEditorService.ts | 6 +- src/client/common/application/debugService.ts | 4 +- .../common/application/documentManager.ts | 2 +- .../common/application/encryptedStorage.ts | 2 +- src/client/common/application/extensions.ts | 4 +- src/client/common/application/notebook.ts | 4 +- src/client/common/application/types.ts | 6 +- .../webviewPanels/webviewPanelProvider.ts | 2 +- .../webviewViews/webviewViewProvider.ts | 2 +- .../common/application/webviews/webview.ts | 4 +- src/client/common/configSettings.ts | 26 +- src/client/common/crypto.ts | 4 +- src/client/common/editor.ts | 14 +- src/client/common/errors/errorUtils.ts | 2 +- src/client/common/experiments/telemetry.ts | 4 +- src/client/common/extensions.ts | 6 +- .../common/featureDeprecationManager.ts | 2 +- src/client/common/helpers.ts | 2 +- .../common/installer/productInstaller.ts | 6 +- src/client/common/installer/productNames.ts | 2 +- src/client/common/installer/productPath.ts | 4 +- src/client/common/net/browser.ts | 2 +- src/client/common/net/fileDownloader.ts | 2 +- src/client/common/net/httpClient.ts | 8 +- src/client/common/net/socket/SocketStream.ts | 2 +- .../net/socket/socketCallbackHandler.ts | 2 +- src/client/common/net/socket/socketServer.ts | 2 +- src/client/common/platform/constants.ts | 2 +- src/client/common/platform/fileSystem.ts | 4 +- src/client/common/platform/fileSystemUtils.ts | 4 +- src/client/common/platform/fs-paths.ts | 2 +- src/client/common/platform/fs-temp.ts | 4 +- src/client/common/platform/pathUtils.ts | 8 +- src/client/common/platform/platformService.ts | 2 +- src/client/common/process/baseDaemon.ts | 16 +- .../common/process/internal/scripts/index.ts | 6 +- src/client/common/process/proc.ts | 4 +- src/client/common/process/pythonDaemonPool.ts | 4 +- .../common/process/pythonEnvironment.ts | 2 +- src/client/common/process/types.ts | 4 +- src/client/common/serviceRegistry.ts | 2 +- src/client/common/types.ts | 6 +- src/client/common/utils/async.ts | 30 +- src/client/common/utils/cacheUtils.ts | 2 +- src/client/common/utils/decorators.ts | 28 +- src/client/common/utils/localize.ts | 2 +- src/client/common/utils/logging.ts | 2 +- src/client/common/utils/misc.ts | 14 +- src/client/common/utils/multiStepInput.ts | 4 +- src/client/common/utils/platform.ts | 2 +- src/client/common/utils/serializers.ts | 18 +- src/client/common/utils/sysTypes.ts | 2 +- src/client/common/utils/version.ts | 2 +- .../variables/environmentVariablesProvider.ts | 2 +- src/client/common/variables/sysTypes.ts | 2 +- .../common/variables/systemVariables.ts | 16 +- src/client/common/variables/types.ts | 2 +- src/client/datascience/baseJupyterSession.ts | 12 +- src/client/datascience/codeCssGenerator.ts | 12 +- .../datascience/commands/commandRegistry.ts | 2 +- .../datascience/commands/exportCommands.ts | 2 +- src/client/datascience/common.ts | 6 +- .../datascience/data-viewing/dataViewer.ts | 2 +- .../data-viewing/dataViewerMessageListener.ts | 2 +- src/client/datascience/data-viewing/types.ts | 2 +- .../datascience/dataScienceSurveyBanner.ts | 6 +- src/client/datascience/datascience.ts | 2 +- .../editor-integration/cellhashprovider.ts | 14 +- .../editor-integration/codeLensFactory.ts | 14 +- .../editor-integration/decorator.ts | 4 +- .../editor-integration/hoverProvider.ts | 2 +- src/client/datascience/export/exportBase.ts | 3 +- .../datascience/export/exportManager.ts | 2 +- .../interactive-common/debugListener.ts | 2 +- .../intellisense/conversion.ts | 18 +- .../intellisense/intellisenseProvider.ts | 2 +- .../intellisense/wordHelper.ts | 4 +- .../interactive-common/interactiveBase.ts | 26 +- .../interactiveWindowMessageListener.ts | 2 +- .../interactiveWindowTypes.ts | 6 +- .../interactive-common/linkProvider.ts | 2 +- .../interactive-common/serialization.ts | 2 +- .../interactive-common/showPlotListener.ts | 2 +- .../interactive-common/synchronization.ts | 4 +- .../datascience/interactive-common/types.ts | 2 +- .../interactive-ipynb/autoSaveService.ts | 2 +- .../interactive-ipynb/nativeEditor.ts | 20 +- .../nativeEditorOldWebView.ts | 4 +- .../nativeEditorProviderOld.ts | 2 +- .../nativeEditorRunByLineListener.ts | 2 +- .../nativeEditorSynchronizer.ts | 2 +- .../interactive-window/interactiveWindow.ts | 8 +- .../interactiveWindowCommandListener.ts | 4 +- .../interactiveWindowProvider.ts | 4 +- .../cdnWidgetScriptSourceProvider.ts | 4 +- .../ipywidgets/commonMessageCoordinator.ts | 16 +- .../ipywidgets/ipyWidgetMessageDispatcher.ts | 10 +- .../ipywidgets/ipyWidgetScriptSource.ts | 14 +- .../localWidgetScriptSourceProvider.ts | 4 +- .../notebookIPyWidgetCoordinator.ts | 4 +- src/client/datascience/ipywidgets/types.ts | 6 +- .../ipywidgets/webviewIPyWidgetCoordinator.ts | 16 +- .../jupyter/commandLineSelector.ts | 2 +- .../datascience/jupyter/debuggerVariables.ts | 16 +- .../jupyter/interpreter/jupyterCommand.ts | 4 +- .../jupyterCellOutputMimeTypeTracker.ts | 10 +- .../datascience/jupyter/jupyterConnection.ts | 24 +- .../datascience/jupyter/jupyterDebugger.ts | 8 +- .../datascience/jupyter/jupyterExecution.ts | 10 +- .../jupyter/jupyterExecutionFactory.ts | 4 +- .../datascience/jupyter/jupyterExporter.ts | 4 +- .../datascience/jupyter/jupyterImporter.ts | 2 +- .../datascience/jupyter/jupyterNotebook.ts | 34 +- .../datascience/jupyter/jupyterRequest.ts | 2 +- .../jupyter/jupyterServerWrapper.ts | 4 +- .../datascience/jupyter/jupyterSession.ts | 4 +- .../jupyter/jupyterSessionManager.ts | 20 +- .../datascience/jupyter/jupyterWebSocket.ts | 2 +- .../datascience/jupyter/kernelVariables.ts | 10 +- .../jupyter/kernels/cellExecution.ts | 20 +- .../datascience/jupyter/kernels/helpers.ts | 8 +- .../jupyter/kernels/jupyterKernelSpec.ts | 6 +- .../jupyter/kernels/kernelExecution.ts | 2 +- .../jupyter/kernels/kernelSelections.ts | 6 +- .../jupyter/kernels/kernelSelector.ts | 6 +- .../jupyter/kernels/kernelService.ts | 16 +- .../jupyter/kernels/kernelSwitcher.ts | 2 +- .../jupyter/liveshare/guestJupyterNotebook.ts | 12 +- .../jupyter/liveshare/guestJupyterServer.ts | 2 +- .../jupyter/liveshare/hostJupyterExecution.ts | 2 +- .../jupyter/liveshare/hostJupyterNotebook.ts | 4 +- .../jupyter/liveshare/hostJupyterServer.ts | 4 +- .../liveshare/liveShareParticipantMixin.ts | 2 +- .../jupyter/liveshare/roleBasedFactory.ts | 2 +- .../jupyter/liveshare/serverCache.ts | 2 +- .../datascience/jupyter/liveshare/types.ts | 2 +- .../datascience/jupyter/notebookStarter.ts | 2 +- .../datascience/jupyter/serverSelector.ts | 4 +- src/client/datascience/jupyterDebugService.ts | 4 +- .../datascience/jupyterUriProviderWrapper.ts | 4 +- .../kernel-launcher/kernelProcess.ts | 2 +- src/client/datascience/kernelSocketWrapper.ts | 6 +- src/client/datascience/liveshare/liveshare.ts | 2 +- .../datascience/liveshare/liveshareProxy.ts | 2 +- .../datascience/liveshare/postOffice.ts | 2 +- .../datascience/liveshare/serviceProxy.ts | 2 +- .../datascience/notebook/contentProvider.ts | 2 +- .../notebook/defaultCellLanguageService.ts | 2 +- .../emptyNotebookCellLanguageService.ts | 2 +- .../notebook/helpers/executionHelpers.ts | 4 +- .../datascience/notebook/helpers/helpers.ts | 44 +- .../notebook/helpers/notebookUpdater.ts | 2 +- .../datascience/notebook/kernelProvider.ts | 6 +- .../notebook/kernelWithMetadata.ts | 6 +- .../datascience/notebook/notebookEditor.ts | 2 +- .../datascience/notebookStorage/baseModel.ts | 10 +- .../notebookStorage/nativeEditorStorage.ts | 12 +- .../notebookStorage/notebookModel.ts | 2 +- .../notebookStorageProvider.ts | 2 +- .../notebookStorage/vscNotebookModel.ts | 10 +- src/client/datascience/plotting/plotViewer.ts | 6 +- .../plotting/plotViewerMessageListener.ts | 2 +- src/client/datascience/progress/decorator.ts | 4 +- .../liveshare/hostRawNotebookProvider.ts | 4 +- .../datascience/raw-kernel/rawKernel.ts | 6 +- .../raw-kernel/rawNotebookProviderWrapper.ts | 4 +- .../datascience/raw-kernel/rawSession.ts | 2 +- .../datascience/raw-kernel/rawSocket.ts | 6 +- src/client/datascience/serviceRegistry.ts | 2 +- src/client/datascience/statusProvider.ts | 2 +- src/client/datascience/themeFinder.ts | 2 +- src/client/datascience/types.ts | 32 +- src/client/datascience/utils.ts | 2 +- .../datascience/variablesView/variableView.ts | 6 +- .../variableViewMessageListener.ts | 2 +- .../datascience/webviews/webviewHost.ts | 6 +- .../extension/helpers/protocolParser.ts | 4 +- src/client/extension.ts | 12 +- src/client/extensionActivation.ts | 4 +- src/client/extensionInit.ts | 2 +- src/client/ioc/serviceManager.ts | 4 +- src/client/ioc/types.ts | 16 +- src/client/language/languageConfiguration.ts | 4 +- src/client/logging/_global.ts | 12 +- src/client/logging/debugLoggingManager.ts | 8 +- .../logging/gitHubIssueCommandListener.ts | 4 +- src/client/logging/logger.ts | 2 +- src/client/logging/trace.ts | 2 +- src/client/logging/transports.ts | 14 +- src/client/logging/util.ts | 6 +- src/client/startupTelemetry.ts | 8 +- src/client/telemetry/importTracker.ts | 4 +- src/client/telemetry/index.ts | 38 +- src/datascience-ui/common/cellFactory.ts | 28 +- src/datascience-ui/common/index.ts | 2 +- src/datascience-ui/common/main.ts | 4 +- .../data-explorer/cellFormatter.tsx | 4 +- .../data-explorer/globalJQueryImports.ts | 6 +- src/datascience-ui/data-explorer/index.tsx | 4 +- .../data-explorer/mainPanel.tsx | 8 +- .../data-explorer/reactSlickGrid.tsx | 20 +- src/datascience-ui/data-explorer/testData.ts | 2 +- src/datascience-ui/history-react/index.tsx | 8 +- .../history-react/interactiveCell.tsx | 6 +- .../history-react/interactivePanel.tsx | 4 +- .../history-react/redux/actions.ts | 2 +- .../history-react/redux/reducers/execution.ts | 2 +- .../interactive-common/cellInput.tsx | 4 +- .../interactive-common/cellOutput.tsx | 26 +- .../interactive-common/contentPanel.tsx | 4 +- .../interactive-common/editor.tsx | 6 +- .../interactive-common/images.d.ts | 2 +- .../informationMessages.tsx | 2 +- .../interactive-common/mainState.ts | 8 +- .../markdownManipulation.ts | 2 +- .../interactive-common/redux/helpers.ts | 24 +- .../interactive-common/redux/postOffice.ts | 4 +- .../redux/reducers/commonEffects.ts | 2 +- .../redux/reducers/helpers.ts | 6 +- .../redux/reducers/kernel.ts | 2 +- .../redux/reducers/monaco.ts | 2 +- .../redux/reducers/transfer.ts | 6 +- .../redux/reducers/types.ts | 4 +- .../interactive-common/redux/store.ts | 24 +- .../interactive-common/tokenizer.ts | 2 +- .../interactive-common/transforms.tsx | 2 +- .../interactive-common/variableExplorer.tsx | 10 +- .../variableExplorerRowRenderer.tsx | 2 +- .../interactive-common/variablePanel.tsx | 2 +- .../ipywidgets/common/kernel.ts | 12 +- .../ipywidgets/common/manager.ts | 12 +- .../ipywidgets/common/requirejsRegistry.ts | 6 +- .../ipywidgets/common/scriptManager.ts | 16 +- src/datascience-ui/ipywidgets/common/types.ts | 6 +- src/datascience-ui/ipywidgets/kernel/index.ts | 30 +- .../ipywidgets/renderer/index.ts | 4 +- .../ipywidgets/webViews/container.tsx | 6 +- src/datascience-ui/native-editor/index.tsx | 6 +- .../native-editor/nativeCell.tsx | 6 +- .../native-editor/nativeEditor.tsx | 4 +- .../native-editor/redux/actions.ts | 2 +- .../native-editor/redux/reducers/creation.ts | 4 +- .../native-editor/redux/reducers/effects.ts | 6 +- .../native-editor/redux/reducers/execution.ts | 4 +- src/datascience-ui/native-editor/toolbar.tsx | 6 +- src/datascience-ui/plot/index.tsx | 4 +- src/datascience-ui/plot/mainPanel.tsx | 6 +- src/datascience-ui/plot/testSvg.ts | 2 +- .../react-common/errorBoundary.tsx | 2 +- src/datascience-ui/react-common/event.ts | 2 +- src/datascience-ui/react-common/image.tsx | 6 +- src/datascience-ui/react-common/logger.ts | 2 +- .../react-common/monacoEditor.tsx | 32 +- src/datascience-ui/react-common/postOffice.ts | 22 +- src/datascience-ui/react-common/reduxUtils.ts | 4 +- .../react-common/relativeImage.tsx | 2 +- .../react-common/settingsReactSide.ts | 8 +- .../react-common/styleInjector.tsx | 6 +- src/datascience-ui/react-common/svgList.tsx | 4 +- src/datascience-ui/react-common/svgViewer.tsx | 4 +- src/datascience-ui/variable-view/index.tsx | 8 +- .../variable-view/redux/actions.ts | 2 +- .../variable-view/variableViewPanel.tsx | 2 +- src/test/analysisEngineTest.ts | 2 +- src/test/common.ts | 18 +- .../commands/reloadCommand.unit.test.ts | 8 +- src/test/common/asyncDump.ts | 2 +- .../common/configuration/service.unit.test.ts | 12 +- .../configuration/service.vscode.test.ts | 2 +- src/test/common/crypto.unit.test.ts | 4 +- src/test/common/exitCIAfterTestReporter.ts | 2 +- .../common/experiments/service.unit.test.ts | 16 +- src/test/common/extensions.unit.test.ts | 2 +- src/test/common/helpers.vscode.test.ts | 4 +- .../downloadChannelRules.unit.test.ts | 2 +- .../downloadChannelService.unit.test.ts | 4 +- .../insidersExtensionPrompt.unit.test.ts | 4 +- .../insidersExtensionService.unit.test.ts | 8 +- .../common/net/fileDownloader.unit.test.ts | 2 +- src/test/common/net/httpClient.unit.test.ts | 6 +- src/test/common/platform/errors.unit.test.ts | 2 +- .../common/platform/filesystem.unit.test.ts | 24 +- .../platform/fs-paths.functional.test.ts | 2 +- .../common/platform/fs-paths.unit.test.ts | 2 +- .../platform/fs-temp.functional.test.ts | 6 +- src/test/common/platform/fs-temp.unit.test.ts | 6 +- .../platform/pathUtils.functional.test.ts | 2 +- .../platform/platformService.vscode.test.ts | 8 +- src/test/common/platform/utils.ts | 2 +- .../common/process/decoder.vscode.test.ts | 2 +- src/test/common/process/logger.unit.test.ts | 4 +- src/test/common/process/proc.unit.test.ts | 4 +- .../process/pythonDaemon.functional.test.ts | 4 +- .../pythonDaemonPool.functional.test.ts | 10 +- .../process/pythonDaemonPool.unit.test.ts | 10 +- .../process/pythonEnvironment.unit.test.ts | 4 +- .../common/process/pythonProcess.unit.test.ts | 6 +- .../socketCallbackHandler.vscode.test.ts | 4 +- src/test/common/socketStream.vscode.test.ts | 34 +- src/test/common/utils/cacheUtils.unit.test.ts | 4 +- src/test/common/utils/decorators.unit.test.ts | 24 +- .../common/utils/localize.functional.test.ts | 10 +- src/test/common/utils/regexp.unit.test.ts | 2 +- src/test/common/utils/text.unit.test.ts | 2 +- .../envVarsService.functional.test.ts | 2 +- .../variables/envVarsService.unit.test.ts | 58 +- .../variables/envVarsService.vscode.test.ts | 2 +- src/test/constants.ts | 2 +- src/test/core.ts | 2 +- src/test/datascience/cellFactory.unit.test.ts | 16 +- src/test/datascience/cellMatcher.unit.test.ts | 2 +- src/test/datascience/color.vscode.test.ts | 4 +- .../commands/commandRegistry.unit.test.ts | 4 +- .../notebookCommands.functional.test.ts | 16 +- .../commands/serverSelector.unit.test.ts | 4 +- .../dataViewerDependencyService.unit.test.ts | 8 +- .../datascience/dataScienceIocContainer.ts | 24 +- src/test/datascience/datascience.unit.test.ts | 20 +- .../datascienceSurveyBanner.vscode.test.ts | 2 +- .../dataviewer.functional.test.tsx | 10 +- .../debugLocationTracker.unit.test.ts | 2 +- .../datascience/debugger.functional.test.tsx | 22 +- src/test/datascience/dsTestSetup.ts | 4 +- .../cellhashprovider.unit.test.ts | 2 +- .../codelensprovider.unit.test.ts | 4 +- .../codewatcher.unit.test.ts | 4 +- .../gotocell.functional.test.ts | 4 +- .../datascience/editor-integration/helpers.ts | 2 +- src/test/datascience/execution.unit.test.ts | 8 +- .../export/exportFileOpener.unit.test.ts | 4 +- .../export/exportManager.vscode.test.ts | 10 +- .../export/exportToHTML.vscode.test.ts | 8 +- .../export/exportToPython.vscode.test.ts | 8 +- .../export/exportUtil.vscode.test.ts | 4 +- .../group1.nonConda.functional.test.tsx | 6 +- src/test/datascience/helpers.ts | 10 +- ...sNativeNotebookSurveyBanner.vscode.test.ts | 2 +- .../intellisense.functional.test.tsx | 4 +- .../notebookProvider.unit.test.ts | 4 +- .../notebookServerProvider.unit.test.ts | 4 +- .../trustService.unit.test.ts | 2 +- .../nativeEditorProvider.functional.test.ts | 4 +- .../nativeEditorStorage.unit.test.ts | 4 +- .../interactiveWindow.functional.test.tsx | 18 +- ...eractiveWindowCommandListener.unit.test.ts | 6 +- .../interactiveWindowTestHelpers.tsx | 10 +- ...cdnWidgetScriptSourceProvider.unit.test.ts | 6 +- .../incompatibleWidgetHandler.unit.test.ts | 2 +- ...ipyWidgetScriptSourceProvider.unit.test.ts | 2 +- ...calWidgetScriptSourceProvider.unit.test.ts | 2 +- ...rInterpreterDependencyService.unit.test.ts | 8 +- .../jupyterInterpreterSelector.unit.test.ts | 12 +- .../jupyterInterpreterService.unit.test.ts | 2 +- ...terSubCommandExecutionService.unit.test.ts | 10 +- ...yterCellOutputMimeTypeTracker.unit.test.ts | 2 +- .../jupyter/jupyterConnection.unit.test.ts | 8 +- .../jupyter/jupyterSession.unit.test.ts | 18 +- .../installationPrompts.vscode.test.ts | 2 +- .../kernelDependencyService.unit.test.ts | 4 +- .../kernels/kernelSelections.unit.test.ts | 16 +- .../kernels/kernelSelector.unit.test.ts | 4 +- .../kernels/kernelService.unit.test.ts | 32 +- .../kernels/kernelSwitcher.unit.test.ts | 12 +- .../jupyter/serverSelector.unit.test.ts | 6 +- .../jupyterPasswordConnect.unit.test.ts | 10 +- ...UriProviderRegistration.functional.test.ts | 10 +- ...upyterUriProviderRegistration.unit.test.ts | 16 +- .../datascience/jupyterUtils.unit.test.ts | 6 +- .../kernelDaemonPool.unit.test.ts | 2 +- .../kernelDaemonPoolPreWarmer.unit.test.ts | 4 +- .../kernelFinder.vscode.test.ts | 2 +- .../kernelLauncherDaemon.unit.test.ts | 2 +- .../kernelLauncher.functional.test.ts | 8 +- .../datascience/liveshare.functional.test.tsx | 12 +- src/test/datascience/mainState.unit.test.ts | 4 +- .../markdownManipulation.unit.test.ts | 2 +- .../datascience/mockCode2ProtocolConverter.ts | 2 +- src/test/datascience/mockCommandManager.ts | 2 +- .../datascience/mockCustomEditorService.ts | 6 +- src/test/datascience/mockDocumentManager.ts | 2 +- src/test/datascience/mockExtensions.ts | 2 +- src/test/datascience/mockJupyterManager.ts | 4 +- .../datascience/mockJupyterManagerFactory.ts | 2 +- src/test/datascience/mockJupyterNotebook.ts | 10 +- src/test/datascience/mockJupyterRequest.ts | 4 +- src/test/datascience/mockJupyterSession.ts | 14 +- src/test/datascience/mockJupyterSettings.ts | 7 +- src/test/datascience/mockLanguageServer.ts | 2 +- .../datascience/mockLanguageServerProvider.ts | 2 +- src/test/datascience/mockLiveShare.ts | 2 +- .../datascience/mockProtocol2CodeConverter.ts | 4 +- src/test/datascience/mockWorkspaceConfig.ts | 4 +- .../datascience/mockWorkspaceConfiguration.ts | 4 +- src/test/datascience/mountedWebView.ts | 16 +- src/test/datascience/mountedWebViewFactory.ts | 4 +- .../nativeEditor.functional.test.tsx | 36 +- .../nativeEditor.toolbar.functional.test.tsx | 2 +- .../datascience/nativeEditorTestHelpers.tsx | 10 +- .../nativeEditorViewTracker.unit.test.ts | 2 +- .../datascience/notebook.functional.test.ts | 28 +- .../notebook/contentProvider.unit.test.ts | 4 +- .../notebook/contentProvider.vscode.test.ts | 6 +- .../notebook/executionService.vscode.test.ts | 8 +- src/test/datascience/notebook/helper.ts | 8 +- .../datascience/notebook/helpers.unit.test.ts | 6 +- .../notebook/interrupRestart.vscode.test.ts | 2 +- .../notebook/ipywidget.vscode.test.ts | 6 +- .../notebook/nonPythonKernels.vscode.test.ts | 4 +- .../notebookEditorProvider.vscode.test.ts | 2 +- .../notebook/notebookStorage.unit.test.ts | 4 +- .../notebook/notebookTrust.vscode.test.ts | 6 +- .../rendererExtensionDownloader.unit.test.ts | 2 +- .../notebook/saving.vscode.test.ts | 8 +- .../plotViewer.functional.test.tsx | 10 +- .../progress/progressReporter.unit.test.ts | 2 +- .../raw-kernel/rawKernel.functional.test.ts | 4 +- .../raw-kernel/rawKernelTestHelpers.ts | 2 +- src/test/datascience/reactHelpers.ts | 42 +- .../datascience/shiftEnterBanner.unit.test.ts | 2 +- src/test/datascience/testHelpers.tsx | 4 +- .../datascience/testNativeEditorProvider.ts | 2 +- .../datascience/testPersistentStateFactory.ts | 2 +- .../trustedNotebooks.functional.test.tsx | 6 +- src/test/datascience/uiTests/helpers.ts | 4 +- .../uiTests/ipywidget.ui.functional.test.ts | 6 +- .../datascience/uiTests/notebookHelpers.ts | 8 +- src/test/datascience/uiTests/notebookUi.ts | 2 +- src/test/datascience/uiTests/recorder.ts | 2 +- .../datascience/uiTests/webBrowserPanel.ts | 12 +- .../uiTests/webBrowserPanelProvider.ts | 2 +- src/test/datascience/variableTestHelpers.ts | 4 +- .../variableexplorer.functional.test.tsx | 18 +- src/test/debuggerTest.ts | 2 +- src/test/extension-version.functional.test.ts | 8 +- src/test/fixtures.ts | 4 +- .../format/extension.format.vscode.test.ts | 2 +- src/test/functionalTests.ts | 14 +- src/test/index.ts | 8 +- src/test/initialize.ts | 10 +- src/test/interpreters/condaService.ts | 2 +- src/test/mockClasses.ts | 12 +- src/test/mocks/mementos.ts | 6 +- src/test/mocks/proc.ts | 4 +- src/test/mocks/vsc/arrays.ts | 2 +- src/test/mocks/vsc/charCode.ts | 2 +- src/test/mocks/vsc/extHostedTypes.ts | 4 +- src/test/mocks/vsc/htmlContent.ts | 2 +- src/test/mocks/vsc/index.ts | 4 +- src/test/mocks/vsc/position.ts | 2 +- src/test/mocks/vsc/range.ts | 2 +- src/test/mocks/vsc/selection.ts | 2 +- src/test/mocks/vsc/strings.ts | 2 +- src/test/mocks/vsc/telemetryReporter.ts | 2 +- src/test/mocks/vsc/uri.ts | 8 +- src/test/mocks/vsc/uuid.ts | 6 +- src/test/performance/load.perf.vscode.test.ts | 4 +- src/test/performanceTest.ts | 4 +- src/test/serviceRegistry.ts | 2 +- src/test/smoke/datascience.smoke.test.ts | 2 +- src/test/smokeTest.ts | 2 +- src/test/standardTest.ts | 2 +- src/test/telemetry/importTracker.unit.test.ts | 4 +- src/test/telemetry/index.unit.test.ts | 12 +- src/test/testBootstrap.ts | 2 +- src/test/testLogger.ts | 4 +- src/test/testRunner.ts | 2 +- src/test/testing/serviceRegistry.ts | 3 - src/test/tslint.json | 6 - src/test/unittests.ts | 4 +- src/test/utils/enum.ts | 2 +- src/test/utils/fs.ts | 2 +- src/test/vscode-mock.ts | 2 +- tslint.json | 58 - typings/dom.fix.rx.compiler.d.ts | 2 +- typings/extensions.d.ts | 4 +- 491 files changed, 3763 insertions(+), 2150 deletions(-) delete mode 100644 .eslintrc create mode 100644 .eslintrc.js delete mode 100644 build/.eslintrc delete mode 100644 src/test/tslint.json delete mode 100644 tslint.json diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 966e12ee14d..00000000000 --- a/.eslintrc +++ /dev/null @@ -1,121 +0,0 @@ -{ - "env": { - "node": true, - "es6": true, - "mocha": true - }, - "parser": "@typescript-eslint/parser", - "plugins": [ - "@typescript-eslint" - ], - "extends": [ - "airbnb", - "plugin:@typescript-eslint/recommended", - "plugin:import/errors", - "plugin:import/warnings", - "plugin:import/typescript" - ], - "rules": { - // Overriding ESLint rules with Typescript-specific ones - "@typescript-eslint/ban-ts-comment": [ - "error", - { - "ts-ignore": "allow-with-description" - } - ], - "no-bitwise": "off", - "no-dupe-class-members": "off", - "@typescript-eslint/no-dupe-class-members": "error", - "no-empty-function": "off", - "@typescript-eslint/no-empty-function": [ - "error" - ], - "@typescript-eslint/no-empty-interface": "off", - "@typescript-eslint/no-non-null-assertion": "off", - "no-unused-vars": "off", - "@typescript-eslint/no-unused-vars": [ - "error", - { - "argsIgnorePattern": "^_" - } - ], - "no-use-before-define": "off", - "@typescript-eslint/no-use-before-define": [ - "error", - { - "functions": false - } - ], - "no-useless-constructor": "off", - "@typescript-eslint/no-useless-constructor": "error", - "@typescript-eslint/no-var-requires": "off", - // Other rules - "func-names": "off", - "import/extensions": "off", - "import/namespace": "off", - "import/no-extraneous-dependencies": "off", - "import/no-unresolved": [ - "error", - { - "ignore": [ - "monaco-editor", - "vscode" - ] - } - ], - "import/prefer-default-export": "off", - "indent": [ - "error", - 4, - { - "SwitchCase": 1 - } - ], - "linebreak-style": "off", - "max-len": [ - "warn", - { - "code": 120, - "ignorePattern": "^import\\s.+\\sfrom\\s.+;$", - "ignoreStrings": true, - "ignoreTemplateLiterals": true, - "ignoreUrls": true - } - ], - "no-confusing-arrow": [ - "error", - { - "allowParens": true - } - ], - "no-console": "off", - "no-control-regex": "off", - "function-paren-newline": "off", - "consistent-return": "off", - "class-methods-use-this": "off", - "no-extend-native": "off", - "no-multi-str": "off", - "no-param-reassign": "off", - "no-prototype-builtins": "off", - "no-template-curly-in-string": "off", - "no-underscore-dangle": "off", - "comma-dangle": "off", - "no-useless-escape": "off", - "no-void": [ - "error", - { - "allowAsStatement": true - } - ], - "operator-assignment": "off", - "react/jsx-filename-extension": [ - 1, - { - "extensions": [ - ".tsx" - ] - } - ], - "strict": "off" - } -} diff --git a/.eslintrc.js b/.eslintrc.js new file mode 100644 index 00000000000..d9f9fd180a2 --- /dev/null +++ b/.eslintrc.js @@ -0,0 +1,1336 @@ +/* +👋 Hi! This file was autogenerated by tslint-to-eslint-config. +https://github.com/typescript-eslint/tslint-to-eslint-config + +It represents the closest reasonable ESLint configuration to this +project's original TSLint configuration. + +We recommend eventually switching this configuration to extend from +the recommended rulesets in typescript-eslint. +https://github.com/typescript-eslint/tslint-to-eslint-config/blob/master/docs/FAQs.md + +Happy linting! 💖 +*/ +module.exports = { + env: { + browser: true, + es6: true, + node: true + }, + extends: ['prettier', 'prettier/@typescript-eslint'], + ignorePatterns: [ + 'build/constants.js', + 'build/util.js', + 'build/ci/postInstall.js', + 'build/ci/scripts/runFunctionalTests.js', + 'build/ci/performance/checkPerformanceResults.js', + 'build/ci/performance/createNewPerformanceBenchmark.js', + 'build/ci/performance/savePerformanceResults.js', + 'build/webpack/webpack.datascience-ui.config.js', + 'build/webpack/webpack.extension.config.js', + 'build/webpack/webpack.datascience-ui-notebooks.config.js', + 'build/webpack/plugins/less-plugin-base64.js', + 'build/webpack/webpack.datascience-ui.config.builder.js', + 'build/webpack/pdfkit.js', + 'build/webpack/webpack.extension.dependencies.config.js', + 'build/webpack/common.js', + 'build/webpack/webpack.datascience-ui-viewers.config.js', + 'build/webpack/webpack.datascience-ui-renderers.config.js', + 'build/webpack/loaders/fixNodeFetch.js', + 'build/webpack/loaders/remarkLoader.js', + 'build/webpack/loaders/jsonloader.js', + 'build/webpack/loaders/externalizeDependencies.js', + 'build/tslint-rules/messagesMustBeLocalizedRule.js', + 'build/tslint-rules/baseRuleWalker.js', + 'build/debug/replaceWithWebBrowserPanel.js', + 'src/test/mocks/mementos.ts', + 'src/test/mocks/process.ts', + 'src/test/mocks/moduleInstaller.ts', + 'src/test/mocks/proc.ts', + 'src/test/mocks/autoSelector.ts', + 'src/test/mocks/vsc/extHostedTypes.ts', + 'src/test/mocks/vsc/uuid.ts', + 'src/test/mocks/vsc/strings.ts', + 'src/test/mocks/vsc/charCode.ts', + 'src/test/mocks/vsc/htmlContent.ts', + 'src/test/mocks/vsc/selection.ts', + 'src/test/mocks/vsc/position.ts', + 'src/test/mocks/vsc/uri.ts', + 'src/test/mocks/vsc/telemetryReporter.ts', + 'src/test/mocks/vsc/range.ts', + 'src/test/mocks/vsc/index.ts', + 'src/test/mocks/vsc/arrays.ts', + 'src/test/smoke/common.ts', + 'src/test/smoke/datascience.smoke.test.ts', + 'src/test/smoke/runInTerminal.smoke.test.ts', + 'src/test/smoke/languageServer.smoke.test.ts', + 'src/test/index.ts', + 'src/test/initialize.ts', + 'src/test/mockClasses.ts', + 'src/test/performanceTest.ts', + 'src/test/serviceRegistry.ts', + 'src/test/smokeTest.ts', + 'src/test/standardTest.ts', + 'src/test/testBootstrap.ts', + 'src/test/testLogger.ts', + 'src/test/testRunner.ts', + 'src/test/textUtils.ts', + 'src/test/unittests.ts', + 'src/test/vscode-mock.ts', + 'src/test/utils/interpreters.ts', + 'src/test/utils/fs.ts', + 'src/test/api.functional.test.ts', + 'src/test/common/exitCIAfterTestReporter.ts', + 'src/test/common/crypto.unit.test.ts', + 'src/test/common/configuration/service.test.ts', + 'src/test/common/configuration/service.unit.test.ts', + 'src/test/common/net/fileDownloader.unit.test.ts', + 'src/test/common/net/httpClient.unit.test.ts', + 'src/test/common/moduleInstaller.test.ts', + 'src/test/common/misc.test.ts', + 'src/test/common/socketStream.test.ts', + 'src/test/common/configSettings.test.ts', + 'src/test/common/experiments/service.unit.test.ts', + 'src/test/common/experiments/manager.unit.test.ts', + 'src/test/common/experiments/telemetry.unit.test.ts', + 'src/test/common/platform/filesystem.unit.test.ts', + 'src/test/common/platform/pathUtils.functional.test.ts', + 'src/test/common/platform/errors.unit.test.ts', + 'src/test/common/platform/platformService.test.ts', + 'src/test/common/platform/utils.ts', + 'src/test/common/platform/fs-temp.unit.test.ts', + 'src/test/common/platform/fs-temp.functional.test.ts', + 'src/test/common/platform/serviceRegistry.unit.test.ts', + 'src/test/common/platform/filesystem.functional.test.ts', + 'src/test/common/platform/fs-paths.unit.test.ts', + 'src/test/common/platform/fs-paths.functional.test.ts', + 'src/test/common/platform/filesystem.test.ts', + 'src/test/common/utils/async.unit.test.ts', + 'src/test/common/utils/text.unit.test.ts', + 'src/test/common/utils/regexp.unit.test.ts', + 'src/test/common/utils/cacheUtils.unit.test.ts', + 'src/test/common/utils/decorators.unit.test.ts', + 'src/test/common/utils/localize.functional.test.ts', + 'src/test/common/utils/version.unit.test.ts', + 'src/test/common/utils/workerPool.functional.test.ts', + 'src/test/common/configSettings/configSettings.pythonPath.unit.test.ts', + 'src/test/common/configSettings/configSettings.unit.test.ts', + 'src/test/common/featureDeprecationManager.unit.test.ts', + 'src/test/common/dotnet/compatibilityService.unit.test.ts', + 'src/test/common/dotnet/serviceRegistry.unit.test.ts', + 'src/test/common/dotnet/services/linuxCompatibilityService.unit.test.ts', + 'src/test/common/dotnet/services/winCompatibilityService.unit.test.ts', + 'src/test/common/dotnet/services/unknownOsCompatibilityService.unit.test.ts', + 'src/test/common/dotnet/services/macCompatibilityService.unit.test.ts', + 'src/test/common/serviceRegistry.unit.test.ts', + 'src/test/common/extensions.unit.test.ts', + 'src/test/common/variables/envVarsService.functional.test.ts', + 'src/test/common/variables/envVarsService.test.ts', + 'src/test/common/variables/envVarsService.unit.test.ts', + 'src/test/common/variables/serviceRegistry.unit.test.ts', + 'src/test/common/variables/environmentVariablesProvider.unit.test.ts', + 'src/test/common/nuget/nugetService.unit.test.ts', + 'src/test/common/nuget/azureBobStoreRepository.functional.test.ts', + 'src/test/common/nuget/nugetRepository.unit.test.ts', + 'src/test/common/nuget/azureBobStoreRepository.unit.test.ts', + 'src/test/common/helpers.test.ts', + 'src/test/common/application/commands/reloadCommand.unit.test.ts', + 'src/test/common/installer/channelManager.unit.test.ts', + 'src/test/common/installer/condaInstaller.unit.test.ts', + 'src/test/common/installer/installer.unit.test.ts', + 'src/test/common/installer/pipInstaller.unit.test.ts', + 'src/test/common/installer/installer.invalidPath.unit.test.ts', + 'src/test/common/installer/moduleInstaller.unit.test.ts', + 'src/test/common/installer/pipEnvInstaller.unit.test.ts', + 'src/test/common/installer/productPath.unit.test.ts', + 'src/test/common/installer/serviceRegistry.unit.test.ts', + 'src/test/common/installer/poetryInstaller.unit.test.ts', + 'src/test/common/installer/extensionBuildInstaller.unit.test.ts', + 'src/test/common/socketCallbackHandler.test.ts', + 'src/test/common/installer.test.ts', + 'src/test/common/process/decoder.test.ts', + 'src/test/common/process/pythonDaemonPool.unit.test.ts', + 'src/test/common/process/processFactory.unit.test.ts', + 'src/test/common/process/pythonToolService.unit.test.ts', + 'src/test/common/process/proc.observable.test.ts', + 'src/test/common/process/currentProcess.test.ts', + 'src/test/common/process/serviceRegistry.unit.test.ts', + 'src/test/common/process/execFactory.test.ts', + 'src/test/common/process/pythonEnvironment.unit.test.ts', + 'src/test/common/process/logger.unit.test.ts', + 'src/test/common/process/pythonDaemonPool.functional.test.ts', + 'src/test/common/process/proc.exec.test.ts', + 'src/test/common/process/pythonDaemon.functional.test.ts', + 'src/test/common/process/pythonProcess.unit.test.ts', + 'src/test/common/process/pythonExecutionFactory.unit.test.ts', + 'src/test/common/process/proc.unit.test.ts', + 'src/test/common/asyncDump.ts', + 'src/test/common/interpreterPathService.unit.test.ts', + 'src/test/common/insidersBuild/downloadChannelRules.unit.test.ts', + 'src/test/common/insidersBuild/insidersExtensionPrompt.unit.test.ts', + 'src/test/common/insidersBuild/downloadChannelService.unit.test.ts', + 'src/test/common/insidersBuild/insidersExtensionService.unit.test.ts', + 'src/test/pythonFiles/formatting/dummy.ts', + 'src/test/format/extension.dispatch.test.ts', + 'src/test/format/extension.format.native.vscode.test.ts', + 'src/test/format/extension.onTypeFormat.test.ts', + 'src/test/format/extension.lineFormatter.test.ts', + 'src/test/format/extension.sort.test.ts', + 'src/test/format/extension.onEnterFormat.test.ts', + 'src/test/format/extension.format.test.ts', + 'src/test/format/format.helper.test.ts', + 'src/test/format/formatter.unit.test.ts', + 'src/test/debugger/common/constants.ts', + 'src/test/debugger/common/protocolparser.test.ts', + 'src/test/debugger/envVars.test.ts', + 'src/test/startPage/startPage.unit.test.ts', + 'src/test/startPage/startPage.functional.test.tsx', + 'src/test/telemetry/index.unit.test.ts', + 'src/test/telemetry/importTracker.unit.test.ts', + 'src/test/telemetry/envFileTelemetry.unit.test.ts', + 'src/test/telemetry/extensionInstallTelemetry.unit.test.ts', + 'src/test/application/misc/joinMailingListPrompt.unit.test.ts', + 'src/test/performance/load.perf.test.ts', + 'src/test/datascience/mockLanguageServerCache.ts', + 'src/test/datascience/debugLocationTracker.unit.test.ts', + 'src/test/datascience/mockLiveShare.ts', + 'src/test/datascience/liveshare.functional.test.tsx', + 'src/test/datascience/mountedWebViewFactory.ts', + 'src/test/datascience/data-viewing/dataViewerPDependencyService.unit.test.ts', + 'src/test/datascience/data-viewing/dataViewer.unit.test.ts', + 'src/test/datascience/mockPythonService.ts', + 'src/test/datascience/testHelpersCore.ts', + 'src/test/datascience/shiftEnterBanner.unit.test.ts', + 'src/test/datascience/executionServiceMock.ts', + 'src/test/datascience/mockJupyterManager.ts', + 'src/test/datascience/mockCommandManager.ts', + 'src/test/datascience/mockCustomEditorService.ts', + 'src/test/datascience/mockInputBox.ts', + 'src/test/datascience/reactHelpers.ts', + 'src/test/datascience/helpers.ts', + 'src/test/datascience/jupyterUriProviderRegistration.unit.test.ts', + 'src/test/datascience/mockDocumentManager.ts', + 'src/test/datascience/errorHandler.unit.test.ts', + 'src/test/datascience/cellMatcher.unit.test.ts', + 'src/test/datascience/crossProcessLock.unit.test.ts', + 'src/test/datascience/uiTests/helpers.ts', + 'src/test/datascience/uiTests/webBrowserPanel.ts', + 'src/test/datascience/uiTests/notebookUi.ts', + 'src/test/datascience/uiTests/webBrowserPanelProvider.ts', + 'src/test/datascience/uiTests/recorder.ts', + 'src/test/datascience/uiTests/notebookHelpers.ts', + 'src/test/datascience/uiTests/ipywidget.ui.functional.test.ts', + 'src/test/datascience/mockWorkspaceConfiguration.ts', + 'src/test/datascience/mockTextEditor.ts', + 'src/test/datascience/mockLanguageServerAnalysisOptions.ts', + 'src/test/datascience/mockLanguageServerProxy.ts', + 'src/test/datascience/interactiveWindowCommandListener.unit.test.ts', + 'src/test/datascience/trustedNotebooks.functional.test.tsx', + 'src/test/datascience/mockPythonSettings.ts', + 'src/test/datascience/progress/progressReporter.unit.test.ts', + 'src/test/datascience/progress/decorators.unit.test.ts', + 'src/test/datascience/kernel-launcher/kernelDaemonPool.unit.test.ts', + 'src/test/datascience/kernel-launcher/kernelDaemonPoolPreWarmer.unit.test.ts', + 'src/test/datascience/kernel-launcher/kernelLauncherDaemon.unit.test.ts', + 'src/test/datascience/ipywidgets/ipyWidgetScriptSourceProvider.unit.test.ts', + 'src/test/datascience/ipywidgets/cdnWidgetScriptSourceProvider.unit.test.ts', + 'src/test/datascience/ipywidgets/localWidgetScriptSourceProvider.unit.test.ts', + 'src/test/datascience/ipywidgets/incompatibleWidgetHandler.unit.test.ts', + 'src/test/datascience/mockKernelFinder.ts', + 'src/test/datascience/datascienceSurveyBanner.unit.test.ts', + 'src/test/datascience/intellisense.functional.test.tsx', + 'src/test/datascience/nativeEditor.toolbar.functional.test.tsx', + 'src/test/datascience/mockDocument.ts', + 'src/test/datascience/raw-kernel/rawKernelTestHelpers.ts', + 'src/test/datascience/raw-kernel/rawKernel.functional.test.ts', + 'src/test/datascience/color.test.ts', + 'src/test/datascience/nativeEditorViewTracker.unit.test.ts', + 'src/test/datascience/mockCode2ProtocolConverter.ts', + 'src/test/datascience/mockFileSystem.ts', + 'src/test/datascience/interactive-common/trustService.unit.test.ts', + 'src/test/datascience/interactive-common/notebookProvider.unit.test.ts', + 'src/test/datascience/interactive-common/notebookServerProvider.unit.test.ts', + 'src/test/datascience/interactive-common/trustCommandHandler.unit.test.ts', + 'src/test/datascience/mockStatusProvider.ts', + 'src/test/datascience/extensionapi/exampleextension/ms-toolsai-test/webpack.config.js', + 'src/test/datascience/extensionapi/exampleextension/ms-toolsai-test/.eslintrc.js', + 'src/test/datascience/extensionapi/exampleextension/ms-toolsai-test/src/typings/python.d.ts', + 'src/test/datascience/extensionapi/exampleextension/ms-toolsai-test/src/extension.ts', + 'src/test/datascience/extensionapi/exampleextension/ms-toolsai-test/src/serverPicker.ts', + 'src/test/datascience/common.unit.test.ts', + 'src/test/datascience/testexecutionLogger.ts', + 'src/test/datascience/interactiveWindow.functional.test.tsx', + 'src/test/datascience/mockQuickPick.ts', + 'src/test/datascience/dsTestSetup.ts', + 'src/test/datascience/mockLanguageServer.ts', + 'src/test/datascience/debugger.functional.test.tsx', + 'src/test/datascience/testInteractiveWindowProvider.ts', + 'src/test/datascience/dataScienceIocContainer.ts', + 'src/test/datascience/dataviewer.functional.test.tsx', + 'src/test/datascience/jupyterUtils.unit.test.ts', + 'src/test/datascience/preWarmVariables.unit.test.ts', + 'src/test/datascience/mockJupyterNotebook.ts', + 'src/test/datascience/remoteTestHelpers.ts', + 'src/test/datascience/mockWorkspaceFolder.ts', + 'src/test/datascience/variableexplorer.functional.test.tsx', + 'src/test/datascience/mockJupyterSession.ts', + 'src/test/datascience/jupyterUriProviderRegistration.functional.test.ts', + 'src/test/datascience/mockJupyterRequest.ts', + 'src/test/datascience/inputHistory.unit.test.ts', + 'src/test/datascience/jupyterHelpers.ts', + 'src/test/datascience/mockJupyterServer.ts', + 'src/test/datascience/mockJupyterManagerFactory.ts', + 'src/test/datascience/mainState.unit.test.ts', + 'src/test/datascience/mockDebugService.ts', + 'src/test/datascience/nativeEditorTestHelpers.tsx', + 'src/test/datascience/datascience.unit.test.ts', + 'src/test/datascience/kernelLauncher.functional.test.ts', + 'src/test/datascience/interactive-ipynb/nativeEditorStorage.unit.test.ts', + 'src/test/datascience/interactive-ipynb/nativeEditorProvider.functional.test.ts', + 'src/test/datascience/kernelFinder.unit.test.ts', + 'src/test/datascience/plotViewer.functional.test.tsx', + 'src/test/datascience/mockExtensions.ts', + 'src/test/datascience/mockProtocol2CodeConverter.ts', + 'src/test/datascience/editor-integration/helpers.ts', + 'src/test/datascience/editor-integration/cellhashprovider.unit.test.ts', + 'src/test/datascience/editor-integration/gotocell.functional.test.ts', + 'src/test/datascience/editor-integration/codelensprovider.unit.test.ts', + 'src/test/datascience/editor-integration/codewatcher.unit.test.ts', + 'src/test/datascience/jupyterPasswordConnect.unit.test.ts', + 'src/test/datascience/commands/serverSelector.unit.test.ts', + 'src/test/datascience/commands/commandRegistry.unit.test.ts', + 'src/test/datascience/commands/notebookCommands.functional.test.ts', + 'src/test/datascience/testHelpers.tsx', + 'src/test/datascience/notebook.functional.test.ts', + 'src/test/datascience/mockLanguageClient.ts', + 'src/test/datascience/errorHandler.functional.test.tsx', + 'src/test/datascience/notebook/notebookStorage.unit.test.ts', + 'src/test/datascience/notebook/notebookTrust.native.vscode.test.ts', + 'src/test/datascience/notebook/rendererExtensionDownloader.unit.test.ts', + 'src/test/datascience/notebook/survey.unit.test.ts', + 'src/test/datascience/notebook/interrupRestart.native.vscode.test.ts', + 'src/test/datascience/notebook/contentProvider.native.vscode.test.ts', + 'src/test/datascience/notebook/helper.ts', + 'src/test/datascience/notebook/contentProvider.unit.test.ts', + 'src/test/datascience/notebook/edit.native.vscode.test.ts', + 'src/test/datascience/notebook/rendererExension.unit.test.ts', + 'src/test/datascience/notebook/saving.native.vscode.test.ts', + 'src/test/datascience/notebook/notebookEditorProvider.native.vscode.test.ts', + 'src/test/datascience/notebook/helpers.unit.test.ts', + 'src/test/datascience/notebook/executionService.native.vscode.test.ts', + 'src/test/datascience/notebook/cellOutput.native.vscode.test.ts', + 'src/test/datascience/interactiveWindowTestHelpers.tsx', + 'src/test/datascience/export/exportUtil.test.ts', + 'src/test/datascience/export/exportToHTML.test.ts', + 'src/test/datascience/export/exportToPython.test.ts', + 'src/test/datascience/export/exportFileOpener.unit.test.ts', + 'src/test/datascience/export/exportManager.test.ts', + 'src/test/datascience/intellisense.unit.test.ts', + 'src/test/datascience/nativeEditor.functional.test.tsx', + 'src/test/datascience/markdownManipulation.unit.test.ts', + 'src/test/datascience/interactivePanel.functional.test.tsx', + 'src/test/datascience/variableTestHelpers.ts', + 'src/test/datascience/activation.unit.test.ts', + 'src/test/datascience/testPersistentStateFactory.ts', + 'src/test/datascience/jupyter/interpreter/jupyterInterpreterSubCommandExecutionService.unit.test.ts', + 'src/test/datascience/jupyter/interpreter/jupyterInterpreterDependencyService.unit.test.ts', + 'src/test/datascience/jupyter/interpreter/jupyterInterpreterStateStore.unit.test.ts', + 'src/test/datascience/jupyter/interpreter/jupyterInterpreterService.unit.test.ts', + 'src/test/datascience/jupyter/interpreter/jupyterInterpreterSelectionCommand.unit.test.ts', + 'src/test/datascience/jupyter/interpreter/jupyterInterpreterSelector.unit.test.ts', + 'src/test/datascience/jupyter/serverSelector.unit.test.ts', + 'src/test/datascience/jupyter/kernels/kernelSelector.unit.test.ts', + 'src/test/datascience/jupyter/kernels/kernelSelections.unit.test.ts', + 'src/test/datascience/jupyter/kernels/kernelDependencyService.unit.test.ts', + 'src/test/datascience/jupyter/kernels/kernelSwitcher.unit.test.ts', + 'src/test/datascience/jupyter/kernels/kernelService.unit.test.ts', + 'src/test/datascience/jupyter/jupyterCellOutputMimeTypeTracker.unit.test.ts', + 'src/test/datascience/jupyter/jupyterSession.unit.test.ts', + 'src/test/datascience/jupyter/jupyterConnection.unit.test.ts', + 'src/test/datascience/jupyter/serverCache.unit.test.ts', + 'src/test/datascience/mockWorkspaceConfig.ts', + 'src/test/datascience/mountedWebView.ts', + 'src/test/datascience/execution.unit.test.ts', + 'src/test/datascience/mockProcessService.ts', + 'src/test/datascience/testNativeEditorProvider.ts', + 'src/test/datascience/cellFactory.unit.test.ts', + 'src/test/refactor/extension.refactor.extract.method.test.ts', + 'src/test/refactor/extension.refactor.extract.var.test.ts', + 'src/test/refactor/rename.test.ts', + 'src/test/workspaceSymbols/provider.unit.test.ts', + 'src/test/workspaceSymbols/common.ts', + 'src/test/workspaceSymbols/main.unit.test.ts', + 'src/test/workspaceSymbols/generator.unit.test.ts', + 'src/test/datascience/extensionapi/exampleextension/ms-ai-tools-test/src/extension.ts', + 'src/test/datascience/extensionapi/exampleextension/ms-ai-tools-test/src/serverPicker.ts', + 'src/test/datascience/extensionapi/exampleextension/ms-ai-tools-test/src/typings/jupyter.d.ts', + 'src/ipywidgets/types/require.js.d.ts', + 'src/ipywidgets/types/index.d.ts', + 'src/ipywidgets/webpack.config.js', + 'src/ipywidgets/scripts/copyfiles.js', + 'src/ipywidgets/scripts/clean.js', + 'src/ipywidgets/src/manager.ts', + 'src/ipywidgets/src/widgetLoader.ts', + 'src/ipywidgets/src/libembed.ts', + 'src/ipywidgets/src/index.ts', + 'src/ipywidgets/src/embed.ts', + 'src/ipywidgets/src/signal.ts', + 'src/ipywidgets/src/documentContext.ts', + 'src/datascience-ui/native-editor/index.tsx', + 'src/datascience-ui/native-editor/nativeCell.tsx', + 'src/datascience-ui/native-editor/addCellLine.tsx', + 'src/datascience-ui/native-editor/toolbar.tsx', + 'src/datascience-ui/native-editor/nativeEditor.tsx', + 'src/datascience-ui/native-editor/redux/mapping.ts', + 'src/datascience-ui/native-editor/redux/actions.ts', + 'src/datascience-ui/native-editor/redux/reducers/movement.ts', + 'src/datascience-ui/native-editor/redux/reducers/index.ts', + 'src/datascience-ui/native-editor/redux/reducers/creation.ts', + 'src/datascience-ui/native-editor/redux/reducers/execution.ts', + 'src/datascience-ui/native-editor/redux/reducers/effects.ts', + 'src/datascience-ui/native-editor/redux/store.ts', + 'src/datascience-ui/renderers/index.tsx', + 'src/datascience-ui/renderers/webviewApi.d.ts', + 'src/datascience-ui/renderers/constants.ts', + 'src/datascience-ui/renderers/render.tsx', + 'src/datascience-ui/plot/index.tsx', + 'src/datascience-ui/plot/testSvg.ts', + 'src/datascience-ui/plot/toolbar.tsx', + 'src/datascience-ui/plot/mainPanel.tsx', + 'src/datascience-ui/ipywidgets/manager.ts', + 'src/datascience-ui/ipywidgets/container.tsx', + 'src/datascience-ui/ipywidgets/types.ts', + 'src/datascience-ui/ipywidgets/index.ts', + 'src/datascience-ui/ipywidgets/kernel.ts', + 'src/datascience-ui/ipywidgets/requirejsRegistry.ts', + 'src/datascience-ui/ipywidgets/incompatibleWidgetHandler.ts', + 'src/datascience-ui/interactive-common/trimmedOutputLink.tsx', + 'src/datascience-ui/interactive-common/trustMessage.tsx', + 'src/datascience-ui/interactive-common/variableExplorerRowRenderer.tsx', + 'src/datascience-ui/interactive-common/variableExplorerHeaderCellFormatter.tsx', + 'src/datascience-ui/interactive-common/code.tsx', + 'src/datascience-ui/interactive-common/buildSettingsCss.ts', + 'src/datascience-ui/interactive-common/markdown.tsx', + 'src/datascience-ui/interactive-common/editor.tsx', + 'src/datascience-ui/interactive-common/mainState.ts', + 'src/datascience-ui/interactive-common/collapseButton.tsx', + 'src/datascience-ui/interactive-common/utils.ts', + 'src/datascience-ui/interactive-common/images.d.ts', + 'src/datascience-ui/interactive-common/tokenizer.ts', + 'src/datascience-ui/interactive-common/cellInput.tsx', + 'src/datascience-ui/interactive-common/variableExplorerEmptyRows.tsx', + 'src/datascience-ui/interactive-common/variablePanel.tsx', + 'src/datascience-ui/interactive-common/jupyterInfo.tsx', + 'src/datascience-ui/interactive-common/executionCount.tsx', + 'src/datascience-ui/interactive-common/handlers.ts', + 'src/datascience-ui/interactive-common/variableExplorer.tsx', + 'src/datascience-ui/interactive-common/intellisenseProvider.ts', + 'src/datascience-ui/interactive-common/variableExplorerButtonCellFormatter.tsx', + 'src/datascience-ui/interactive-common/markdownManipulation.ts', + 'src/datascience-ui/interactive-common/variableExplorerCellFormatter.tsx', + 'src/datascience-ui/interactive-common/cellOutput.tsx', + 'src/datascience-ui/interactive-common/informationMessages.tsx', + 'src/datascience-ui/interactive-common/redux/helpers.ts', + 'src/datascience-ui/interactive-common/redux/reducers/helpers.ts', + 'src/datascience-ui/interactive-common/redux/reducers/monaco.ts', + 'src/datascience-ui/interactive-common/redux/reducers/transfer.ts', + 'src/datascience-ui/interactive-common/redux/reducers/types.ts', + 'src/datascience-ui/interactive-common/redux/reducers/variables.ts', + 'src/datascience-ui/interactive-common/redux/reducers/commonEffects.ts', + 'src/datascience-ui/interactive-common/redux/reducers/kernel.ts', + 'src/datascience-ui/interactive-common/redux/postOffice.ts', + 'src/datascience-ui/interactive-common/redux/store.ts', + 'src/datascience-ui/interactive-common/transforms.tsx', + 'src/datascience-ui/interactive-common/contentPanel.tsx', + 'src/datascience-ui/interactive-common/inputHistory.ts', + 'src/datascience-ui/history-react/index.tsx', + 'src/datascience-ui/history-react/interactivePanel.tsx', + 'src/datascience-ui/history-react/interactiveCell.tsx', + 'src/datascience-ui/history-react/redux/mapping.ts', + 'src/datascience-ui/history-react/redux/actions.ts', + 'src/datascience-ui/history-react/redux/reducers/index.ts', + 'src/datascience-ui/history-react/redux/reducers/creation.ts', + 'src/datascience-ui/history-react/redux/reducers/execution.ts', + 'src/datascience-ui/history-react/redux/reducers/effects.ts', + 'src/datascience-ui/history-react/redux/store.ts', + 'src/datascience-ui/react-common/arePathsSame.ts', + 'src/datascience-ui/react-common/imageButton.tsx', + 'src/datascience-ui/react-common/monacoHelpers.ts', + 'src/datascience-ui/react-common/svgViewer.tsx', + 'src/datascience-ui/react-common/relativeImage.tsx', + 'src/datascience-ui/react-common/progress.tsx', + 'src/datascience-ui/react-common/styleInjector.tsx', + 'src/datascience-ui/react-common/reduxUtils.ts', + 'src/datascience-ui/react-common/monacoEditor.tsx', + 'src/datascience-ui/react-common/textMeasure.ts', + 'src/datascience-ui/react-common/flyout.tsx', + 'src/datascience-ui/react-common/logger.ts', + 'src/datascience-ui/react-common/svgList.tsx', + 'src/datascience-ui/react-common/constants.ts', + 'src/datascience-ui/react-common/settingsReactSide.ts', + 'src/datascience-ui/react-common/locReactSide.ts', + 'src/datascience-ui/react-common/button.tsx', + 'src/datascience-ui/react-common/themeDetector.ts', + 'src/datascience-ui/react-common/image.tsx', + 'src/datascience-ui/react-common/event.ts', + 'src/datascience-ui/react-common/codicon/codicon.ts', + 'src/datascience-ui/react-common/postOffice.ts', + 'src/datascience-ui/react-common/errorBoundary.tsx', + 'src/datascience-ui/common/main.ts', + 'src/datascience-ui/common/cellFactory.ts', + 'src/datascience-ui/common/index.ts', + 'src/datascience-ui/startPage/index.tsx', + 'src/datascience-ui/startPage/startPage.tsx', + 'src/datascience-ui/data-explorer/index.tsx', + 'src/datascience-ui/data-explorer/cellFormatter.tsx', + 'src/datascience-ui/data-explorer/globalJQueryImports.ts', + 'src/datascience-ui/data-explorer/emptyRowsView.tsx', + 'src/datascience-ui/data-explorer/progressBar.tsx', + 'src/datascience-ui/data-explorer/testData.ts', + 'src/datascience-ui/data-explorer/reactSlickGridFilterBox.tsx', + 'src/datascience-ui/data-explorer/mainPanel.tsx', + 'src/datascience-ui/data-explorer/reactSlickGrid.tsx', + 'src/client/interpreter/interpreterService.ts', + 'src/client/interpreter/configuration/interpreterComparer.ts', + 'src/client/interpreter/configuration/interpreterSelector/commands/base.ts', + 'src/client/interpreter/configuration/interpreterSelector/commands/setInterpreter.ts', + 'src/client/interpreter/configuration/interpreterSelector/commands/resetInterpreter.ts', + 'src/client/interpreter/configuration/interpreterSelector/commands/setShebangInterpreter.ts', + 'src/client/interpreter/configuration/interpreterSelector/interpreterSelector.ts', + 'src/client/interpreter/configuration/pythonPathUpdaterService.ts', + 'src/client/interpreter/configuration/pythonPathUpdaterServiceFactory.ts', + 'src/client/interpreter/configuration/types.ts', + 'src/client/interpreter/configuration/services/globalUpdaterService.ts', + 'src/client/interpreter/configuration/services/workspaceUpdaterService.ts', + 'src/client/interpreter/configuration/services/workspaceFolderUpdaterService.ts', + 'src/client/interpreter/serviceRegistry.ts', + 'src/client/interpreter/helpers.ts', + 'src/client/interpreter/virtualEnvs/condaInheritEnvPrompt.ts', + 'src/client/interpreter/virtualEnvs/types.ts', + 'src/client/interpreter/virtualEnvs/virtualEnvPrompt.ts', + 'src/client/interpreter/virtualEnvs/index.ts', + 'src/client/interpreter/autoSelection/interpreterSecurity/interpreterSecurityStorage.ts', + 'src/client/interpreter/autoSelection/interpreterSecurity/interpreterEvaluation.ts', + 'src/client/interpreter/autoSelection/interpreterSecurity/interpreterSecurityService.ts', + 'src/client/interpreter/autoSelection/types.ts', + 'src/client/interpreter/autoSelection/constants.ts', + 'src/client/interpreter/autoSelection/proxy.ts', + 'src/client/interpreter/autoSelection/rules/baseRule.ts', + 'src/client/interpreter/autoSelection/rules/winRegistry.ts', + 'src/client/interpreter/autoSelection/rules/settings.ts', + 'src/client/interpreter/autoSelection/rules/currentPath.ts', + 'src/client/interpreter/autoSelection/rules/cached.ts', + 'src/client/interpreter/autoSelection/rules/workspaceEnv.ts', + 'src/client/interpreter/autoSelection/rules/system.ts', + 'src/client/interpreter/autoSelection/index.ts', + 'src/client/interpreter/interpreterVersion.ts', + 'src/client/interpreter/contracts.ts', + 'src/client/interpreter/activation/wrapperEnvironmentActivationService.ts', + 'src/client/interpreter/activation/terminalEnvironmentActivationService.ts', + 'src/client/interpreter/activation/preWarmVariables.ts', + 'src/client/interpreter/activation/types.ts', + 'src/client/interpreter/activation/service.ts', + 'src/client/interpreter/locators/types.ts', + 'src/client/interpreter/display/shebangCodeLensProvider.ts', + 'src/client/interpreter/display/index.ts', + 'src/client/interpreter/display/progressDisplay.ts', + 'src/client/interpreter/display/interpreterSelectionTip.ts', + 'src/client/api.ts', + 'src/client/constants.ts', + 'src/client/extension.ts', + 'src/client/extensionActivation.ts', + 'src/client/extensionInit.ts', + 'src/client/sourceMapSupport.ts', + 'src/client/startupTelemetry.ts', + 'src/client/typeFormatters/blockFormatProvider.ts', + 'src/client/typeFormatters/contracts.ts', + 'src/client/typeFormatters/codeBlockFormatProvider.ts', + 'src/client/typeFormatters/onEnterFormatter.ts', + 'src/client/typeFormatters/dispatcher.ts', + 'src/client/terminals/serviceRegistry.ts', + 'src/client/terminals/activation.ts', + 'src/client/terminals/types.ts', + 'src/client/terminals/codeExecution/helper.ts', + 'src/client/terminals/codeExecution/djangoShellCodeExecution.ts', + 'src/client/terminals/codeExecution/repl.ts', + 'src/client/terminals/codeExecution/terminalCodeExecution.ts', + 'src/client/terminals/codeExecution/codeExecutionManager.ts', + 'src/client/terminals/codeExecution/djangoContext.ts', + 'src/client/providers/objectDefinitionProvider.ts', + 'src/client/providers/serviceRegistry.ts', + 'src/client/providers/symbolProvider.ts', + 'src/client/providers/completionSource.ts', + 'src/client/providers/renameProvider.ts', + 'src/client/providers/hoverProvider.ts', + 'src/client/providers/itemInfoSource.ts', + 'src/client/providers/formatProvider.ts', + 'src/client/providers/importSortProvider.ts', + 'src/client/providers/replProvider.ts', + 'src/client/providers/codeActionProvider/main.ts', + 'src/client/providers/codeActionProvider/launchJsonCodeActionProvider.ts', + 'src/client/providers/codeActionProvider/pythonCodeActionProvider.ts', + 'src/client/providers/types.ts', + 'src/client/providers/docStringFoldingProvider.ts', + 'src/client/providers/linterProvider.ts', + 'src/client/providers/providerUtilities.ts', + 'src/client/providers/simpleRefactorProvider.ts', + 'src/client/providers/completionProvider.ts', + 'src/client/providers/jediProxy.ts', + 'src/client/providers/definitionProvider.ts', + 'src/client/providers/referenceProvider.ts', + 'src/client/providers/terminalProvider.ts', + 'src/client/providers/signatureProvider.ts', + 'src/client/activation/serviceRegistry.ts', + 'src/client/activation/languageServer/manager.ts', + 'src/client/activation/languageServer/languageServerExtension.ts', + 'src/client/activation/languageServer/languageServerProxy.ts', + 'src/client/activation/languageServer/languageClientFactory.ts', + 'src/client/activation/languageServer/platformData.ts', + 'src/client/activation/languageServer/languageServerCompatibilityService.ts', + 'src/client/activation/languageServer/languageServerPackageRepository.ts', + 'src/client/activation/languageServer/languageServerFolderService.ts', + 'src/client/activation/languageServer/outputChannel.ts', + 'src/client/activation/languageServer/languageServerPackageService.ts', + 'src/client/activation/languageServer/analysisOptions.ts', + 'src/client/activation/languageServer/activator.ts', + 'src/client/activation/commands.ts', + 'src/client/activation/activationManager.ts', + 'src/client/activation/progress.ts', + 'src/client/activation/extensionSurvey.ts', + 'src/client/activation/types.ts', + 'src/client/activation/common/languageServerChangeHandler.ts', + 'src/client/activation/common/activatorBase.ts', + 'src/client/activation/common/languageServerFolderService.ts', + 'src/client/activation/common/languageServerPackageService.ts', + 'src/client/activation/common/downloader.ts', + 'src/client/activation/common/packageRepository.ts', + 'src/client/activation/common/analysisOptions.ts', + 'src/client/activation/common/downloadChannelRules.ts', + 'src/client/activation/aaTesting.ts', + 'src/client/activation/refCountedLanguageServer.ts', + 'src/client/activation/jedi.ts', + 'src/client/activation/languageClientMiddleware.ts', + 'src/client/activation/activationService.ts', + 'src/client/activation/node/manager.ts', + 'src/client/activation/node/cancellationUtils.ts', + 'src/client/activation/node/languageServerProxy.ts', + 'src/client/activation/node/languageClientFactory.ts', + 'src/client/activation/node/languageServerPackageRepository.ts', + 'src/client/activation/node/languageServerFolderService.ts', + 'src/client/activation/node/languageServerPackageService.ts', + 'src/client/activation/node/analysisOptions.ts', + 'src/client/activation/node/activator.ts', + 'src/client/activation/none/activator.ts', + 'src/client/formatters/blackFormatter.ts', + 'src/client/formatters/serviceRegistry.ts', + 'src/client/formatters/helper.ts', + 'src/client/formatters/dummyFormatter.ts', + 'src/client/formatters/autoPep8Formatter.ts', + 'src/client/formatters/lineFormatter.ts', + 'src/client/formatters/types.ts', + 'src/client/formatters/yapfFormatter.ts', + 'src/client/formatters/baseFormatter.ts', + 'src/client/language/languageConfiguration.ts', + 'src/client/language/characters.ts', + 'src/client/language/textRangeCollection.ts', + 'src/client/language/tokenizer.ts', + 'src/client/language/characterStream.ts', + 'src/client/language/textIterator.ts', + 'src/client/language/types.ts', + 'src/client/language/iterableTextRange.ts', + 'src/client/language/braceCounter.ts', + 'src/client/language/unicode.ts', + 'src/client/language/textBuilder.ts', + 'src/client/testing/serviceRegistry.ts', + 'src/client/testing/unittest/main.ts', + 'src/client/testing/unittest/helper.ts', + 'src/client/testing/unittest/testConfigurationManager.ts', + 'src/client/testing/unittest/socketServer.ts', + 'src/client/testing/unittest/runner.ts', + 'src/client/testing/unittest/services/parserService.ts', + 'src/client/testing/unittest/services/argsService.ts', + 'src/client/testing/unittest/services/discoveryService.ts', + 'src/client/testing/codeLenses/main.ts', + 'src/client/testing/codeLenses/testFiles.ts', + 'src/client/testing/nosetest/main.ts', + 'src/client/testing/nosetest/testConfigurationManager.ts', + 'src/client/testing/nosetest/runner.ts', + 'src/client/testing/nosetest/services/parserService.ts', + 'src/client/testing/nosetest/services/argsService.ts', + 'src/client/testing/nosetest/services/discoveryService.ts', + 'src/client/testing/main.ts', + 'src/client/testing/pytest/main.ts', + 'src/client/testing/pytest/testConfigurationManager.ts', + 'src/client/testing/pytest/runner.ts', + 'src/client/testing/pytest/services/argsService.ts', + 'src/client/testing/pytest/services/discoveryService.ts', + 'src/client/testing/pytest/services/testMessageService.ts', + 'src/client/testing/configurationFactory.ts', + 'src/client/testing/navigation/serviceRegistry.ts', + 'src/client/testing/navigation/symbolProvider.ts', + 'src/client/testing/navigation/helper.ts', + 'src/client/testing/navigation/commandHandler.ts', + 'src/client/testing/navigation/suiteNavigator.ts', + 'src/client/testing/navigation/types.ts', + 'src/client/testing/navigation/functionNavigator.ts', + 'src/client/testing/navigation/fileNavigator.ts', + 'src/client/testing/explorer/testTreeViewItem.ts', + 'src/client/testing/explorer/testTreeViewProvider.ts', + 'src/client/testing/explorer/commandHandlers.ts', + 'src/client/testing/explorer/failedTestHandler.ts', + 'src/client/testing/explorer/treeView.ts', + 'src/client/testing/types.ts', + 'src/client/testing/common/argumentsHelper.ts', + 'src/client/testing/common/enablementTracker.ts', + 'src/client/testing/common/debugLauncher.ts', + 'src/client/testing/common/managers/testConfigurationManager.ts', + 'src/client/testing/common/managers/baseTestManager.ts', + 'src/client/testing/common/types.ts', + 'src/client/testing/common/constants.ts', + 'src/client/testing/common/testUtils.ts', + 'src/client/testing/common/xUnitParser.ts', + 'src/client/testing/common/updateTestSettings.ts', + 'src/client/testing/common/testVisitors/visitor.ts', + 'src/client/testing/common/testVisitors/flatteningVisitor.ts', + 'src/client/testing/common/testVisitors/resultResetVisitor.ts', + 'src/client/testing/common/runner.ts', + 'src/client/testing/common/services/discoveredTestParser.ts', + 'src/client/testing/common/services/contextService.ts', + 'src/client/testing/common/services/testResultsService.ts', + 'src/client/testing/common/services/storageService.ts', + 'src/client/testing/common/services/types.ts', + 'src/client/testing/common/services/unitTestDiagnosticService.ts', + 'src/client/testing/common/services/testsStatusService.ts', + 'src/client/testing/common/services/discovery.ts', + 'src/client/testing/common/services/configSettingService.ts', + 'src/client/testing/common/services/testManagerService.ts', + 'src/client/testing/common/services/workspaceTestManagerService.ts', + 'src/client/testing/display/main.ts', + 'src/client/testing/display/picker.ts', + 'src/client/testing/configuration.ts', + 'src/client/common/configuration/service.ts', + 'src/client/common/serviceRegistry.ts', + 'src/client/common/helpers.ts', + 'src/client/common/net/browser.ts', + 'src/client/common/net/fileDownloader.ts', + 'src/client/common/net/httpClient.ts', + 'src/client/common/net/socket/socketCallbackHandler.ts', + 'src/client/common/net/socket/socketServer.ts', + 'src/client/common/net/socket/SocketStream.ts', + 'src/client/common/asyncDisposableRegistry.ts', + 'src/client/common/editor.ts', + 'src/client/common/contextKey.ts', + 'src/client/common/markdown/restTextConverter.ts', + 'src/client/common/featureDeprecationManager.ts', + 'src/client/common/experiments/manager.ts', + 'src/client/common/experiments/groups.ts', + 'src/client/common/experiments/telemetry.ts', + 'src/client/common/experiments/service.ts', + 'src/client/common/refBool.ts', + 'src/client/common/open.ts', + 'src/client/common/platform/serviceRegistry.ts', + 'src/client/common/platform/errors.ts', + 'src/client/common/platform/fs-temp.ts', + 'src/client/common/platform/fs-paths.ts', + 'src/client/common/platform/platformService.ts', + 'src/client/common/platform/types.ts', + 'src/client/common/platform/constants.ts', + 'src/client/common/platform/fileSystem.ts', + 'src/client/common/platform/registry.ts', + 'src/client/common/platform/pathUtils.ts', + 'src/client/common/persistentState.ts', + 'src/client/common/terminal/activator/base.ts', + 'src/client/common/terminal/activator/powershellFailedHandler.ts', + 'src/client/common/terminal/activator/index.ts', + 'src/client/common/terminal/helper.ts', + 'src/client/common/terminal/syncTerminalService.ts', + 'src/client/common/terminal/factory.ts', + 'src/client/common/terminal/types.ts', + 'src/client/common/terminal/commandPrompt.ts', + 'src/client/common/terminal/service.ts', + 'src/client/common/terminal/shellDetector.ts', + 'src/client/common/terminal/shellDetectors/userEnvironmentShellDetector.ts', + 'src/client/common/terminal/shellDetectors/vscEnvironmentShellDetector.ts', + 'src/client/common/terminal/shellDetectors/terminalNameShellDetector.ts', + 'src/client/common/terminal/shellDetectors/settingsShellDetector.ts', + 'src/client/common/terminal/shellDetectors/baseShellDetector.ts', + 'src/client/common/terminal/environmentActivationProviders/pipEnvActivationProvider.ts', + 'src/client/common/terminal/environmentActivationProviders/baseActivationProvider.ts', + 'src/client/common/terminal/environmentActivationProviders/condaActivationProvider.ts', + 'src/client/common/terminal/environmentActivationProviders/commandPrompt.ts', + 'src/client/common/terminal/environmentActivationProviders/bash.ts', + 'src/client/common/terminal/environmentActivationProviders/pyenvActivationProvider.ts', + 'src/client/common/utils/decorators.ts', + 'src/client/common/utils/enum.ts', + 'src/client/common/utils/async.ts', + 'src/client/common/utils/text.ts', + 'src/client/common/utils/localize.ts', + 'src/client/common/utils/regexp.ts', + 'src/client/common/utils/platform.ts', + 'src/client/common/utils/multiStepInput.ts', + 'src/client/common/utils/stopWatch.ts', + 'src/client/common/utils/random.ts', + 'src/client/common/utils/serializers.ts', + 'src/client/common/utils/icons.ts', + 'src/client/common/utils/sysTypes.ts', + 'src/client/common/utils/version.ts', + 'src/client/common/utils/misc.ts', + 'src/client/common/utils/logging.ts', + 'src/client/common/utils/cacheUtils.ts', + 'src/client/common/utils/workerPool.ts', + 'src/client/common/crypto.ts', + 'src/client/common/extensions.ts', + 'src/client/common/dotnet/compatibilityService.ts', + 'src/client/common/dotnet/serviceRegistry.ts', + 'src/client/common/dotnet/types.ts', + 'src/client/common/dotnet/services/unknownOsCompatibilityService.ts', + 'src/client/common/dotnet/services/macCompatibilityService.ts', + 'src/client/common/dotnet/services/linuxCompatibilityService.ts', + 'src/client/common/dotnet/services/windowsCompatibilityService.ts', + 'src/client/common/types.ts', + 'src/client/common/logger.ts', + 'src/client/common/configSettings.ts', + 'src/client/common/constants.ts', + 'src/client/common/variables/serviceRegistry.ts', + 'src/client/common/variables/environment.ts', + 'src/client/common/variables/types.ts', + 'src/client/common/variables/environmentVariablesProvider.ts', + 'src/client/common/variables/sysTypes.ts', + 'src/client/common/variables/systemVariables.ts', + 'src/client/common/nuget/azureBlobStoreNugetRepository.ts', + 'src/client/common/nuget/nugetRepository.ts', + 'src/client/common/nuget/types.ts', + 'src/client/common/nuget/nugetService.ts', + 'src/client/common/cancellation.ts', + 'src/client/common/interpreterPathService.ts', + 'src/client/common/startPage/startPage.ts', + 'src/client/common/startPage/types.ts', + 'src/client/common/startPage/startPageMessageListener.ts', + 'src/client/common/application/customEditorService.ts', + 'src/client/common/application/commands.ts', + 'src/client/common/application/applicationShell.ts', + 'src/client/common/application/languageService.ts', + 'src/client/common/application/notebook.ts', + 'src/client/common/application/clipboard.ts', + 'src/client/common/application/workspace.ts', + 'src/client/common/application/debugSessionTelemetry.ts', + 'src/client/common/application/extensions.ts', + 'src/client/common/application/types.ts', + 'src/client/common/application/activeResource.ts', + 'src/client/common/application/commandManager.ts', + 'src/client/common/application/documentManager.ts', + 'src/client/common/application/webPanels/webPanelProvider.ts', + 'src/client/common/application/webPanels/webPanel.ts', + 'src/client/common/application/debugService.ts', + 'src/client/common/application/commands/reloadCommand.ts', + 'src/client/common/application/terminalManager.ts', + 'src/client/common/application/applicationEnvironment.ts', + 'src/client/common/errors/errorUtils.ts', + 'src/client/common/errors/moduleNotInstalledError.ts', + 'src/client/common/installer/serviceRegistry.ts', + 'src/client/common/installer/productNames.ts', + 'src/client/common/installer/condaInstaller.ts', + 'src/client/common/installer/extensionBuildInstaller.ts', + 'src/client/common/installer/productInstaller.ts', + 'src/client/common/installer/channelManager.ts', + 'src/client/common/installer/moduleInstaller.ts', + 'src/client/common/installer/types.ts', + 'src/client/common/installer/poetryInstaller.ts', + 'src/client/common/installer/pipEnvInstaller.ts', + 'src/client/common/installer/productService.ts', + 'src/client/common/installer/pipInstaller.ts', + 'src/client/common/installer/productPath.ts', + 'src/client/common/process/currentProcess.ts', + 'src/client/common/process/processFactory.ts', + 'src/client/common/process/serviceRegistry.ts', + 'src/client/common/process/pythonDaemon.ts', + 'src/client/common/process/pythonToolService.ts', + 'src/client/common/process/internal/python.ts', + 'src/client/common/process/internal/scripts/testing_tools.ts', + 'src/client/common/process/internal/scripts/vscode_datascience_helpers.ts', + 'src/client/common/process/internal/scripts/index.ts', + 'src/client/common/process/pythonDaemonPool.ts', + 'src/client/common/process/pythonDaemonFactory.ts', + 'src/client/common/process/types.ts', + 'src/client/common/process/logger.ts', + 'src/client/common/process/baseDaemon.ts', + 'src/client/common/process/constants.ts', + 'src/client/common/process/pythonProcess.ts', + 'src/client/common/process/proc.ts', + 'src/client/common/process/pythonEnvironment.ts', + 'src/client/common/process/decoder.ts', + 'src/client/common/process/pythonExecutionFactory.ts', + 'src/client/common/insidersBuild/insidersExtensionPrompt.ts', + 'src/client/common/insidersBuild/insidersExtensionService.ts', + 'src/client/common/insidersBuild/types.ts', + 'src/client/common/insidersBuild/downloadChannelService.ts', + 'src/client/common/insidersBuild/downloadChannelRules.ts', + 'src/client/debugger/extension/configuration/providers/moduleLaunch.ts', + 'src/client/debugger/extension/configuration/providers/flaskLaunch.ts', + 'src/client/debugger/extension/configuration/providers/fileLaunch.ts', + 'src/client/debugger/extension/configuration/providers/remoteAttach.ts', + 'src/client/debugger/extension/configuration/providers/djangoLaunch.ts', + 'src/client/debugger/extension/configuration/providers/providerFactory.ts', + 'src/client/debugger/extension/configuration/providers/pyramidLaunch.ts', + 'src/client/debugger/extension/configuration/providers/pidAttach.ts', + 'src/client/debugger/extension/configuration/resolvers/base.ts', + 'src/client/debugger/extension/configuration/resolvers/helper.ts', + 'src/client/debugger/extension/configuration/resolvers/launch.ts', + 'src/client/debugger/extension/configuration/resolvers/attach.ts', + 'src/client/debugger/extension/configuration/types.ts', + 'src/client/debugger/extension/configuration/debugConfigurationService.ts', + 'src/client/debugger/extension/configuration/launch.json/updaterService.ts', + 'src/client/debugger/extension/configuration/launch.json/interpreterPathCommand.ts', + 'src/client/debugger/extension/configuration/launch.json/completionProvider.ts', + 'src/client/debugger/extension/banner.ts', + 'src/client/debugger/extension/serviceRegistry.ts', + 'src/client/debugger/extension/adapter/remoteLaunchers.ts', + 'src/client/debugger/extension/adapter/outdatedDebuggerPrompt.ts', + 'src/client/debugger/extension/adapter/factory.ts', + 'src/client/debugger/extension/adapter/types.ts', + 'src/client/debugger/extension/adapter/activator.ts', + 'src/client/debugger/extension/adapter/logging.ts', + 'src/client/debugger/extension/types.ts', + 'src/client/debugger/extension/hooks/eventHandlerDispatcher.ts', + 'src/client/debugger/extension/hooks/types.ts', + 'src/client/debugger/extension/hooks/constants.ts', + 'src/client/debugger/extension/hooks/childProcessAttachHandler.ts', + 'src/client/debugger/extension/hooks/childProcessAttachService.ts', + 'src/client/debugger/extension/attachQuickPick/wmicProcessParser.ts', + 'src/client/debugger/extension/attachQuickPick/factory.ts', + 'src/client/debugger/extension/attachQuickPick/types.ts', + 'src/client/debugger/extension/attachQuickPick/psProcessParser.ts', + 'src/client/debugger/extension/attachQuickPick/provider.ts', + 'src/client/debugger/extension/attachQuickPick/picker.ts', + 'src/client/debugger/extension/helpers/protocolParser.ts', + 'src/client/debugger/types.ts', + 'src/client/debugger/constants.ts', + 'src/client/languageServices/jediProxyFactory.ts', + 'src/client/languageServices/proposeLanguageServerBanner.ts', + 'src/client/telemetry/types.ts', + 'src/client/telemetry/importTracker.ts', + 'src/client/telemetry/constants.ts', + 'src/client/telemetry/index.ts', + 'src/client/telemetry/envFileTelemetry.ts', + 'src/client/telemetry/extensionInstallTelemetry.ts', + 'src/client/linters/pydocstyle.ts', + 'src/client/linters/serviceRegistry.ts', + 'src/client/linters/linterAvailability.ts', + 'src/client/linters/lintingEngine.ts', + 'src/client/linters/prospector.ts', + 'src/client/linters/pycodestyle.ts', + 'src/client/linters/linterInfo.ts', + 'src/client/linters/bandit.ts', + 'src/client/linters/linterCommands.ts', + 'src/client/linters/flake8.ts', + 'src/client/linters/errorHandlers/baseErrorHandler.ts', + 'src/client/linters/errorHandlers/errorHandler.ts', + 'src/client/linters/errorHandlers/notInstalled.ts', + 'src/client/linters/errorHandlers/standard.ts', + 'src/client/linters/types.ts', + 'src/client/linters/mypy.ts', + 'src/client/linters/baseLinter.ts', + 'src/client/linters/constants.ts', + 'src/client/linters/linterManager.ts', + 'src/client/linters/pylama.ts', + 'src/client/linters/pylint.ts', + 'src/client/application/serviceRegistry.ts', + 'src/client/application/types.ts', + 'src/client/application/diagnostics/surceMapSupportService.ts', + 'src/client/application/diagnostics/base.ts', + 'src/client/application/diagnostics/applicationDiagnostics.ts', + 'src/client/application/diagnostics/serviceRegistry.ts', + 'src/client/application/diagnostics/filter.ts', + 'src/client/application/diagnostics/checks/upgradeCodeRunner.ts', + 'src/client/application/diagnostics/checks/powerShellActivation.ts', + 'src/client/application/diagnostics/checks/envPathVariable.ts', + 'src/client/application/diagnostics/checks/invalidLaunchJsonDebugger.ts', + 'src/client/application/diagnostics/checks/pythonPathDeprecated.ts', + 'src/client/application/diagnostics/checks/lsNotSupported.ts', + 'src/client/application/diagnostics/checks/macPythonInterpreter.ts', + 'src/client/application/diagnostics/checks/invalidPythonPathInDebugger.ts', + 'src/client/application/diagnostics/checks/pythonInterpreter.ts', + 'src/client/application/diagnostics/promptHandler.ts', + 'src/client/application/diagnostics/types.ts', + 'src/client/application/diagnostics/constants.ts', + 'src/client/application/diagnostics/commands/base.ts', + 'src/client/application/diagnostics/commands/ignore.ts', + 'src/client/application/diagnostics/commands/factory.ts', + 'src/client/application/diagnostics/commands/execVSCCommand.ts', + 'src/client/application/diagnostics/commands/types.ts', + 'src/client/application/diagnostics/commands/launchBrowser.ts', + 'src/client/application/misc/joinMailingListPrompt.ts', + 'src/client/datascience/baseJupyterSession.ts', + 'src/client/datascience/data-viewing/jupyterVariableDataProviderFactory.ts', + 'src/client/datascience/data-viewing/dataViewerMessageListener.ts', + 'src/client/datascience/data-viewing/jupyterVariableDataProvider.ts', + 'src/client/datascience/data-viewing/types.ts', + 'src/client/datascience/data-viewing/dataViewer.ts', + 'src/client/datascience/data-viewing/dataViewerDependencyService.ts', + 'src/client/datascience/data-viewing/dataViewerFactory.ts', + 'src/client/datascience/shiftEnterBanner.ts', + 'src/client/datascience/dataScienceSurveyBanner.ts', + 'src/client/datascience/serviceRegistry.ts', + 'src/client/datascience/webviews/webViewHost.ts', + 'src/client/datascience/context/activeEditorContext.ts', + 'src/client/datascience/progress/progressReporter.ts', + 'src/client/datascience/progress/messages.ts', + 'src/client/datascience/progress/types.ts', + 'src/client/datascience/progress/decorator.ts', + 'src/client/datascience/codeCssGenerator.ts', + 'src/client/datascience/kernel-launcher/helpers.ts', + 'src/client/datascience/kernel-launcher/kernelFinder.ts', + 'src/client/datascience/kernel-launcher/kernelProcess.ts', + 'src/client/datascience/kernel-launcher/types.ts', + 'src/client/datascience/kernel-launcher/kernelDaemonPool.ts', + 'src/client/datascience/kernel-launcher/kernelLauncherDaemon.ts', + 'src/client/datascience/kernel-launcher/kernelDaemon.ts', + 'src/client/datascience/kernel-launcher/kernelDaemonPreWarmer.ts', + 'src/client/datascience/kernel-launcher/kernelLauncher.ts', + 'src/client/datascience/ipywidgets/localWidgetScriptSourceProvider.ts', + 'src/client/datascience/ipywidgets/ipyWidgetScriptSourceProvider.ts', + 'src/client/datascience/ipywidgets/ipyWidgetScriptSource.ts', + 'src/client/datascience/ipywidgets/cdnWidgetScriptSourceProvider.ts', + 'src/client/datascience/ipywidgets/types.ts', + 'src/client/datascience/ipywidgets/remoteWidgetScriptSourceProvider.ts', + 'src/client/datascience/ipywidgets/constants.ts', + 'src/client/datascience/ipywidgets/ipyWidgetMessageDispatcher.ts', + 'src/client/datascience/ipywidgets/ipywidgetHandler.ts', + 'src/client/datascience/ipywidgets/ipyWidgetMessageDispatcherFactory.ts', + 'src/client/datascience/themeFinder.ts', + 'src/client/datascience/multiplexingDebugService.ts', + 'src/client/datascience/interactive-window/identity.ts', + 'src/client/datascience/interactive-window/interactiveWindow.ts', + 'src/client/datascience/interactive-window/interactiveWindowCommandListener.ts', + 'src/client/datascience/interactive-window/interactiveWindowProvider.ts', + 'src/client/datascience/datascience.ts', + 'src/client/datascience/liveshare/liveshare.ts', + 'src/client/datascience/liveshare/serviceProxy.ts', + 'src/client/datascience/liveshare/liveshareProxy.ts', + 'src/client/datascience/liveshare/postOffice.ts', + 'src/client/datascience/jupyterUriProviderRegistration.ts', + 'src/client/datascience/messages.ts', + 'src/client/datascience/raw-kernel/rawJupyterSession.ts', + 'src/client/datascience/raw-kernel/rawNotebookProvider.ts', + 'src/client/datascience/raw-kernel/rawNotebookSupportedService.ts', + 'src/client/datascience/raw-kernel/liveshare/guestRawNotebookProvider.ts', + 'src/client/datascience/raw-kernel/liveshare/hostRawNotebookProvider.ts', + 'src/client/datascience/raw-kernel/rawKernel.ts', + 'src/client/datascience/raw-kernel/rawSession.ts', + 'src/client/datascience/raw-kernel/rawSocket.ts', + 'src/client/datascience/raw-kernel/rawNotebookProviderWrapper.ts', + 'src/client/datascience/crossProcessLock.ts', + 'src/client/datascience/debugLocationTrackerFactory.ts', + 'src/client/datascience/preWarmVariables.ts', + 'src/client/datascience/common.ts', + 'src/client/datascience/kernelSocketWrapper.ts', + 'src/client/datascience/jupyterDebugService.ts', + 'src/client/datascience/utils.ts', + 'src/client/datascience/interactive-common/serialization.ts', + 'src/client/datascience/interactive-common/showPlotListener.ts', + 'src/client/datascience/interactive-common/debugListener.ts', + 'src/client/datascience/interactive-common/interactiveBase.ts', + 'src/client/datascience/interactive-common/types.ts', + 'src/client/datascience/interactive-common/linkProvider.ts', + 'src/client/datascience/interactive-common/notebookUsageTracker.ts', + 'src/client/datascience/interactive-common/interactiveWindowTypes.ts', + 'src/client/datascience/interactive-common/synchronization.ts', + 'src/client/datascience/interactive-common/notebookProvider.ts', + 'src/client/datascience/interactive-common/interactiveWindowMessageListener.ts', + 'src/client/datascience/interactive-common/intellisense/wordHelper.ts', + 'src/client/datascience/interactive-common/intellisense/intellisenseDocument.ts', + 'src/client/datascience/interactive-common/intellisense/intellisenseLine.ts', + 'src/client/datascience/interactive-common/intellisense/conversion.ts', + 'src/client/datascience/interactive-common/intellisense/intellisenseProvider.ts', + 'src/client/datascience/interactive-common/notebookServerProvider.ts', + 'src/client/datascience/activation.ts', + 'src/client/datascience/jupyterUriProviderWrapper.ts', + 'src/client/datascience/types.ts', + 'src/client/datascience/errorHandler/errorHandler.ts', + 'src/client/datascience/cellMatcher.ts', + 'src/client/datascience/notebookStorage/notebookModel.ts', + 'src/client/datascience/notebookStorage/notebookModelEditEvent.ts', + 'src/client/datascience/notebookStorage/notebookStorageProvider.ts', + 'src/client/datascience/notebookStorage/nativeEditorStorage.ts', + 'src/client/datascience/notebookStorage/factory.ts', + 'src/client/datascience/notebookStorage/types.ts', + 'src/client/datascience/notebookStorage/nativeEditorProvider.ts', + 'src/client/datascience/notebookStorage/vscNotebookModel.ts', + 'src/client/datascience/notebookStorage/baseModel.ts', + 'src/client/datascience/debugLocationTracker.ts', + 'src/client/datascience/plotting/plotViewerMessageListener.ts', + 'src/client/datascience/plotting/types.ts', + 'src/client/datascience/plotting/plotViewer.ts', + 'src/client/datascience/plotting/plotViewerProvider.ts', + 'src/client/datascience/constants.ts', + 'src/client/datascience/monacoMessages.ts', + 'src/client/datascience/interactive-ipynb/nativeEditorRunByLineListener.ts', + 'src/client/datascience/interactive-ipynb/nativeEditorViewTracker.ts', + 'src/client/datascience/interactive-ipynb/trustCommandHandler.ts', + 'src/client/datascience/interactive-ipynb/nativeEditorOldWebView.ts', + 'src/client/datascience/interactive-ipynb/nativeEditorSynchronizer.ts', + 'src/client/datascience/interactive-ipynb/nativeEditor.ts', + 'src/client/datascience/interactive-ipynb/trustService.ts', + 'src/client/datascience/interactive-ipynb/digestStorage.ts', + 'src/client/datascience/interactive-ipynb/nativeEditorProviderOld.ts', + 'src/client/datascience/interactive-ipynb/nativeEditorCommandListener.ts', + 'src/client/datascience/interactive-ipynb/autoSaveService.ts', + 'src/client/datascience/editor-integration/hoverProvider.ts', + 'src/client/datascience/editor-integration/codeLensFactory.ts', + 'src/client/datascience/editor-integration/codewatcher.ts', + 'src/client/datascience/editor-integration/decorator.ts', + 'src/client/datascience/editor-integration/codelensprovider.ts', + 'src/client/datascience/editor-integration/cellhashprovider.ts', + 'src/client/datascience/commands/commandLineSelector.ts', + 'src/client/datascience/commands/notebookCommands.ts', + 'src/client/datascience/commands/exportCommands.ts', + 'src/client/datascience/commands/commandRegistry.ts', + 'src/client/datascience/commands/serverSelector.ts', + 'src/client/datascience/cellFactory.ts', + 'src/client/datascience/notebook/contentProvider.ts', + 'src/client/datascience/notebook/notebookDisposeService.ts', + 'src/client/datascience/notebook/serviceRegistry.ts', + 'src/client/datascience/notebook/notebookEditor.ts', + 'src/client/datascience/notebook/notebookEditorCompatibilitySupport.ts', + 'src/client/datascience/notebook/kernelProvider.ts', + 'src/client/datascience/notebook/integration.ts', + 'src/client/datascience/notebook/types.ts', + 'src/client/datascience/notebook/notebookEditorProvider.ts', + 'src/client/datascience/notebook/constants.ts', + 'src/client/datascience/notebook/notebookEditorProviderWrapper.ts', + 'src/client/datascience/notebook/renderer.ts', + 'src/client/datascience/notebook/rendererExtensionDownloader.ts', + 'src/client/datascience/notebook/helpers/multiCancellationToken.ts', + 'src/client/datascience/notebook/helpers/helpers.ts', + 'src/client/datascience/notebook/helpers/executionHelpers.ts', + 'src/client/datascience/notebook/survey.ts', + 'src/client/datascience/notebook/rendererExtension.ts', + 'src/client/datascience/export/exportToHTML.ts', + 'src/client/datascience/export/exportToPython.ts', + 'src/client/datascience/export/exportUtil.ts', + 'src/client/datascience/export/exportManager.ts', + 'src/client/datascience/export/types.ts', + 'src/client/datascience/export/exportToPDF.ts', + 'src/client/datascience/export/exportManagerFilePicker.ts', + 'src/client/datascience/export/exportBase.ts', + 'src/client/datascience/export/exportFileOpener.ts', + 'src/client/datascience/notebookAndInteractiveTracker.ts', + 'src/client/datascience/statusProvider.ts', + 'src/client/datascience/jupyter/interpreter/jupyterInterpreterSelectionCommand.ts', + 'src/client/datascience/jupyter/interpreter/jupyterCommand.ts', + 'src/client/datascience/jupyter/interpreter/jupyterInterpreterStateStore.ts', + 'src/client/datascience/jupyter/interpreter/jupyterInterpreterDependencyService.ts', + 'src/client/datascience/jupyter/interpreter/jupyterInterpreterOldCacheStateStore.ts', + 'src/client/datascience/jupyter/interpreter/jupyterInterpreterSubCommandExecutionService.ts', + 'src/client/datascience/jupyter/interpreter/jupyterInterpreterSelector.ts', + 'src/client/datascience/jupyter/interpreter/jupyterInterpreterService.ts', + 'src/client/datascience/jupyter/kernels/kernelSelector.ts', + 'src/client/datascience/jupyter/kernels/jupyterKernelPromiseFailedError.ts', + 'src/client/datascience/jupyter/kernels/helpers.ts', + 'src/client/datascience/jupyter/kernels/kernelExecution.ts', + 'src/client/datascience/jupyter/kernels/kernelSwitcher.ts', + 'src/client/datascience/jupyter/kernels/kernelService.ts', + 'src/client/datascience/jupyter/kernels/kernelProvider.ts', + 'src/client/datascience/jupyter/kernels/types.ts', + 'src/client/datascience/jupyter/kernels/kernelSelections.ts', + 'src/client/datascience/jupyter/kernels/jupyterKernelSpec.ts', + 'src/client/datascience/jupyter/kernels/kernelDependencyService.ts', + 'src/client/datascience/jupyter/kernels/kernel.ts', + 'src/client/datascience/jupyter/kernels/cellExecution.ts', + 'src/client/datascience/jupyter/jupyterNotebook.ts', + 'src/client/datascience/jupyter/jupyterExecutionFactory.ts', + 'src/client/datascience/jupyter/jupyterSession.ts', + 'src/client/datascience/jupyter/serverPreload.ts', + 'src/client/datascience/jupyter/jupyterRequest.ts', + 'src/client/datascience/jupyter/jupyterNotebookProvider.ts', + 'src/client/datascience/jupyter/commandLineSelector.ts', + 'src/client/datascience/jupyter/jupyterVariables.ts', + 'src/client/datascience/jupyter/jupyterDebugger.ts', + 'src/client/datascience/jupyter/liveshare/hostJupyterServer.ts', + 'src/client/datascience/jupyter/liveshare/roleBasedFactory.ts', + 'src/client/datascience/jupyter/liveshare/guestJupyterNotebook.ts', + 'src/client/datascience/jupyter/liveshare/hostJupyterNotebook.ts', + 'src/client/datascience/jupyter/liveshare/responseQueue.ts', + 'src/client/datascience/jupyter/liveshare/hostJupyterExecution.ts', + 'src/client/datascience/jupyter/liveshare/liveShareParticipantMixin.ts', + 'src/client/datascience/jupyter/liveshare/utils.ts', + 'src/client/datascience/jupyter/liveshare/guestJupyterSessionManager.ts', + 'src/client/datascience/jupyter/liveshare/guestJupyterSessionManagerFactory.ts', + 'src/client/datascience/jupyter/liveshare/types.ts', + 'src/client/datascience/jupyter/liveshare/guestJupyterServer.ts', + 'src/client/datascience/jupyter/liveshare/serverCache.ts', + 'src/client/datascience/jupyter/liveshare/guestJupyterExecution.ts', + 'src/client/datascience/jupyter/kernelVariables.ts', + 'src/client/datascience/jupyter/jupyterSessionManagerFactory.ts', + 'src/client/datascience/jupyter/jupyterDebuggerPortBlockedError.ts', + 'src/client/datascience/jupyter/jupyterConnectError.ts', + 'src/client/datascience/jupyter/jupyterExecution.ts', + 'src/client/datascience/jupyter/debuggerVariableRegistration.ts', + 'src/client/datascience/jupyter/jupyterDebuggerRemoteNotSupported.ts', + 'src/client/datascience/jupyter/jupyterConnection.ts', + 'src/client/datascience/jupyter/jupyterPasswordConnect.ts', + 'src/client/datascience/jupyter/jupyterDebuggerNotInstalledError.ts', + 'src/client/datascience/jupyter/jupyterSelfCertsError.ts', + 'src/client/datascience/jupyter/jupyterDebuggerPortNotAvailableError.ts', + 'src/client/datascience/jupyter/jupyterWebSocket.ts', + 'src/client/datascience/jupyter/jupyterServer.ts', + 'src/client/datascience/jupyter/jupyterInvalidKernelError.ts', + 'src/client/datascience/jupyter/jupyterExporter.ts', + 'src/client/datascience/jupyter/notebookStarter.ts', + 'src/client/datascience/jupyter/jupyterZMQBinariesNotFoundError.ts', + 'src/client/datascience/jupyter/serverSelector.ts', + 'src/client/datascience/jupyter/jupyterUtils.ts', + 'src/client/datascience/jupyter/jupyterSessionManager.ts', + 'src/client/datascience/jupyter/jupyterDataRateLimitError.ts', + 'src/client/datascience/jupyter/variableScriptLoader.ts', + 'src/client/datascience/jupyter/jupyterServerWrapper.ts', + 'src/client/datascience/jupyter/jupyterImporter.ts', + 'src/client/datascience/jupyter/jupyterInstallError.ts', + 'src/client/datascience/jupyter/oldJupyterVariables.ts', + 'src/client/datascience/jupyter/jupyterInterruptError.ts', + 'src/client/datascience/jupyter/invalidNotebookFileError.ts', + 'src/client/datascience/jupyter/jupyterWaitForIdleError.ts', + 'src/client/datascience/jupyter/jupyterCellOutputMimeTypeTracker.ts', + 'src/client/datascience/jupyter/debuggerVariables.ts', + 'src/client/datascience/dataScienceFileSystem.ts', + 'src/client/logging/levels.ts', + 'src/client/logging/transports.ts', + 'src/client/logging/_global.ts', + 'src/client/logging/logger.ts', + 'src/client/logging/util.ts', + 'src/client/logging/index.ts', + 'src/client/logging/formatters.ts', + 'src/client/logging/trace.ts', + 'src/client/ioc/serviceManager.ts', + 'src/client/ioc/container.ts', + 'src/client/ioc/types.ts', + 'src/client/ioc/index.ts', + 'src/client/refactor/proxy.ts', + 'src/client/workspaceSymbols/main.ts', + 'src/client/workspaceSymbols/contracts.ts', + 'src/client/workspaceSymbols/generator.ts', + 'src/client/workspaceSymbols/parser.ts', + 'src/client/workspaceSymbols/provider.ts' + ], + parser: '@typescript-eslint/parser', + parserOptions: { + project: 'tsconfig.json', + sourceType: 'module' + }, + plugins: [ + 'eslint-plugin-import', + 'eslint-plugin-jsdoc', + 'eslint-plugin-no-null', + 'eslint-plugin-prefer-arrow', + 'eslint-plugin-react', + '@typescript-eslint', + '@typescript-eslint/tslint' + ], + rules: { + // Overriding ESLint rules with Typescript-specific ones + '@typescript-eslint/ban-ts-comment': [ + 'error', + { + 'ts-ignore': 'allow-with-description' + } + ], + '@typescript-eslint/explicit-module-boundary-types': 'off', + 'no-bitwise': 'off', + 'no-dupe-class-members': 'off', + '@typescript-eslint/no-dupe-class-members': 'error', + 'no-empty-function': 'off', + '@typescript-eslint/no-empty-function': ['error'], + '@typescript-eslint/no-empty-interface': 'off', + '@typescript-eslint/no-explicit-any': 'error', + '@typescript-eslint/no-non-null-assertion': 'off', + 'no-unused-vars': 'off', + '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '_\\w*' }], + 'no-use-before-define': 'off', + '@typescript-eslint/no-use-before-define': [ + 'error', + { + functions: false + } + ], + 'no-useless-constructor': 'off', + '@typescript-eslint/no-useless-constructor': 'error', + '@typescript-eslint/no-var-requires': 'off', + '@typescript-eslint/no-floating-promises': 'error', + + // Other rules + 'class-methods-use-this': 'off', + 'func-names': 'off', + 'import/extensions': 'off', + 'import/namespace': 'off', + 'import/no-extraneous-dependencies': 'off', + 'import/no-unresolved': [ + 'error', + { + ignore: ['monaco-editor', 'vscode'] + } + ], + 'import/prefer-default-export': 'off', + 'linebreak-style': 'off', + 'no-await-in-loop': 'off', + 'no-console': 'off', + 'no-control-regex': 'off', + 'no-extend-native': 'off', + 'no-multi-str': 'off', + 'no-param-reassign': 'off', + 'no-prototype-builtins': 'off', + 'no-restricted-syntax': [ + 'error', + { + selector: 'ForInStatement', + message: + 'for..in loops iterate over the entire prototype chain, which is virtually never what you want. Use Object.{keys,values,entries}, and iterate over the resulting array.' + }, + + { + selector: 'LabeledStatement', + message: + 'Labels are a form of GOTO; using them makes code confusing and hard to maintain and understand.' + }, + { + selector: 'WithStatement', + message: '`with` is disallowed in strict mode because it makes code impossible to predict and optimize.' + } + ], + 'no-template-curly-in-string': 'off', + 'no-underscore-dangle': 'off', + 'no-useless-escape': 'off', + 'no-void': [ + 'error', + { + allowAsStatement: true + } + ], + 'operator-assignment': 'off', + 'react/jsx-filename-extension': [ + 1, + { + extensions: ['.tsx'] + } + ], + strict: 'off' + }, + settings: { + 'import/extensions': ['.ts', '.tsx', '.d.ts', '.js', '.jsx'], + 'import/external-module-folders': ['node_modules', 'node_modules/@types'], + 'import/parsers': { + '@typescript-eslint/parser': ['.ts', '.tsx', '.d.ts'] + }, + 'import/resolver': { + node: { + extensions: ['.ts', '.tsx', '.d.ts', '.js', '.jsx'] + } + }, + react: { + pragma: 'React', + version: 'detect' + }, + propWrapperFunctions: ['forbidExtraProps', 'exact', 'Object.freeze'], + 'import/core-modules': [], + 'import/ignore': ['node_modules', '\\.(coffee|scss|css|less|hbs|svg|json)$'] + } +}; diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 2cf4f95f86c..c05e79dc6e3 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -139,8 +139,8 @@ jobs: - name: Install dependencies (npm ci) run: npm ci --prefer-offline - - name: Run linting on TypeScript code - run: npx tslint --project tsconfig.json + - name: Run linting on TypeScript code (eslint) + run: npm run lint - name: Run prettier on TypeScript code run: npx prettier 'src/**/*.ts*' --check diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 95e759d089e..a2d75c50ce4 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -33,10 +33,7 @@ "kind": "build", "isDefault": true }, - "problemMatcher": [ - "$tsc-watch", - "$ts-checker-webpack-watch" - ] + "problemMatcher": ["$tsc-watch", "$ts-checker-webpack-watch"] }, { "label": "Run Unit Tests", @@ -51,9 +48,7 @@ "label": "Inject DS WebBrowser UI", "type": "shell", "command": "node", - "args": [ - "build/debug/replaceWithWebBrowserPanel.js" - ], + "args": ["build/debug/replaceWithWebBrowserPanel.js"], "problemMatcher": [] }, { @@ -61,6 +56,13 @@ "script": "preTestJediLSP", "problemMatcher": [], "label": "preTestJediLSP" + }, + { + "type": "npm", + "script": "lint", + "problemMatcher": ["$eslint-stylish"], + "label": "npm: lint", + "detail": "eslint -c .eslintrc.js --ext .ts src" } ] } diff --git a/.vscodeignore b/.vscodeignore index 8dbc93ebb2c..7716e17ae76 100644 --- a/.vscodeignore +++ b/.vscodeignore @@ -42,7 +42,7 @@ test.ipynb travis*.log tsconfig*.json tsfmt.json -tslint.json +.eslintrc.js typings.json vsc-extension-quickstart.md vscode-python-signing.* diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index d088dc174e8..faf7ac98566 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -2,8 +2,8 @@ --- -| `main` branch | -| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | +| `main` branch | +| ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | [![Insiders VSIX](https://github.com/microsoft/vscode-jupyter/workflows/Insiders%20VSIX/badge.svg?branch=main)](https://github.com/microsoft/vscode-jupyter/workflows/Insiders%20VSIX/badge.svg?branch=main) | [[Development build](https://pvsc.blob.core.windows.net/extension-builds/ms-toolsai-jupyter-insiders.vsix)] @@ -21,7 +21,7 @@ 1. Windows, macOS, or Linux 1. [Visual Studio Code](https://code.visualstudio.com/) 1. The following VS Code extensions: - - [TSLint](https://marketplace.visualstudio.com/items?itemName=ms-vscode.vscode-typescript-tslint-plugin) + - [ESLint](https://marketplace.visualstudio.com/items?itemName=dbaeumer.vscode-eslint) - [Prettier](https://marketplace.visualstudio.com/items?itemName=esbenp.prettier-vscode) - [EditorConfig for VS Code](https://marketplace.visualstudio.com/items?itemName=EditorConfig.EditorConfig) - [Python Extension for VS Code](https://marketplace.visualstudio.com/items?itemName=ms-python.python) @@ -295,4 +295,3 @@ Steps to build the extension on your machine once you've cloned the repo: Resulting in a `ms-toolsai-jupyter-insiders.vsix` file in your `vscode-jupyter` folder. ⚠️ If you made changes to `package.json`, run `npm install` (instead of `npm ci`) to update `package-lock.json` and install dependencies all at once. - diff --git a/build/.eslintrc b/build/.eslintrc deleted file mode 100644 index 8a44c2cfe2c..00000000000 --- a/build/.eslintrc +++ /dev/null @@ -1,41 +0,0 @@ -{ - "root": true, - "env": { - "node": true, - "es6": true, - "mocha": true - }, - "extends": [ - "airbnb" - ], - "rules": { - "comma-dangle": "off", - "func-names": "off", - "import/no-extraneous-dependencies": [ - "error", - { - "peerDependencies": true, - "devDependencies": true - } - ], - "import/prefer-default-export": "off", - "indent": [ - "error", - 4, - { - "SwitchCase": 1 - } - ], - "max-len": [ - "error", - { - "code": 120 - } - ], - "no-console": "off", - "no-param-reassign": "off", - "no-underscore-dangle": "off", - "no-useless-escape": "off", - "strict": "off" - } -} diff --git a/package-lock.json b/package-lock.json index 6b80dfe0212..7dcb7ca29dc 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1161,9 +1161,9 @@ "integrity": "sha512-BCN9uNWH8AmiP7BXBJqEinUY9KXalmRzo+L0cB/mQsmFfzODxwQrbvxCHXUNH2iP+qKkWYtB4vyy8N62PViMFw==" }, "@eslint/eslintrc": { - "version": "0.1.3", - "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.1.3.tgz", - "integrity": "sha512-4YVwPkANLeNtRjMekzux1ci8hIaH5eGKktGqR0d3LWsKNn5B2X/1Z6Trxy7jQXl9EBGE6Yj02O+t09FMeRllaA==", + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/@eslint/eslintrc/-/eslintrc-0.2.2.tgz", + "integrity": "sha512-EfB5OHNYp1F4px/LI/FEnGylop7nOqkQ1LRzCM0KccA2U8tvV8w01KBv37LbO7nW4H+YhKyo2LcJhRwjjV17QQ==", "dev": true, "requires": { "ajv": "^6.12.4", @@ -1179,9 +1179,9 @@ }, "dependencies": { "ajv": { - "version": "6.12.4", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.4.tgz", - "integrity": "sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ==", + "version": "6.12.6", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz", + "integrity": "sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", @@ -1191,12 +1191,12 @@ } }, "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, "fast-deep-equal": { @@ -1221,9 +1221,9 @@ "dev": true }, "import-fresh": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", - "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, "requires": { "parent-module": "^1.0.0", @@ -4228,18 +4228,207 @@ }, "dependencies": { "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" + } + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" } }, "semver": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", - "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, + "@typescript-eslint/eslint-plugin-tslint": { + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin-tslint/-/eslint-plugin-tslint-4.13.0.tgz", + "integrity": "sha512-r6n4irL74bOx4z2f0WxnwG6MY67EESvjvK/VMoIlDelW3Q6cwunCH8ug3l8hkPtgJ7iObmUjpAWKxyF4ZdvEcw==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "4.13.0", + "lodash": "^4.17.15" + }, + "dependencies": { + "@typescript-eslint/experimental-utils": { + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-4.13.0.tgz", + "integrity": "sha512-/ZsuWmqagOzNkx30VWYV3MNB/Re/CGv/7EzlqZo5RegBN8tMuPaBgNK6vPBCQA8tcYrbsrTdbx3ixMRRKEEGVw==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.3", + "@typescript-eslint/scope-manager": "4.13.0", + "@typescript-eslint/types": "4.13.0", + "@typescript-eslint/typescript-estree": "4.13.0", + "eslint-scope": "^5.0.0", + "eslint-utils": "^2.0.0" + } + }, + "@typescript-eslint/types": { + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.13.0.tgz", + "integrity": "sha512-/+aPaq163oX+ObOG00M0t9tKkOgdv9lq0IQv/y4SqGkAXmhFmCfgsELV7kOCTb2vVU5VOmVwXBXJTDr353C1rQ==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-4.13.0.tgz", + "integrity": "sha512-9A0/DFZZLlGXn5XA349dWQFwPZxcyYyCFX5X88nWs2uachRDwGeyPz46oTsm9ZJE66EALvEns1lvBwa4d9QxMg==", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.13.0", + "@typescript-eslint/visitor-keys": "4.13.0", + "debug": "^4.1.1", + "globby": "^11.0.1", + "is-glob": "^4.0.1", + "lodash": "^4.17.15", + "semver": "^7.3.2", + "tsutils": "^3.17.1" + } + }, + "@typescript-eslint/visitor-keys": { + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.13.0.tgz", + "integrity": "sha512-6RoxWK05PAibukE7jElqAtNMq+RWZyqJ6Q/GdIxaiUj2Ept8jh8+FUVlbq9WxMYxkmEOPvCE5cRSyupMpwW31g==", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.13.0", + "eslint-visitor-keys": "^2.0.0" + } + }, + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true + }, + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "requires": { + "path-type": "^4.0.0" + } + }, + "eslint-scope": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", + "dev": true, + "requires": { + "esrecurse": "^4.3.0", + "estraverse": "^4.1.1" + } + }, + "eslint-visitor-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", + "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", + "dev": true + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "requires": { + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } + } + }, + "globby": { + "version": "11.0.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-11.0.2.tgz", + "integrity": "sha512-2ZThXDvvV8fYFRVIxnrMQBipZQDr7MxKAmQK1vujaj9/7eF0efG7BPUKJ7jP7G5SLF37xKDXvO4S/KKLj/Z0og==", + "dev": true, + "requires": { + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.1.1", + "ignore": "^5.1.4", + "merge2": "^1.3.0", + "slash": "^3.0.0" + } + }, + "ignore": { + "version": "5.1.8", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", + "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", + "dev": true + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true + }, + "semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true } } @@ -4258,14 +4447,31 @@ }, "dependencies": { "eslint-scope": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.0.tgz", - "integrity": "sha512-iiGRvtxWqgtx5m8EyQUJihBloE4EnYeGE/bz1wSPwJE6tZuJUtHlhqDM4Xj2ukE8Dyy1+HCZ4hE0fzIVMzb58w==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, "requires": { - "esrecurse": "^4.1.0", + "esrecurse": "^4.3.0", "estraverse": "^4.1.1" } + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "requires": { + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } + } } } }, @@ -4282,6 +4488,40 @@ "eslint-visitor-keys": "^1.1.0" } }, + "@typescript-eslint/scope-manager": { + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-4.13.0.tgz", + "integrity": "sha512-UpK7YLG2JlTp/9G4CHe7GxOwd93RBf3aHO5L+pfjIrhtBvZjHKbMhBXTIQNkbz7HZ9XOe++yKrXutYm5KmjWgQ==", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.13.0", + "@typescript-eslint/visitor-keys": "4.13.0" + }, + "dependencies": { + "@typescript-eslint/types": { + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-4.13.0.tgz", + "integrity": "sha512-/+aPaq163oX+ObOG00M0t9tKkOgdv9lq0IQv/y4SqGkAXmhFmCfgsELV7kOCTb2vVU5VOmVwXBXJTDr353C1rQ==", + "dev": true + }, + "@typescript-eslint/visitor-keys": { + "version": "4.13.0", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-4.13.0.tgz", + "integrity": "sha512-6RoxWK05PAibukE7jElqAtNMq+RWZyqJ6Q/GdIxaiUj2Ept8jh8+FUVlbq9WxMYxkmEOPvCE5cRSyupMpwW31g==", + "dev": true, + "requires": { + "@typescript-eslint/types": "4.13.0", + "eslint-visitor-keys": "^2.0.0" + } + }, + "eslint-visitor-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", + "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", + "dev": true + } + } + }, "@typescript-eslint/types": { "version": "3.10.1", "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-3.10.1.tgz", @@ -4305,12 +4545,12 @@ }, "dependencies": { "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, "glob": { @@ -4327,10 +4567,28 @@ "path-is-absolute": "^1.0.0" } }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, "semver": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", - "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", "dev": true } } @@ -4582,9 +4840,9 @@ } }, "acorn-jsx": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz", - "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==", + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.1.tgz", + "integrity": "sha512-K0Ptm/47OKfQRpNQ2J/oIN/3QYiK6FwW+eJbILhsdxh2WTLdl+30o8aGdTbm5JbffpFFAg/g+zi1E+jvJha5ng==", "dev": true }, "acorn-node": { @@ -5171,31 +5429,33 @@ } }, "array.prototype.flatmap": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.2.3.tgz", - "integrity": "sha512-OOEk+lkePcg+ODXIpvuU9PAryCikCJyo7GlDG1upleEpQRx6mzL9puEBkozQ5iAx20KV0l3DbyQwqciJtqe5Pg==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/array.prototype.flatmap/-/array.prototype.flatmap-1.2.4.tgz", + "integrity": "sha512-r9Z0zYoxqHz60vvQbWEdXIEtCwHF0yxaWfno9qzXeNHvfyl3BZqygmGzb84dsubyaXLH4husF+NFgMSdpZhk2Q==", "dev": true, "requires": { + "call-bind": "^1.0.0", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", + "es-abstract": "^1.18.0-next.1", "function-bind": "^1.1.1" }, "dependencies": { "es-abstract": { - "version": "1.17.6", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", - "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", + "version": "1.18.0-next.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", + "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", "dev": true, "requires": { "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", "has": "^1.0.3", "has-symbols": "^1.0.1", - "is-callable": "^1.2.0", - "is-regex": "^1.1.0", - "object-inspect": "^1.7.0", + "is-callable": "^1.2.2", + "is-negative-zero": "^2.0.0", + "is-regex": "^1.1.1", + "object-inspect": "^1.8.0", "object-keys": "^1.1.1", - "object.assign": "^4.1.0", + "object.assign": "^4.1.1", "string.prototype.trimend": "^1.0.1", "string.prototype.trimstart": "^1.0.1" } @@ -5218,9 +5478,9 @@ "dev": true }, "is-callable": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz", - "integrity": "sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz", + "integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==", "dev": true }, "is-regex": { @@ -5233,10 +5493,22 @@ } }, "object-inspect": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", - "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", + "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==", "dev": true + }, + "object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } } } }, @@ -5450,9 +5722,9 @@ "dev": true }, "astral-regex": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", - "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-2.0.0.tgz", + "integrity": "sha512-Z7tMw1ytTXt5jqMcOP+OQteU1VuNK9Y02uuJtKQ1Sv69jXQKKg5cibLwGJow8yzZP+eAc18EmLGPal0bp36rvQ==", "dev": true }, "async": { @@ -6711,6 +6983,16 @@ } } }, + "call-bind": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", + "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "get-intrinsic": "^1.0.2" + } + }, "caller-callsite": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/caller-callsite/-/caller-callsite-2.0.0.tgz", @@ -7264,6 +7546,12 @@ "integrity": "sha512-aE2Y4MTFJ870NuB/+2z1cXBhSBBzRydVVjzhFC4gtenEhpnj15yu0qptWGJsO9YGrcPZ3ezX8AWb1VA391MKpQ==", "dev": true }, + "comment-parser": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-1.0.1.tgz", + "integrity": "sha512-korDJ16mBVZexVd485jz4AeAcAFP1UzeecfVgfBCBojLFjMEHEHOY9vgk3e9o1zRSP0EscavonLki4JZDCKmrg==", + "dev": true + }, "commondir": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/commondir/-/commondir-1.0.1.tgz", @@ -9942,26 +10230,26 @@ } }, "eslint": { - "version": "7.8.1", - "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.8.1.tgz", - "integrity": "sha512-/2rX2pfhyUG0y+A123d0ccXtMm7DV7sH1m3lk9nk2DZ2LReq39FXHueR9xZwshE5MdfSf0xunSaMWRqyIA6M1w==", + "version": "7.17.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-7.17.0.tgz", + "integrity": "sha512-zJk08MiBgwuGoxes5sSQhOtibZ75pz0J35XTRlZOk9xMffhpA9BTbQZxoXZzOl5zMbleShbGwtw+1kGferfFwQ==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", - "@eslint/eslintrc": "^0.1.3", + "@eslint/eslintrc": "^0.2.2", "ajv": "^6.10.0", "chalk": "^4.0.0", "cross-spawn": "^7.0.2", "debug": "^4.0.1", "doctrine": "^3.0.0", "enquirer": "^2.3.5", - "eslint-scope": "^5.1.0", + "eslint-scope": "^5.1.1", "eslint-utils": "^2.1.0", - "eslint-visitor-keys": "^1.3.0", - "espree": "^7.3.0", + "eslint-visitor-keys": "^2.0.0", + "espree": "^7.3.1", "esquery": "^1.2.0", "esutils": "^2.0.2", - "file-entry-cache": "^5.0.1", + "file-entry-cache": "^6.0.0", "functional-red-black-tree": "^1.0.1", "glob-parent": "^5.0.0", "globals": "^12.1.0", @@ -9981,7 +10269,7 @@ "semver": "^7.2.1", "strip-ansi": "^6.0.0", "strip-json-comments": "^3.1.0", - "table": "^5.2.3", + "table": "^6.0.4", "text-table": "^0.2.0", "v8-compile-cache": "^2.0.3" }, @@ -9993,12 +10281,11 @@ "dev": true }, "ansi-styles": { - "version": "4.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", - "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", "dev": true, "requires": { - "@types/color-name": "^1.1.1", "color-convert": "^2.0.1" } }, @@ -10039,12 +10326,12 @@ } }, "debug": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", - "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", "dev": true, "requires": { - "ms": "^2.1.1" + "ms": "2.1.2" } }, "doctrine": { @@ -10057,15 +10344,38 @@ } }, "eslint-scope": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.0.tgz", - "integrity": "sha512-iiGRvtxWqgtx5m8EyQUJihBloE4EnYeGE/bz1wSPwJE6tZuJUtHlhqDM4Xj2ukE8Dyy1+HCZ4hE0fzIVMzb58w==", + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz", + "integrity": "sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw==", "dev": true, "requires": { - "esrecurse": "^4.1.0", + "esrecurse": "^4.3.0", "estraverse": "^4.1.1" } }, + "eslint-visitor-keys": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-2.0.0.tgz", + "integrity": "sha512-QudtT6av5WXels9WjIM7qz1XD1cWGvX4gGXvp/zBn9nXG02D0utdU3Em2m/QjTnrsk6bBjmCygl3rmj118msQQ==", + "dev": true + }, + "esrecurse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.3.0.tgz", + "integrity": "sha512-KmfKL3b6G+RXvP8N1vr3Tq1kL/oCFgn2NYXEtqP8/L3pKapUA4G8cFVaoF3SU323CD4XypR/ffioHmkti6/Tag==", + "dev": true, + "requires": { + "estraverse": "^5.2.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } + } + }, "glob-parent": { "version": "5.1.1", "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", @@ -10097,9 +10407,9 @@ "dev": true }, "import-fresh": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", - "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.3.0.tgz", + "integrity": "sha512-veYYhQa+D1QBKznvhUHxb8faxlrwUnxseDAbAp457E0wLNio2bOSKnjYDhMj+YiAq61xrMGhQk9iXVk5FzgQMw==", "dev": true, "requires": { "parent-module": "^1.0.0", @@ -10116,6 +10426,15 @@ "type-check": "~0.4.0" } }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, "optionator": { "version": "0.9.1", "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.9.1.tgz", @@ -10155,10 +10474,13 @@ "dev": true }, "semver": { - "version": "7.3.2", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", - "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", - "dev": true + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } }, "shebang-command": { "version": "2.0.0", @@ -10216,6 +10538,12 @@ "requires": { "isexe": "^2.0.0" } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true } } }, @@ -10382,9 +10710,9 @@ } }, "eslint-config-prettier": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.11.0.tgz", - "integrity": "sha512-oB8cpLWSAjOVFEJhhyMZh6NOEOtBVziaqdDQ86+qhDHFbZXoRTM7pNSvFRfW/W/L/LrQ38C99J5CGuRBBzBsdA==", + "version": "6.15.0", + "resolved": "https://registry.npmjs.org/eslint-config-prettier/-/eslint-config-prettier-6.15.0.tgz", + "integrity": "sha512-a1+kOYLR8wMGustcgAjdydMsQ2A/2ipRPwRKUmfYaSxc9ZPcrku080Ctl6zrZzZNs/U82MjSv+qKREkoq3bJaw==", "dev": true, "requires": { "get-stdin": "^6.0.0" @@ -10401,11 +10729,12 @@ }, "dependencies": { "resolve": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", - "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", + "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", "dev": true, "requires": { + "is-core-module": "^2.1.0", "path-parse": "^1.0.6" } } @@ -10476,9 +10805,9 @@ } }, "eslint-plugin-import": { - "version": "2.22.0", - "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.22.0.tgz", - "integrity": "sha512-66Fpf1Ln6aIS5Gr/55ts19eUuoDhAbZgnr6UxK5hbDx6l/QgQgx61AePq+BV4PP2uXQFClgMVzep5zZ94qqsxg==", + "version": "2.22.1", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.22.1.tgz", + "integrity": "sha512-8K7JjINHOpH64ozkAhpT3sd+FswIZTfMZTjdx052pnWrgRCVfp8op9tbjpAk3DdUeI/Ba4C8OjdC0r90erHEOw==", "dev": true, "requires": { "array-includes": "^3.1.1", @@ -10486,7 +10815,7 @@ "contains-path": "^0.1.0", "debug": "^2.6.9", "doctrine": "1.5.0", - "eslint-import-resolver-node": "^0.3.3", + "eslint-import-resolver-node": "^0.3.4", "eslint-module-utils": "^2.6.0", "has": "^1.0.3", "minimatch": "^3.0.4", @@ -10497,13 +10826,14 @@ }, "dependencies": { "array.prototype.flat": { - "version": "1.2.3", - "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.3.tgz", - "integrity": "sha512-gBlRZV0VSmfPIeWfuuy56XZMvbVfbEUnOXUvt3F/eUUUSyzlgLxhEX4YAEpxNAogRGehPSnfXyPtYyKAhkzQhQ==", + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.4.tgz", + "integrity": "sha512-4470Xi3GAPAjZqFcljX2xzckv1qeKPizoNkiS0+O4IoPR2ZNpcjE0pkhdihlDouK+x6QOast26B4Q/O9DJnwSg==", "dev": true, "requires": { + "call-bind": "^1.0.0", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1" + "es-abstract": "^1.18.0-next.1" } }, "doctrine": { @@ -10517,20 +10847,21 @@ } }, "es-abstract": { - "version": "1.17.6", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", - "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", + "version": "1.18.0-next.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", + "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", "dev": true, "requires": { "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", "has": "^1.0.3", "has-symbols": "^1.0.1", - "is-callable": "^1.2.0", - "is-regex": "^1.1.0", - "object-inspect": "^1.7.0", + "is-callable": "^1.2.2", + "is-negative-zero": "^2.0.0", + "is-regex": "^1.1.1", + "object-inspect": "^1.8.0", "object-keys": "^1.1.1", - "object.assign": "^4.1.0", + "object.assign": "^4.1.1", "string.prototype.trimend": "^1.0.1", "string.prototype.trimstart": "^1.0.1" } @@ -10562,15 +10893,15 @@ "dev": true }, "is-callable": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz", - "integrity": "sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz", + "integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==", "dev": true }, "is-regex": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.0.tgz", - "integrity": "sha512-iI97M8KTWID2la5uYXlkbSDQIg4F6o1sYboZKKTDpnDQMLtUL86zxhgDet3Q2SriaYsyGqZ6Mn2SjbRKeLHdqw==", + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz", + "integrity": "sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==", "dev": true, "requires": { "has-symbols": "^1.0.1" @@ -10608,20 +10939,32 @@ } }, "object-inspect": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", - "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", + "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==", "dev": true }, + "object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } + }, "object.values": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.1.tgz", - "integrity": "sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.2.tgz", + "integrity": "sha512-MYC0jvJopr8EK6dPBiO8Nb9mvjdypOachO5REGk6MXzujbBrAisKo3HmdEI6kZDL6fC31Mwee/5YbtMebixeag==", "dev": true, "requires": { + "call-bind": "^1.0.0", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", - "function-bind": "^1.1.1", + "es-abstract": "^1.18.0-next.1", "has": "^1.0.3" } }, @@ -10695,11 +11038,12 @@ } }, "resolve": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", - "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", + "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", "dev": true, "requires": { + "is-core-module": "^2.1.0", "path-parse": "^1.0.6" } }, @@ -10723,6 +11067,72 @@ } } }, + "eslint-plugin-jsdoc": { + "version": "31.0.4", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-31.0.4.tgz", + "integrity": "sha512-jZDKbvIYNqZgS+MB+8EmO/dm5aRbAdXqbmV++uyJDjxUUevWmtbnbzJ6aSFBYteUeyL72WD34eAPOe6vuiiyCg==", + "dev": true, + "requires": { + "comment-parser": "1.0.1", + "debug": "^4.3.1", + "jsdoctypeparser": "^9.0.0", + "lodash": "^4.17.20", + "regextras": "^0.7.1", + "semver": "^7.3.4", + "spdx-expression-parse": "^3.0.1" + }, + "dependencies": { + "debug": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.1.tgz", + "integrity": "sha512-doEwdvm4PCeK4K3RQN2ZC2BYUBaxwLARCqZmMjtF8a51J2Rb0xpVloFRnCODwqjpwnAoao4pelN8l3RJdv3gRQ==", + "dev": true, + "requires": { + "ms": "2.1.2" + } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + }, + "lru-cache": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", + "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", + "dev": true, + "requires": { + "yallist": "^4.0.0" + } + }, + "semver": { + "version": "7.3.4", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.4.tgz", + "integrity": "sha512-tCfb2WLjqFAtXn4KEdxIhalnRtoKFN7nAwj0B3ZXCbQloV2tq5eDbcTmT68JJD3nRJq24/XgxtQKFIpQdtvmVw==", + "dev": true, + "requires": { + "lru-cache": "^6.0.0" + } + }, + "spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + } + } + }, "eslint-plugin-jsx-a11y": { "version": "6.3.1", "resolved": "https://registry.npmjs.org/eslint-plugin-jsx-a11y/-/eslint-plugin-jsx-a11y-6.3.1.tgz", @@ -10775,6 +11185,18 @@ } } }, + "eslint-plugin-no-null": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-no-null/-/eslint-plugin-no-null-1.0.2.tgz", + "integrity": "sha1-EjaoEjkTkKGHetQAfCbnRTQclR8=", + "dev": true + }, + "eslint-plugin-prefer-arrow": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-prefer-arrow/-/eslint-plugin-prefer-arrow-1.2.2.tgz", + "integrity": "sha512-C8YMhL+r8RMeMdYAw/rQtE6xNdMulj+zGWud/qIGnlmomiPRaLDGLMeskZ3alN6uMBojmooRimtdrXebLN4svQ==", + "dev": true + }, "eslint-plugin-prettier": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/eslint-plugin-prettier/-/eslint-plugin-prettier-3.1.2.tgz", @@ -10785,21 +11207,21 @@ } }, "eslint-plugin-react": { - "version": "7.20.6", - "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.20.6.tgz", - "integrity": "sha512-kidMTE5HAEBSLu23CUDvj8dc3LdBU0ri1scwHBZjI41oDv4tjsWZKU7MQccFzH1QYPYhsnTF2ovh7JlcIcmxgg==", + "version": "7.22.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.22.0.tgz", + "integrity": "sha512-p30tuX3VS+NWv9nQot9xIGAHBXR0+xJVaZriEsHoJrASGCJZDJ8JLNM0YqKqI0AKm6Uxaa1VUHoNEibxRCMQHA==", "dev": true, "requires": { "array-includes": "^3.1.1", "array.prototype.flatmap": "^1.2.3", "doctrine": "^2.1.0", "has": "^1.0.3", - "jsx-ast-utils": "^2.4.1", + "jsx-ast-utils": "^2.4.1 || ^3.0.0", "object.entries": "^1.1.2", "object.fromentries": "^2.0.2", "object.values": "^1.1.1", "prop-types": "^15.7.2", - "resolve": "^1.17.0", + "resolve": "^1.18.1", "string.prototype.matchall": "^4.0.2" }, "dependencies": { @@ -10813,20 +11235,21 @@ } }, "es-abstract": { - "version": "1.17.6", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", - "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", + "version": "1.18.0-next.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", + "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", "dev": true, "requires": { "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", "has": "^1.0.3", "has-symbols": "^1.0.1", - "is-callable": "^1.2.0", - "is-regex": "^1.1.0", - "object-inspect": "^1.7.0", + "is-callable": "^1.2.2", + "is-negative-zero": "^2.0.0", + "is-regex": "^1.1.1", + "object-inspect": "^1.8.0", "object-keys": "^1.1.1", - "object.assign": "^4.1.0", + "object.assign": "^4.1.1", "string.prototype.trimend": "^1.0.1", "string.prototype.trimstart": "^1.0.1" } @@ -10849,9 +11272,9 @@ "dev": true }, "is-callable": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz", - "integrity": "sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz", + "integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==", "dev": true }, "is-regex": { @@ -10864,52 +11287,66 @@ } }, "object-inspect": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", - "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", + "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==", "dev": true }, + "object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } + }, "object.entries": { - "version": "1.1.2", - "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.2.tgz", - "integrity": "sha512-BQdB9qKmb/HyNdMNWVr7O3+z5MUIx3aiegEIJqjMBbBf0YT9RRxTJSim4mzFqtyr7PDAHigq0N9dO0m0tRakQA==", + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/object.entries/-/object.entries-1.1.3.tgz", + "integrity": "sha512-ym7h7OZebNS96hn5IJeyUmaWhaSM4SVtAPPfNLQEI2MYWCO2egsITb9nab2+i/Pwibx+R0mtn+ltKJXRSeTMGg==", "dev": true, "requires": { + "call-bind": "^1.0.0", "define-properties": "^1.1.3", - "es-abstract": "^1.17.5", + "es-abstract": "^1.18.0-next.1", "has": "^1.0.3" } }, "object.fromentries": { - "version": "2.0.2", - "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.2.tgz", - "integrity": "sha512-r3ZiBH7MQppDJVLx6fhD618GKNG40CZYH9wgwdhKxBDDbQgjeWGGd4AtkZad84d291YxvWe7bJGuE65Anh0dxQ==", + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/object.fromentries/-/object.fromentries-2.0.3.tgz", + "integrity": "sha512-IDUSMXs6LOSJBWE++L0lzIbSqHl9KDCfff2x/JSEIDtEUavUnyMYC2ZGay/04Zq4UT8lvd4xNhU4/YHKibAOlw==", "dev": true, "requires": { + "call-bind": "^1.0.0", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", - "function-bind": "^1.1.1", + "es-abstract": "^1.18.0-next.1", "has": "^1.0.3" } }, "object.values": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.1.tgz", - "integrity": "sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA==", + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.2.tgz", + "integrity": "sha512-MYC0jvJopr8EK6dPBiO8Nb9mvjdypOachO5REGk6MXzujbBrAisKo3HmdEI6kZDL6fC31Mwee/5YbtMebixeag==", "dev": true, "requires": { + "call-bind": "^1.0.0", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0-next.1", - "function-bind": "^1.1.1", + "es-abstract": "^1.18.0-next.1", "has": "^1.0.3" } }, "resolve": { - "version": "1.17.0", - "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", - "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "version": "1.19.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.19.0.tgz", + "integrity": "sha512-rArEXAgsBG4UgRGcynxWIWKFvh/XZCcS8UJdHhwy91zwAvCZIbcs+vAbflgBnNjYMs/i/i+/Ux6IZhML1yPvxg==", "dev": true, "requires": { + "is-core-module": "^2.1.0", "path-parse": "^1.0.6" } } @@ -10947,20 +11384,20 @@ "dev": true }, "espree": { - "version": "7.3.0", - "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.0.tgz", - "integrity": "sha512-dksIWsvKCixn1yrEXO8UosNSxaDoSYpq9reEjZSbHLpT5hpaCAKTLBwq0RHtLrIr+c0ByiYzWT8KTMRzoRCNlw==", + "version": "7.3.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-7.3.1.tgz", + "integrity": "sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g==", "dev": true, "requires": { "acorn": "^7.4.0", - "acorn-jsx": "^5.2.0", + "acorn-jsx": "^5.3.1", "eslint-visitor-keys": "^1.3.0" }, "dependencies": { "acorn": { - "version": "7.4.0", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.0.tgz", - "integrity": "sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w==", + "version": "7.4.1", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz", + "integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A==", "dev": true } } @@ -11543,12 +11980,12 @@ "dev": true }, "file-entry-cache": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", - "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-6.0.0.tgz", + "integrity": "sha512-fqoO76jZ3ZnYrXLDRxBR1YvOvc0k844kcOg40bgsPrE25LAb/PDqTY+ho64Xh2c8ZXgIKldchCFHczG2UVRcWA==", "dev": true, "requires": { - "flat-cache": "^2.0.1" + "flat-cache": "^3.0.4" } }, "file-loader": { @@ -11758,24 +12195,20 @@ } }, "flat-cache": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", - "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.0.4.tgz", + "integrity": "sha512-dm9s5Pw7Jc0GvMYbshN6zchCA9RgQlzzEZX3vylR9IqFfS8XciblUXOKfW6SiuJ0e13eDYZoZV5wdrev7P3Nwg==", "dev": true, "requires": { - "flatted": "^2.0.0", - "rimraf": "2.6.3", - "write": "1.0.3" + "flatted": "^3.1.0", + "rimraf": "^3.0.2" }, "dependencies": { - "rimraf": { - "version": "2.6.3", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", - "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } + "flatted": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-3.1.0.tgz", + "integrity": "sha512-tW+UkmtNg/jv9CSofAKvgVcO7c2URjhTdW1ZTkcAritblu8tajiYy7YisnIflEwtKssCtOxpnBRoCB7iap0/TA==", + "dev": true } } }, @@ -12981,6 +13414,25 @@ "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", "dev": true }, + "get-intrinsic": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.0.2.tgz", + "integrity": "sha512-aeX0vrFm21ILl3+JpFFRNe9aUvp6VFZb2/CTbgLb8j75kOhvoNYjt9d8KA/tJG4gSo8nzEDedRl0h7vDmBYRVg==", + "dev": true, + "requires": { + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1" + }, + "dependencies": { + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "dev": true + } + } + }, "get-port": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/get-port/-/get-port-3.2.0.tgz", @@ -14231,20 +14683,20 @@ }, "dependencies": { "es-abstract": { - "version": "1.17.6", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", - "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", + "version": "1.17.7", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.7.tgz", + "integrity": "sha512-VBl/gnfcJ7OercKA9MVaegWsBHFjV492syMudcnQZvt/Dw8ezpcOHYZXa/J96O8vx+g4x65YKhxOwDUh63aS5g==", "dev": true, "requires": { "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", "has": "^1.0.3", "has-symbols": "^1.0.1", - "is-callable": "^1.2.0", - "is-regex": "^1.1.0", - "object-inspect": "^1.7.0", + "is-callable": "^1.2.2", + "is-regex": "^1.1.1", + "object-inspect": "^1.8.0", "object-keys": "^1.1.1", - "object.assign": "^4.1.0", + "object.assign": "^4.1.1", "string.prototype.trimend": "^1.0.1", "string.prototype.trimstart": "^1.0.1" } @@ -14267,9 +14719,9 @@ "dev": true }, "is-callable": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz", - "integrity": "sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz", + "integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==", "dev": true }, "is-regex": { @@ -14282,10 +14734,22 @@ } }, "object-inspect": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", - "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", + "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==", "dev": true + }, + "object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } } } }, @@ -14429,6 +14893,15 @@ "ci-info": "^2.0.0" } }, + "is-core-module": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-core-module/-/is-core-module-2.2.0.tgz", + "integrity": "sha512-XRAfAdyyY5F5cOXn7hYQDqh2Xmii+DEfIcQGxK/uNwMHhIkPWO0g8msXcbzLe+MpGoR951MlqM/2iIlU4vKDdQ==", + "dev": true, + "requires": { + "has": "^1.0.3" + } + }, "is-data-descriptor": { "version": "0.1.4", "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", @@ -14537,9 +15010,9 @@ "dev": true }, "is-negative-zero": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.0.tgz", - "integrity": "sha1-lVOxIbD6wohp2p7UWeIMdUN4hGE=", + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-negative-zero/-/is-negative-zero-2.0.1.tgz", + "integrity": "sha512-2z6JzQvZRa9A2Y7xC6dQQm4FSTSTNWjKIYYTt4246eMTJmIo0Q+ZyOsU66X8lxK1AbB92dFeglPLrhwpeRKO6w==", "dev": true }, "is-number": { @@ -15360,6 +15833,12 @@ "resolved": "https://registry.npmjs.org/jsbn/-/jsbn-0.1.1.tgz", "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" }, + "jsdoctypeparser": { + "version": "9.0.0", + "resolved": "https://registry.npmjs.org/jsdoctypeparser/-/jsdoctypeparser-9.0.0.tgz", + "integrity": "sha512-jrTA2jJIL6/DAEILBEh2/w9QxCuwmvNXIry39Ay/HVfhE3o2yVV0U44blYkqdHA/OKloJEqvJy0xU+GSdE2SIw==", + "dev": true + }, "jsdom": { "version": "15.1.1", "resolved": "https://registry.npmjs.org/jsdom/-/jsdom-15.1.1.tgz", @@ -21083,6 +21562,12 @@ "unicode-match-property-value-ecmascript": "^1.1.0" } }, + "regextras": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/regextras/-/regextras-0.7.1.tgz", + "integrity": "sha512-9YXf6xtW+qzQ+hcMQXx95MOvfqXFgsKDZodX3qZB0x2n5Z94ioetIITsBtvJbiOyxa/6s9AtyweBLCdPmPko/w==", + "dev": true + }, "regjsgen": { "version": "0.5.0", "resolved": "https://registry.npmjs.org/regjsgen/-/regjsgen-0.5.0.tgz", @@ -21338,6 +21823,12 @@ "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=" }, + "require-from-string": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/require-from-string/-/require-from-string-2.0.2.tgz", + "integrity": "sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==", + "dev": true + }, "require-main-filename": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", @@ -21911,71 +22402,20 @@ "integrity": "sha512-sQTKC1Re/rM6XyFM6fIAGHRPVGvyXfgzIDvzoq608vM+jeyVD0Tu1E6Np0Kc2zAIFWIj963V2800iF/9LPieQw==" }, "side-channel": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.3.tgz", - "integrity": "sha512-A6+ByhlLkksFoUepsGxfj5x1gTSrs+OydsRptUxeNCabQpCFUvcwIczgOigI8vhY/OJCnPnyE9rGiwgvr9cS1g==", + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", + "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", "dev": true, "requires": { - "es-abstract": "^1.18.0-next.0", - "object-inspect": "^1.8.0" + "call-bind": "^1.0.0", + "get-intrinsic": "^1.0.2", + "object-inspect": "^1.9.0" }, "dependencies": { - "es-abstract": { - "version": "1.18.0-next.0", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.0.tgz", - "integrity": "sha512-elZXTZXKn51hUBdJjSZGYRujuzilgXo8vSPQzjGYXLvSlGiCo8VO8ZGV3kjo9a0WNJJ57hENagwbtlRuHuzkcQ==", - "dev": true, - "requires": { - "es-to-primitive": "^1.2.1", - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.1", - "is-callable": "^1.2.0", - "is-negative-zero": "^2.0.0", - "is-regex": "^1.1.1", - "object-inspect": "^1.8.0", - "object-keys": "^1.1.1", - "object.assign": "^4.1.0", - "string.prototype.trimend": "^1.0.1", - "string.prototype.trimstart": "^1.0.1" - } - }, - "es-to-primitive": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", - "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", - "dev": true, - "requires": { - "is-callable": "^1.1.4", - "is-date-object": "^1.0.1", - "is-symbol": "^1.0.2" - } - }, - "has-symbols": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", - "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", - "dev": true - }, - "is-callable": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz", - "integrity": "sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==", - "dev": true - }, - "is-regex": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz", - "integrity": "sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==", - "dev": true, - "requires": { - "has-symbols": "^1.0.1" - } - }, "object-inspect": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", - "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", + "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==", "dev": true } } @@ -22085,20 +22525,44 @@ "dev": true }, "slice-ansi": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", - "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-4.0.0.tgz", + "integrity": "sha512-qMCMfhY040cVHT43K9BFygqYbUPFZKHOg7K73mtTWJRb8pyP3fzf4Ixd5SzdEJQ6MRUg/WBnOLxghZtKKurENQ==", "dev": true, "requires": { - "ansi-styles": "^3.2.0", - "astral-regex": "^1.0.0", - "is-fullwidth-code-point": "^2.0.0" + "ansi-styles": "^4.0.0", + "astral-regex": "^2.0.0", + "is-fullwidth-code-point": "^3.0.0" }, "dependencies": { + "ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "requires": { + "color-convert": "^2.0.1" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", "dev": true } } @@ -22931,34 +23395,36 @@ } }, "string.prototype.matchall": { - "version": "4.0.2", - "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.2.tgz", - "integrity": "sha512-N/jp6O5fMf9os0JU3E72Qhf590RSRZU/ungsL/qJUYVTNv7hTG0P/dbPjxINVN9jpscu3nzYwKESU3P3RY5tOg==", + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/string.prototype.matchall/-/string.prototype.matchall-4.0.3.tgz", + "integrity": "sha512-OBxYDA2ifZQ2e13cP82dWFMaCV9CGF8GzmN4fljBVw5O5wep0lu4gacm1OL6MjROoUnB8VbkWRThqkV2YFLNxw==", "dev": true, "requires": { + "call-bind": "^1.0.0", "define-properties": "^1.1.3", - "es-abstract": "^1.17.0", + "es-abstract": "^1.18.0-next.1", "has-symbols": "^1.0.1", "internal-slot": "^1.0.2", "regexp.prototype.flags": "^1.3.0", - "side-channel": "^1.0.2" + "side-channel": "^1.0.3" }, "dependencies": { "es-abstract": { - "version": "1.17.6", - "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", - "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", + "version": "1.18.0-next.1", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.18.0-next.1.tgz", + "integrity": "sha512-I4UGspA0wpZXWENrdA0uHbnhte683t3qT/1VFH9aX2dA5PPSf6QW5HHXf5HImaqPmjXaVeVk4RGWnaylmV7uAA==", "dev": true, "requires": { "es-to-primitive": "^1.2.1", "function-bind": "^1.1.1", "has": "^1.0.3", "has-symbols": "^1.0.1", - "is-callable": "^1.2.0", - "is-regex": "^1.1.0", - "object-inspect": "^1.7.0", + "is-callable": "^1.2.2", + "is-negative-zero": "^2.0.0", + "is-regex": "^1.1.1", + "object-inspect": "^1.8.0", "object-keys": "^1.1.1", - "object.assign": "^4.1.0", + "object.assign": "^4.1.1", "string.prototype.trimend": "^1.0.1", "string.prototype.trimstart": "^1.0.1" } @@ -22981,9 +23447,9 @@ "dev": true }, "is-callable": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz", - "integrity": "sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==", + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.2.tgz", + "integrity": "sha512-dnMqspv5nU3LoewK2N/y7KLtxtakvTuaCsU9FU50/QDmdbHNy/4/JuRtMHqRU22o3q+W89YQndQEeCVwK+3qrA==", "dev": true }, "is-regex": { @@ -22996,10 +23462,22 @@ } }, "object-inspect": { - "version": "1.8.0", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", - "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==", + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.9.0.tgz", + "integrity": "sha512-i3Bp9iTqwhaLZBxGkRfo5ZbE07BQRT7MGu8+nNgwW9ItGp1TzCTw2DLEoWwjClxBjOFI/hWljTAmYGCEwmtnOw==", "dev": true + }, + "object.assign": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.2.tgz", + "integrity": "sha512-ixT2L5THXsApyiUPYKmW+2EHpXXe5Ii3M+f4e+aJFAHao5amFRW6J0OO6c/LU8Be47utCx2GL89hxGB6XSmKuQ==", + "dev": true, + "requires": { + "call-bind": "^1.0.0", + "define-properties": "^1.1.3", + "has-symbols": "^1.0.1", + "object-keys": "^1.1.1" + } } } }, @@ -23382,29 +23860,41 @@ } }, "table": { - "version": "5.4.6", - "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", - "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "version": "6.0.7", + "resolved": "https://registry.npmjs.org/table/-/table-6.0.7.tgz", + "integrity": "sha512-rxZevLGTUzWna/qBLObOe16kB2RTnnbhciwgPbMMlazz1yZGVEgnZK762xyVdVznhqxrfCeBMmMkgOOaPwjH7g==", "dev": true, "requires": { - "ajv": "^6.10.2", - "lodash": "^4.17.14", - "slice-ansi": "^2.1.0", - "string-width": "^3.0.0" + "ajv": "^7.0.2", + "lodash": "^4.17.20", + "slice-ansi": "^4.0.0", + "string-width": "^4.2.0" }, "dependencies": { "ajv": { - "version": "6.12.4", - "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.4.tgz", - "integrity": "sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ==", + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-7.0.3.tgz", + "integrity": "sha512-R50QRlXSxqXcQP5SvKUrw8VZeypvo12i2IX0EeR5PiZ7bEKeHWgzgo264LDadUsCU42lTJVhFikTqJwNeH34gQ==", "dev": true, "requires": { "fast-deep-equal": "^3.1.1", - "fast-json-stable-stringify": "^2.0.0", - "json-schema-traverse": "^0.4.1", + "json-schema-traverse": "^1.0.0", + "require-from-string": "^2.0.2", "uri-js": "^4.2.2" } }, + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, "fast-deep-equal": { "version": "3.1.3", "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", @@ -23412,20 +23902,41 @@ "dev": true }, "is-fullwidth-code-point": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", - "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "json-schema-traverse": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz", + "integrity": "sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug==", + "dev": true + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", "dev": true }, "string-width": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", - "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", "dev": true, "requires": { - "emoji-regex": "^7.0.1", - "is-fullwidth-code-point": "^2.0.0", - "strip-ansi": "^5.1.0" + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + } + }, + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" } } } @@ -24417,9 +24928,9 @@ "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==" }, "tslint": { - "version": "5.20.1", - "resolved": "https://registry.npmjs.org/tslint/-/tslint-5.20.1.tgz", - "integrity": "sha512-EcMxhzCFt8k+/UP5r8waCf/lzmeSyVlqxqMEDQE7rWYiQky8KpIBz1JAoYXfROHrPZ1XXd43q8yQnULOLiBRQg==", + "version": "6.1.3", + "resolved": "https://registry.npmjs.org/tslint/-/tslint-6.1.3.tgz", + "integrity": "sha512-IbR4nkT96EQOvKE2PW/djGz8iGNeJ4rF2mBfiYaR/nvUWYKJhLwimoJKgjIFEIDibBtOevj7BqCRL4oHeWWUCg==", "dev": true, "requires": { "@babel/code-frame": "^7.0.0", @@ -24430,13 +24941,19 @@ "glob": "^7.1.1", "js-yaml": "^3.13.1", "minimatch": "^3.0.4", - "mkdirp": "^0.5.1", + "mkdirp": "^0.5.3", "resolve": "^1.3.2", "semver": "^5.3.0", - "tslib": "^1.8.0", + "tslib": "^1.13.0", "tsutils": "^2.29.0" }, "dependencies": { + "tslib": { + "version": "1.14.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz", + "integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg==", + "dev": true + }, "tsutils": { "version": "2.29.0", "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-2.29.0.tgz", @@ -24526,9 +25043,9 @@ } }, "tsutils": { - "version": "3.17.1", - "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.17.1.tgz", - "integrity": "sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==", + "version": "3.19.1", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.19.1.tgz", + "integrity": "sha512-GEdoBf5XI324lu7ycad7s6laADfnAqCw6wLGI+knxvw9vsIYBaJfYdmeCEG3FMMUiSm3OGgNb+m6utsWf5h9Vw==", "dev": true, "requires": { "tslib": "^1.8.1" @@ -25169,9 +25686,9 @@ "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" }, "v8-compile-cache": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.0.3.tgz", - "integrity": "sha512-CNmdbwQMBjwr9Gsmohvm0pbL954tJrNzf6gWL3K+QMQf00PF7ERGrEiLgjuU3mKreLC2MeGhUsNV9ybTbLgd3w==", + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.2.0.tgz", + "integrity": "sha512-gTpR5XQNKFwOd4clxfnhaqvfqMpqEwr4tOtCyz4MtYZX2JYhfr1JvBFKdS+7K/9rfpZR3VLX+YWBbKoxCgS43Q==", "dev": true }, "v8flags": { @@ -26889,15 +27406,6 @@ "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=" }, - "write": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", - "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", - "dev": true, - "requires": { - "mkdirp": "^0.5.1" - } - }, "write-file-atomic": { "version": "3.0.1", "resolved": "https://registry.npmjs.org/write-file-atomic/-/write-file-atomic-3.0.1.tgz", diff --git a/package.json b/package.json index 9b55b8f5079..3473895d9d0 100644 --- a/package.json +++ b/package.json @@ -1840,8 +1840,7 @@ "testPerformance": "node ./out/test/testBootstrap.js ./out/test/performanceTest.js", "testSmoke": "node ./out/test/testBootstrap.js ./out/test/smokeTest.js", "testSmokeLogged": "cross-env VSC_JUPYTER_FORCE_LOGGING=true VSC_JUPYTER_LOG_FILE=smoke-test.log node --no-force-async-hooks-checks ./out/test/testBootstrap.js ./out/test/smokeTest.js", - "lint-staged": "node gulpfile.js", - "lint": "tslint src/**/*.ts -t verbose", + "lint": "eslint -c .eslintrc.js --ext .ts src", "prettier-fix": "prettier 'src/**/*.ts*' --write && prettier 'build/**/*.js' --write", "clean": "gulp clean", "updateBuildNumber": "gulp updateBuildNumber", @@ -2004,8 +2003,9 @@ "@types/winreg": "^1.2.30", "@types/ws": "^6.0.1", "@types/xml2js": "^0.4.2", - "@typescript-eslint/eslint-plugin": "^3.7.0", - "@typescript-eslint/parser": "^3.7.0", + "@typescript-eslint/eslint-plugin": "^3.10.1", + "@typescript-eslint/eslint-plugin-tslint": "^4.13.0", + "@typescript-eslint/parser": "^3.10.1", "acorn": "^6.4.1", "babel-polyfill": "^6.26.0", "cache-loader": "^4.1.0", @@ -2026,13 +2026,16 @@ "download": "^7.0.0", "enzyme": "^3.7.0", "enzyme-adapter-react-16": "^1.6.0", - "eslint": "^7.2.0", + "eslint": "^7.17.0", "eslint-config-airbnb": "^18.2.0", - "eslint-config-prettier": "^6.9.0", - "eslint-plugin-import": "^2.22.0", + "eslint-config-prettier": "^6.15.0", + "eslint-plugin-import": "^2.22.1", + "eslint-plugin-jsdoc": "^31.0.4", "eslint-plugin-jsx-a11y": "^6.3.1", + "eslint-plugin-no-null": "^1.0.2", + "eslint-plugin-prefer-arrow": "^1.2.2", "eslint-plugin-prettier": "^3.1.2", - "eslint-plugin-react": "^7.20.3", + "eslint-plugin-react": "^7.22.0", "eslint-plugin-react-hooks": "^4.0.0", "expose-loader": "^0.7.5", "express": "^4.17.1", @@ -2088,7 +2091,7 @@ "ts-mockito": "^2.5.0", "ts-node": "^8.3.0", "tsconfig-paths-webpack-plugin": "^3.2.0", - "tslint": "^5.20.1", + "tslint": "^6.1.3", "tslint-config-prettier": "^1.18.0", "tslint-eslint-rules": "^5.1.0", "tslint-microsoft-contrib": "^5.0.3", diff --git a/src/client/activation/migrateDataScienceSettingsService.ts b/src/client/activation/migrateDataScienceSettingsService.ts index 38ea1ee0bbe..f13b54d30da 100644 --- a/src/client/activation/migrateDataScienceSettingsService.ts +++ b/src/client/activation/migrateDataScienceSettingsService.ts @@ -87,7 +87,7 @@ export class MigrateDataScienceSettingsService implements IExtensionActivationSe // Remove all data science keys from the original string fileContents = applyEdits(fileContents, modify(fileContents, [k], undefined, modificationOptions)); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any let val = (content as any)[k]; const subkey = k.substr(19); let newKey = `jupyter.${subkey}`; diff --git a/src/client/activation/serviceRegistry.ts b/src/client/activation/serviceRegistry.ts index d486ba20bb2..57092a4a92c 100644 --- a/src/client/activation/serviceRegistry.ts +++ b/src/client/activation/serviceRegistry.ts @@ -11,7 +11,7 @@ import { MigrateDataScienceSettingsService } from './migrateDataScienceSettingsS import { IExtensionActivationManager, IExtensionActivationService, IExtensionSingleActivationService } from './types'; -// tslint:disable-next-line: max-func-body-length +// eslint-disable-next-line export function registerTypes(serviceManager: IServiceManager) { serviceManager.add(IExtensionActivationManager, ExtensionActivationManager); serviceManager.addSingleton( diff --git a/src/client/api.ts b/src/client/api.ts index d4b76e637ff..f9c52c124fc 100644 --- a/src/client/api.ts +++ b/src/client/api.ts @@ -52,7 +52,7 @@ export interface IExtensionApi { } export function buildApi( - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any ready: Promise, serviceManager: IServiceManager, serviceContainer: IServiceContainer @@ -88,10 +88,10 @@ export function buildApi( // In test environment return the DI Container. if (isTestExecution()) { - // tslint:disable:no-any + /* eslint-disable @typescript-eslint/no-explicit-any */ (api as any).serviceContainer = serviceContainer; (api as any).serviceManager = serviceManager; - // tslint:enable:no-any + /* eslint-enable @typescript-eslint/no-explicit-any */ } return api; } diff --git a/src/client/api/pythonApi.ts b/src/client/api/pythonApi.ts index 790ae6b58f3..6235dfd58ff 100644 --- a/src/client/api/pythonApi.ts +++ b/src/client/api/pythonApi.ts @@ -1,12 +1,12 @@ -// tslint:disable-next-line: no-single-line-block-comment +// eslint-disable-next-line /* eslint-disable comma-dangle */ -// tslint:disable-next-line: no-single-line-block-comment +// eslint-disable-next-line /* eslint-disable max-classes-per-file */ -// tslint:disable-next-line: no-single-line-block-comment +// eslint-disable-next-line /* eslint-disable @typescript-eslint/explicit-module-boundary-types */ -// tslint:disable-next-line: no-single-line-block-comment +// eslint-disable-next-line /* eslint-disable class-methods-use-this */ -// tslint:disable-next-line: no-single-line-block-comment +// eslint-disable-next-line /* eslint-disable consistent-return */ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. @@ -36,7 +36,7 @@ import { PythonApi } from './types'; -// tslint:disable: max-classes-per-file +/* eslint-disable max-classes-per-file */ @injectable() export class PythonApiProvider implements IPythonApiProvider { private readonly api = createDeferred(); @@ -157,7 +157,7 @@ export class PythonExtensionChecker implements IPythonExtensionChecker { this.appShell .showInformationMessage(localize.DataScience.pythonExtensionInstalled(), localize.Common.ok()) - .then(noop); + .then(noop, noop); } } } @@ -198,7 +198,7 @@ const ProductMapping: { [key in Product]: JupyterProductToInstall } = { [Product.pandas]: JupyterProductToInstall.pandas }; -// tslint:disable: max-classes-per-file +/* eslint-disable max-classes-per-file */ @injectable() export class PythonInstaller implements IPythonInstaller { constructor(@inject(IPythonApiProvider) private readonly apiProvider: IPythonApiProvider) {} @@ -212,7 +212,7 @@ export class PythonInstaller implements IPythonInstaller { } } -// tslint:disable-next-line: max-classes-per-file +// eslint-disable-next-line max-classes-per-file @injectable() export class EnvironmentActivationService implements IEnvironmentActivationService { constructor(@inject(IPythonApiProvider) private readonly apiProvider: IPythonApiProvider) {} @@ -227,7 +227,7 @@ export class EnvironmentActivationService implements IEnvironmentActivationServi } } -// tslint:disable-next-line: max-classes-per-file +// eslint-disable-next-line max-classes-per-file @injectable() export class InterpreterSelector implements IInterpreterSelector { constructor(@inject(IPythonApiProvider) private readonly apiProvider: IPythonApiProvider) {} @@ -236,7 +236,7 @@ export class InterpreterSelector implements IInterpreterSelector { return this.apiProvider.getApi().then((api) => api.getSuggestions(resource)); } } -// tslint:disable-next-line: max-classes-per-file +// eslint-disable-next-line max-classes-per-file @injectable() export class InterpreterService implements IInterpreterService { private readonly didChangeInterpreter = new EventEmitter(); diff --git a/src/client/common/application/applicationEnvironment.ts b/src/client/common/application/applicationEnvironment.ts index 00e3f0c4676..dd7d53c6b5e 100644 --- a/src/client/common/application/applicationEnvironment.ts +++ b/src/client/common/application/applicationEnvironment.ts @@ -67,7 +67,7 @@ export class ApplicationEnvironment implements IApplicationEnvironment { return vscode.env.uiKind; } public get extensionName(): string { - // tslint:disable-next-line:non-literal-require + // eslint-disable-next-line return this.packageJson.displayName; } /** @@ -82,9 +82,9 @@ export class ApplicationEnvironment implements IApplicationEnvironment { public get shell(): string { return vscode.env.shell; } - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public get packageJson(): any { - // tslint:disable-next-line:non-literal-require no-require-imports + // eslint-disable-next-line @typescript-eslint/no-require-imports return require('../../../../package.json'); } public get channel(): Channel { diff --git a/src/client/common/application/applicationShell.ts b/src/client/common/application/applicationShell.ts index cd28fc986b0..dc3be3de86c 100644 --- a/src/client/common/application/applicationShell.ts +++ b/src/client/common/application/applicationShell.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. 'use strict'; -// tslint:disable:no-var-requires no-any unified-signatures +/* eslint-disable @typescript-eslint/no-var-requires, @typescript-eslint/no-explicit-any, @typescript-eslint/unified-signatures */ import { injectable } from 'inversify'; import { diff --git a/src/client/common/application/commandManager.ts b/src/client/common/application/commandManager.ts index cfbbe4dbb0b..5d181a3ee0c 100644 --- a/src/client/common/application/commandManager.ts +++ b/src/client/common/application/commandManager.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ import { injectable } from 'inversify'; import { commands, Disposable, TextEditor, TextEditorEdit } from 'vscode'; diff --git a/src/client/common/application/customEditorService.ts b/src/client/common/application/customEditorService.ts index c2ef9503b7f..0116a202432 100644 --- a/src/client/common/application/customEditorService.ts +++ b/src/client/common/application/customEditorService.ts @@ -30,10 +30,10 @@ export class CustomEditorService implements ICustomEditorService { } ): vscode.Disposable { if (this.useCustomEditorApi) { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any return (vscode.window as any).registerCustomEditorProvider(viewType, provider, options); } else { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any return (vscode.window as any).registerCustomEditorProvider(viewType, new InvalidCustomEditor(), options); } } @@ -44,7 +44,7 @@ export class CustomEditorService implements ICustomEditorService { } } - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any private async enableCustomEditors() { // This code is temporary. const settings = this.workspace.getConfiguration('workbench', undefined); diff --git a/src/client/common/application/debugService.ts b/src/client/common/application/debugService.ts index e2c7b0158a9..2a0ce258915 100644 --- a/src/client/common/application/debugService.ts +++ b/src/client/common/application/debugService.ts @@ -45,11 +45,11 @@ export class DebugService implements IDebugService { public get onDidChangeBreakpoints(): Event { return debug.onDidChangeBreakpoints; } - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public registerDebugConfigurationProvider(debugType: string, provider: any): Disposable { return debug.registerDebugConfigurationProvider(debugType, provider); } - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public registerDebugAdapterTrackerFactory(debugType: string, provider: any): Disposable { return debug.registerDebugAdapterTrackerFactory(debugType, provider); } diff --git a/src/client/common/application/documentManager.ts b/src/client/common/application/documentManager.ts index d3fe7dd2140..d00c838bcd9 100644 --- a/src/client/common/application/documentManager.ts +++ b/src/client/common/application/documentManager.ts @@ -21,7 +21,7 @@ import { import { IDocumentManager } from './types'; -// tslint:disable:no-any unified-signatures +/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/unified-signatures */ @injectable() export class DocumentManager implements IDocumentManager { diff --git a/src/client/common/application/encryptedStorage.ts b/src/client/common/application/encryptedStorage.ts index 8797cd82e09..f3bce5b2534 100644 --- a/src/client/common/application/encryptedStorage.ts +++ b/src/client/common/application/encryptedStorage.ts @@ -63,7 +63,7 @@ export class EncryptedStorage implements IEncryptedStorage { const val = await keytar?.getPassword(service, key); return val ? val : undefined; } else { - // tslint:disable-next-line: no-unnecessary-local-variable + // eslint-disable-next-line const val = await this.authenService.getPassword(`${service}.${key}`); return val; } diff --git a/src/client/common/application/extensions.ts b/src/client/common/application/extensions.ts index 828f2ddcf80..0077498ddeb 100644 --- a/src/client/common/application/extensions.ts +++ b/src/client/common/application/extensions.ts @@ -9,7 +9,7 @@ import { IExtensions } from '../types'; @injectable() export class Extensions implements IExtensions { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public get all(): readonly Extension[] { return extensions.all; } @@ -18,7 +18,7 @@ export class Extensions implements IExtensions { return extensions.onDidChange; } - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public getExtension(extensionId: any) { return extensions.getExtension(extensionId); } diff --git a/src/client/common/application/notebook.ts b/src/client/common/application/notebook.ts index 6aba515e58f..1cc8b709c59 100644 --- a/src/client/common/application/notebook.ts +++ b/src/client/common/application/notebook.ts @@ -75,14 +75,14 @@ export class VSCodeNotebook implements IVSCodeNotebook { } private get notebook() { if (!this._notebook) { - // tslint:disable-next-line: no-require-imports + // eslint-disable-next-line @typescript-eslint/no-require-imports this._notebook = require('vscode').notebook; } return this._notebook!; } private get window() { if (!this._window) { - // tslint:disable-next-line: no-require-imports + // eslint-disable-next-line @typescript-eslint/no-require-imports this._window = require('vscode').window; } return this._window!; diff --git a/src/client/common/application/types.ts b/src/client/common/application/types.ts index 8c839c2e58c..73763926236 100644 --- a/src/client/common/application/types.ts +++ b/src/client/common/application/types.ts @@ -81,7 +81,7 @@ import type { import { IAsyncDisposable, Resource } from '../types'; import { ICommandNameArgumentTypeMapping } from './commands'; -// tslint:disable:no-any unified-signatures +/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/unified-signatures */ export const IApplicationShell = Symbol('IApplicationShell'); export interface IApplicationShell { @@ -1104,7 +1104,7 @@ export interface IWebviewOptions { * E.g. required for webview to serve images from worksapces when nb is in a nested folder. */ additionalPaths?: string[]; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any settings?: any; // Instead of creating a webview we may be passed on already created by VS Code webviewHost?: vscodeWebviewView | vscodeWebviewPanel; @@ -1216,7 +1216,7 @@ export interface IActiveResourceService { // Temporary hack to get the nyc compiler to find these types. vscode.proposed.d.ts doesn't work for some reason. -// tslint:disable: interface-name +/* eslint-disable @typescript-eslint/naming-convention */ //#region Custom editor https://github.com/microsoft/vscode/issues/77131 /** diff --git a/src/client/common/application/webviewPanels/webviewPanelProvider.ts b/src/client/common/application/webviewPanels/webviewPanelProvider.ts index 514c0dfd6d2..2ed3e4a3e75 100644 --- a/src/client/common/application/webviewPanels/webviewPanelProvider.ts +++ b/src/client/common/application/webviewPanels/webviewPanelProvider.ts @@ -17,7 +17,7 @@ export class WebviewPanelProvider implements IWebviewPanelProvider { @inject(IExtensionContext) private readonly context: IExtensionContext ) {} - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public async create(options: IWebviewPanelOptions): Promise { // Allow loading resources from the `/tmp` folder when in webiviews. // Used by widgets to place files that are not otherwise accessible. diff --git a/src/client/common/application/webviewViews/webviewViewProvider.ts b/src/client/common/application/webviewViews/webviewViewProvider.ts index 6f172733fae..00f4693e619 100644 --- a/src/client/common/application/webviewViews/webviewViewProvider.ts +++ b/src/client/common/application/webviewViews/webviewViewProvider.ts @@ -14,7 +14,7 @@ export class WebviewViewProvider implements IWebviewViewProvider { @inject(IFileSystem) private readonly fs: IFileSystem ) {} - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public async create(options: IWebviewViewOptions): Promise { return new WebviewView(this.fs, this.disposableRegistry, options); } diff --git a/src/client/common/application/webviews/webview.ts b/src/client/common/application/webviews/webview.ts index 7ee9577ef76..82f383b5eb0 100644 --- a/src/client/common/application/webviews/webview.ts +++ b/src/client/common/application/webviews/webview.ts @@ -58,7 +58,7 @@ export abstract class Webview implements IWebview { public postMessage(message: WebviewMessage) { if (this.webviewHost?.webview) { - this.webviewHost?.webview.postMessage(message); + void this.webviewHost?.webview.postMessage(message); } } @@ -68,7 +68,7 @@ export abstract class Webview implements IWebview { // After load is finished allow derived classes to hook up class specific code protected abstract postLoad(webviewHost: vscodeWebviewView | vscodeWebviewPanel): void; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any protected async generateLocalReactHtml() { if (!this.webviewHost?.webview) { throw new Error('WebView not initialized, too early to get a Uri'); diff --git a/src/client/common/configSettings.ts b/src/client/common/configSettings.ts index baf8ce18698..07e939c2f93 100644 --- a/src/client/common/configSettings.ts +++ b/src/client/common/configSettings.ts @@ -28,9 +28,9 @@ import { import { debounceSync } from './utils/decorators'; import { SystemVariables } from './variables/systemVariables'; -// tslint:disable:no-require-imports no-var-requires +/* eslint-disable @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires */ -// tslint:disable-next-line:completed-docs +// eslint-disable-next-line export class JupyterSettings implements IWatchableJupyterSettings { public get onDidChange(): Event { return this._changeEmitter.event; @@ -106,7 +106,7 @@ export class JupyterSettings implements IWatchableJupyterSettings { this._workspaceRoot = workspaceFolder; this.initialize(); } - // tslint:disable-next-line:function-name + // eslint-disable-next-line public static getInstance(resource: Uri | undefined, workspace?: IWorkspaceService): JupyterSettings { workspace = workspace || new WorkspaceService(); const workspaceFolderUri = JupyterSettings.getSettingsUriAndTarget(resource, workspace).uri; @@ -116,11 +116,11 @@ export class JupyterSettings implements IWatchableJupyterSettings { const settings = new JupyterSettings(workspaceFolderUri, workspace); JupyterSettings.jupyterSettings.set(workspaceFolderKey, settings); } - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion return JupyterSettings.jupyterSettings.get(workspaceFolderKey)!; } - // tslint:disable-next-line:type-literal-delimiter + // eslint-disable-next-line @typescript-eslint/member-delimiter-style public static getSettingsUriAndTarget( resource: Uri | undefined, workspace?: IWorkspaceService @@ -137,17 +137,17 @@ export class JupyterSettings implements IWatchableJupyterSettings { return { uri: workspaceFolderUri, target }; } - // tslint:disable-next-line:function-name + // eslint-disable-next-line public static dispose() { if (!isTestExecution()) { throw new Error('Dispose can only be called from unit tests'); } - // tslint:disable-next-line:no-void-expression + // eslint-disable-next-line no-void JupyterSettings.jupyterSettings.forEach((item) => item && item.dispose()); JupyterSettings.jupyterSettings.clear(); } public dispose() { - // tslint:disable-next-line:no-unsafe-any + // eslint-disable-next-line this._disposables.forEach((disposable) => disposable && disposable.dispose()); this._disposables = []; } @@ -155,19 +155,19 @@ export class JupyterSettings implements IWatchableJupyterSettings { public toJSON() { // Override this so settings can be turned into JSON without a circular problem - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const result: any = {}; const allowedKeys = this.getSerializableKeys(); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any allowedKeys.forEach((k) => (result[k] = (this)[k])); return result; } - // tslint:disable-next-line:cyclomatic-complexity max-func-body-length + // eslint-disable-next-line complexity, protected update(jupyterConfig: WorkspaceConfiguration) { const workspaceRoot = this._workspaceRoot?.fsPath; const systemVariables: SystemVariables = new SystemVariables(undefined, workspaceRoot, this._workspace); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const loggingSettings = systemVariables.resolveAny(jupyterConfig.get('logging'))!; if (loggingSettings) { loggingSettings.level = convertSettingTypeToLogLevel(loggingSettings.level); @@ -197,7 +197,7 @@ export class JupyterSettings implements IWatchableJupyterSettings { keys.forEach((k) => { // Replace variables with their actual value. const val = systemVariables.resolveAny(jupyterConfig.get(k)); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (this)[k] = val; }); } diff --git a/src/client/common/crypto.ts b/src/client/common/crypto.ts index 3067ebb4a80..cbe234a9fe3 100644 --- a/src/client/common/crypto.ts +++ b/src/client/common/crypto.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. 'use strict'; -// tslint:disable: no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ import { createHash } from 'crypto'; import { injectable } from 'inversify'; @@ -21,7 +21,7 @@ export class CryptoUtils implements ICryptoUtils { ): IHashFormat[E] { let hash: string; if (algorithm === 'FNV') { - // tslint:disable-next-line:no-require-imports + // eslint-disable-next-line @typescript-eslint/no-require-imports const fnv = require('@enonic/fnv-plus'); hash = fnv.fast1a32hex(data) as string; } else if (algorithm === 'SHA256') { diff --git a/src/client/common/editor.ts b/src/client/common/editor.ts index 963559139bb..6d02679e2b0 100644 --- a/src/client/common/editor.ts +++ b/src/client/common/editor.ts @@ -57,11 +57,11 @@ function getTextEditsInternal(before: string, diffs: [number, string][], startLi let edit: Edit | null = null; let end: Position; - // tslint:disable-next-line:prefer-for-of + // eslint-disable-next-line @typescript-eslint/prefer-for-of for (let i = 0; i < diffs.length; i += 1) { let start = new Position(line, character); // Compute the line/character after the diff is applied. - // tslint:disable-next-line:prefer-for-of + // eslint-disable-next-line @typescript-eslint/prefer-for-of for (let curr = 0; curr < diffs[i][1].length; curr += 1) { if (diffs[i][1][curr] !== '\n') { character += 1; @@ -71,9 +71,9 @@ function getTextEditsInternal(before: string, diffs: [number, string][], startLi } } - // tslint:disable-next-line:no-require-imports + // eslint-disable-next-line @typescript-eslint/no-require-imports const dmp = require('diff-match-patch') as typeof import('diff-match-patch'); - // tslint:disable-next-line:switch-default + // eslint-disable-next-line default-case switch (diffs[i][0]) { case dmp.DIFF_DELETE: if ( @@ -148,7 +148,7 @@ function patch_fromText(textline: string): Patch[] { if (!m) { throw new Error(`Invalid patch string: ${text[textPointer]}`); } - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const patch = new (diff_match_patch).patch_obj(); patches.push(patch); patch.start1 = parseInt(m[1], 10); @@ -173,7 +173,7 @@ function patch_fromText(textline: string): Patch[] { patch.length2 = parseInt(m[4], 10); } textPointer += 1; - // tslint:disable-next-line:no-require-imports + // eslint-disable-next-line @typescript-eslint/no-require-imports const dmp = require('diff-match-patch') as typeof import('diff-match-patch'); while (textPointer < text.length) { @@ -228,7 +228,7 @@ export class EditorUtils implements IEditorUtils { // # Work around missing newline (http://bugs.python.org/issue2142). patch = patch.replace(/\\ No newline at end of file[\r\n]/, ''); - // tslint:disable-next-line:no-require-imports + // eslint-disable-next-line @typescript-eslint/no-require-imports const dmp = require('diff-match-patch') as typeof import('diff-match-patch'); const d = new dmp.diff_match_patch(); const patches = patch_fromText.call(d, patch); diff --git a/src/client/common/errors/errorUtils.ts b/src/client/common/errors/errorUtils.ts index 9364d3a971d..5a2fdb47e13 100644 --- a/src/client/common/errors/errorUtils.ts +++ b/src/client/common/errors/errorUtils.ts @@ -3,7 +3,7 @@ import { EOL } from 'os'; -// tslint:disable-next-line:no-stateless-class no-unnecessary-class +// eslint-disable-next-line @typescript-eslint/no-extraneous-class export class ErrorUtils { public static outputHasModuleNotInstalledError(moduleName: string, content?: string): boolean { return content && diff --git a/src/client/common/experiments/telemetry.ts b/src/client/common/experiments/telemetry.ts index 8e0ace9f7a4..b596cd4f2ed 100644 --- a/src/client/common/experiments/telemetry.ts +++ b/src/client/common/experiments/telemetry.ts @@ -10,7 +10,7 @@ export class ExperimentationTelemetry implements IExperimentationTelemetry { public setSharedProperty(name: string, value: string): void { // Add the shared property to all telemetry being sent, not just events being sent by the experimentation package. // We are not in control of these props, just cast to `any`, i.e. we cannot strongly type these external props. - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any setSharedProperty(name as any, value as any); } @@ -20,7 +20,7 @@ export class ExperimentationTelemetry implements IExperimentationTelemetry { formattedProperties[key] = value; }); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any sendTelemetryEvent(eventName as any, undefined, formattedProperties); } } diff --git a/src/client/common/extensions.ts b/src/client/common/extensions.ts index a41675749ab..eb197da3f33 100644 --- a/src/client/common/extensions.ts +++ b/src/client/common/extensions.ts @@ -8,7 +8,7 @@ */ // https://stackoverflow.com/questions/39877156/how-to-extend-string-prototype-and-use-it-next-in-typescript -// tslint:disable-next-line:interface-name +// eslint-disable-next-line @typescript-eslint/naming-convention declare interface String { /** * Split a string using the cr and lf characters and return them as an array. @@ -92,7 +92,7 @@ String.prototype.trimQuotes = function (this: string): string { return this.replace(/(^['"])|(['"]$)/g, ''); }; -// tslint:disable-next-line:interface-name +// eslint-disable-next-line @typescript-eslint/naming-convention declare interface Promise { /** * Catches task error and ignores them. @@ -104,7 +104,7 @@ declare interface Promise { * Explicitly tells that promise should be run asynchonously. */ Promise.prototype.ignoreErrors = function (this: Promise) { - // tslint:disable-next-line:no-empty + // eslint-disable-next-line no-empty, @typescript-eslint/no-empty-function this.catch(() => {}); }; diff --git a/src/client/common/featureDeprecationManager.ts b/src/client/common/featureDeprecationManager.ts index 5b2cf0f3c41..a1556953cf5 100644 --- a/src/client/common/featureDeprecationManager.ts +++ b/src/client/common/featureDeprecationManager.ts @@ -142,7 +142,7 @@ export class FeatureDeprecationManager implements IFeatureDeprecationManager { return false; } if (Array.isArray(configValue)) { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any return (configValue as any[]).length > 0; } // If we have a value in the setting, then return. diff --git a/src/client/common/helpers.ts b/src/client/common/helpers.ts index faf67e12dba..8852d3ed7d3 100644 --- a/src/client/common/helpers.ts +++ b/src/client/common/helpers.ts @@ -7,7 +7,7 @@ import { ModuleNotInstalledError } from './errors/moduleNotInstalledError'; export function isNotInstalledError(error: Error): boolean { const isError = typeof error === 'object' && error !== null; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const errorObj = error; if (!isError) { return false; diff --git a/src/client/common/installer/productInstaller.ts b/src/client/common/installer/productInstaller.ts index 2c6a6c4e403..e3ba9a92056 100644 --- a/src/client/common/installer/productInstaller.ts +++ b/src/client/common/installer/productInstaller.ts @@ -1,4 +1,4 @@ -// tslint:disable:max-classes-per-file max-classes-per-file +/* eslint-disable max-classes-per-file */ import { inject, injectable, named } from 'inversify'; import * as os from 'os'; @@ -176,7 +176,7 @@ export class ProductInstaller implements IInstaller { this.interpreterService = this.serviceContainer.get(IInterpreterService); } - // tslint:disable-next-line:no-empty + // eslint-disable-next-line no-empty,@typescript-eslint/no-empty-function public dispose() {} public async promptToInstall( product: Product, @@ -209,7 +209,7 @@ export class ProductInstaller implements IInstaller { } } -// tslint:disable-next-line: cyclomatic-complexity +// eslint-disable-next-line complexity function translateProductToModule(product: Product): string { switch (product) { case Product.jupyter: diff --git a/src/client/common/installer/productNames.ts b/src/client/common/installer/productNames.ts index 31482f57b23..b832976fc19 100644 --- a/src/client/common/installer/productNames.ts +++ b/src/client/common/installer/productNames.ts @@ -3,7 +3,7 @@ import { Product } from '../types'; -// tslint:disable-next-line:variable-name +// eslint-disable-next-line @typescript-eslint/naming-convention, no-underscore-dangle, id-blacklist, id-match export const ProductNames = new Map(); ProductNames.set(Product.jupyter, 'jupyter'); ProductNames.set(Product.notebook, 'notebook'); diff --git a/src/client/common/installer/productPath.ts b/src/client/common/installer/productPath.ts index e4caa6867cf..abe56a921ba 100644 --- a/src/client/common/installer/productPath.ts +++ b/src/client/common/installer/productPath.ts @@ -3,7 +3,7 @@ 'use strict'; -// tslint:disable:max-classes-per-file +/* eslint-disable max-classes-per-file */ import { inject, injectable } from 'inversify'; import * as path from 'path'; @@ -28,7 +28,7 @@ export abstract class BaseProductPathsService implements IProductPathService { let moduleName: string | undefined; try { moduleName = this.productInstaller.translateProductToModuleName(product, ModuleNamePurpose.run); - // tslint:disable-next-line:no-empty + // eslint-disable-next-line no-empty,@typescript-eslint/no-empty-function } catch {} // User may have customized the module name or provided the fully qualifieid path. diff --git a/src/client/common/net/browser.ts b/src/client/common/net/browser.ts index 74c629c7d59..20ffa9771e8 100644 --- a/src/client/common/net/browser.ts +++ b/src/client/common/net/browser.ts @@ -3,7 +3,7 @@ 'use strict'; -// tslint:disable:no-var-requires +/* eslint-disable @typescript-eslint/no-var-requires */ import { injectable } from 'inversify'; import { env, Uri } from 'vscode'; diff --git a/src/client/common/net/fileDownloader.ts b/src/client/common/net/fileDownloader.ts index f41b7c2825b..f302a821194 100644 --- a/src/client/common/net/fileDownloader.ts +++ b/src/client/common/net/fileDownloader.ts @@ -64,7 +64,7 @@ export class FileDownloader implements IFileDownloader { ); } }); - // tslint:disable-next-line: no-require-imports + // eslint-disable-next-line @typescript-eslint/no-require-imports const requestProgress = require('request-progress'); requestProgress(request) .on('progress', (state: RequestProgressState) => { diff --git a/src/client/common/net/httpClient.ts b/src/client/common/net/httpClient.ts index adceb9b1e8a..da31fc78683 100644 --- a/src/client/common/net/httpClient.ts +++ b/src/client/common/net/httpClient.ts @@ -20,7 +20,7 @@ export class HttpClient implements IHttpClient { } public async downloadFile(uri: string): Promise { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const request = ((await import('request')) as any) as typeof requestTypes; return request(uri, this.requestOptions); } @@ -34,7 +34,7 @@ export class HttpClient implements IHttpClient { if (strict) { return JSON.parse(body); } else { - // tslint:disable-next-line: prefer-const + // eslint-disable-next-line prefer-const let errors: ParseError[] = []; const content = parse(body, errors, { allowTrailingComma: true, disallowComments: false }) as T; if (errors.length > 0) { @@ -45,7 +45,7 @@ export class HttpClient implements IHttpClient { } public async exists(uri: string): Promise { - // tslint:disable-next-line:no-require-imports + // eslint-disable-next-line @typescript-eslint/no-require-imports const request = require('request') as typeof requestTypes; return new Promise((resolve) => { try { @@ -59,7 +59,7 @@ export class HttpClient implements IHttpClient { }); } private async getContents(uri: string): Promise { - // tslint:disable-next-line:no-require-imports + // eslint-disable-next-line @typescript-eslint/no-require-imports const request = require('request') as typeof requestTypes; return new Promise((resolve, reject) => { request(uri, this.requestOptions, (ex, response, body) => { diff --git a/src/client/common/net/socket/SocketStream.ts b/src/client/common/net/socket/SocketStream.ts index 0576d3026fb..98f0d8c2ce8 100644 --- a/src/client/common/net/socket/SocketStream.ts +++ b/src/client/common/net/socket/SocketStream.ts @@ -1,7 +1,7 @@ 'use strict'; import * as net from 'net'; -// tslint:disable:no-var-requires no-require-imports member-ordering no-any +/* eslint-disable @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports, @typescript-eslint/member-ordering, @typescript-eslint/no-explicit-any */ const uint64be = require('uint64be'); enum DataType { diff --git a/src/client/common/net/socket/socketCallbackHandler.ts b/src/client/common/net/socket/socketCallbackHandler.ts index 55bf49e7b27..485c93091e0 100644 --- a/src/client/common/net/socket/socketCallbackHandler.ts +++ b/src/client/common/net/socket/socketCallbackHandler.ts @@ -1,4 +1,4 @@ -// tslint:disable:quotemark ordered-imports member-ordering one-line prefer-const +/* eslint-disable @typescript-eslint/quotes, import/order, @typescript-eslint/member-ordering, brace-style, prefer-const */ 'use strict'; diff --git a/src/client/common/net/socket/socketServer.ts b/src/client/common/net/socket/socketServer.ts index ed0b37367f4..70bccde3124 100644 --- a/src/client/common/net/socket/socketServer.ts +++ b/src/client/common/net/socket/socketServer.ts @@ -25,7 +25,7 @@ export class SocketServer extends EventEmitter implements ISocketServer { } try { this.socketServer.close(); - // tslint:disable-next-line:no-empty + // eslint-disable-next-line no-empty,@typescript-eslint/no-empty-function } catch (ex) {} this.socketServer = undefined; } diff --git a/src/client/common/platform/constants.ts b/src/client/common/platform/constants.ts index 2c4a65f8025..6e62664b39b 100644 --- a/src/client/common/platform/constants.ts +++ b/src/client/common/platform/constants.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// tslint:disable-next-line:no-suspicious-comment +// eslint-disable-next-line // TODO : Drop all these in favor of IPlatformService. // See https://github.com/microsoft/vscode-python/issues/8542. diff --git a/src/client/common/platform/fileSystem.ts b/src/client/common/platform/fileSystem.ts index bbecf9ccd73..bee62740dbb 100644 --- a/src/client/common/platform/fileSystem.ts +++ b/src/client/common/platform/fileSystem.ts @@ -123,7 +123,7 @@ export class FileSystem implements IFileSystem { } public async searchLocal(globPattern: string, cwd?: string, dot?: boolean): Promise { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any let options: any; if (cwd) { options = { ...options, cwd }; @@ -183,7 +183,7 @@ export class FileSystem implements IFileSystem { } private async lstat(filename: string): Promise { - // tslint:disable-next-line: no-suspicious-comment + // eslint-disable-next-line // TODO https://github.com/microsoft/vscode/issues/71204 (84514)): // This functionality has been requested for the VS Code API. const stat = await fs.lstat(filename); diff --git a/src/client/common/platform/fileSystemUtils.ts b/src/client/common/platform/fileSystemUtils.ts index e71ade4f09d..79d557f3d65 100644 --- a/src/client/common/platform/fileSystemUtils.ts +++ b/src/client/common/platform/fileSystemUtils.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. 'use strict'; -// tslint:disable:no-suspicious-comment +/* eslint-disable */ import { createHash } from 'crypto'; import * as fs from 'fs-extra'; @@ -450,7 +450,7 @@ export class FileSystemUtils { } public async search(globPattern: string, cwd?: string, dot?: boolean): Promise { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any let options: any; if (cwd) { options = { ...options, cwd }; diff --git a/src/client/common/platform/fs-paths.ts b/src/client/common/platform/fs-paths.ts index c2d953dcca8..be2793b266f 100644 --- a/src/client/common/platform/fs-paths.ts +++ b/src/client/common/platform/fs-paths.ts @@ -4,7 +4,7 @@ import * as nodepath from 'path'; import { getOSType, OSType } from '../utils/platform'; import { IExecutables, IFileSystemPaths, IFileSystemPathUtils } from './types'; -// tslint:disable-next-line:no-var-requires no-require-imports +// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports const untildify = require('untildify'); // The parts of node's 'path' module used by FileSystemPaths. diff --git a/src/client/common/platform/fs-temp.ts b/src/client/common/platform/fs-temp.ts index 64d2870a47e..17e407ae887 100644 --- a/src/client/common/platform/fs-temp.ts +++ b/src/client/common/platform/fs-temp.ts @@ -5,13 +5,13 @@ import * as tmp from 'tmp'; import { ITempFileSystem, TemporaryFile } from './types'; interface IRawTempFS { - // tslint:disable-next-line:no-suspicious-comment + // eslint-disable-next-line // TODO (https://github.com/microsoft/vscode/issues/84517) // This functionality has been requested for the // VS Code FS API (vscode.workspace.fs.*). file( config: tmp.Options, - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any callback?: (err: any, path: string, fd: number, cleanupCallback: () => void) => void ): void; } diff --git a/src/client/common/platform/pathUtils.ts b/src/client/common/platform/pathUtils.ts index 4cf1d59db59..ddee8def3f6 100644 --- a/src/client/common/platform/pathUtils.ts +++ b/src/client/common/platform/pathUtils.ts @@ -1,4 +1,4 @@ -// tslint:disable-next-line:no-suspicious-comment +// eslint-disable-next-line // TODO: Drop this file. // See https://github.com/microsoft/vscode-python/issues/8542. @@ -7,7 +7,7 @@ import * as path from 'path'; import { IPathUtils, IsWindows } from '../types'; import { OSType } from '../utils/platform'; import { Executables, FileSystemPaths, FileSystemPathUtils } from './fs-paths'; -// tslint:disable-next-line:no-var-requires no-require-imports +// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports const untildify = require('untildify'); @injectable() @@ -40,10 +40,10 @@ export class PathUtils implements IPathUtils { return this.utils.paths.sep; } - // tslint:disable-next-line:no-suspicious-comment + // eslint-disable-next-line // TODO: Deprecate in favor of IPlatformService? public getPathVariableName(): 'Path' | 'PATH' { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any return this.utils.executables.envVar as any; } diff --git a/src/client/common/platform/platformService.ts b/src/client/common/platform/platformService.ts index 81706960e6a..268bb33502c 100644 --- a/src/client/common/platform/platformService.ts +++ b/src/client/common/platform/platformService.ts @@ -72,7 +72,7 @@ export class PlatformService implements IPlatformService { return os.release(); } public get is64bit(): boolean { - // tslint:disable-next-line:no-require-imports + // eslint-disable-next-line @typescript-eslint/no-require-imports const arch = require('arch'); return arch() === 'x64'; } diff --git a/src/client/common/process/baseDaemon.ts b/src/client/common/process/baseDaemon.ts index f83da1e9d8c..ecff691bed9 100644 --- a/src/client/common/process/baseDaemon.ts +++ b/src/client/common/process/baseDaemon.ts @@ -44,7 +44,7 @@ export abstract class BasePythonDaemon { protected get closed() { return this.connectionClosedDeferred.promise; } - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any private readonly connectionClosedDeferred: Deferred; private disposables: IDisposable[] = []; private disposed = false; @@ -55,7 +55,7 @@ export abstract class BasePythonDaemon { public readonly proc: ChildProcess, public readonly connection: MessageConnection ) { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any this.connectionClosedDeferred = createDeferred(); // This promise gets used conditionally, if it doesn't get used, and the promise is rejected, // then node logs errors. We don't want that, hence add a dummy error handler. @@ -174,7 +174,7 @@ export abstract class BasePythonDaemon { 'mergeStdOutErr', 'extraVariables' ]; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any return Object.keys(options).every((item) => daemonSupportedSpawnOptions.indexOf(item as any) >= 0); } protected sendRequestWithoutArgs(type: RequestType0): Thenable { @@ -208,7 +208,7 @@ export abstract class BasePythonDaemon { let response: ExecResponse; if ('fileName' in moduleOrFile) { const request = new RequestType< - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any { file_name: string; args: string[]; cwd?: string; env?: any }, ExecResponse, void, @@ -222,7 +222,7 @@ export abstract class BasePythonDaemon { }); } else { const request = new RequestType< - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any { module_name: string; args: string[]; cwd?: string; env?: any }, ExecResponse, void, @@ -306,7 +306,7 @@ export abstract class BasePythonDaemon { options: SpawnOptions ): Promise> { const request = new RequestType< - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any { file_name: string; args: string[]; cwd?: string; env?: any }, ExecResponse, void, @@ -327,7 +327,7 @@ export abstract class BasePythonDaemon { options: SpawnOptions ): Promise> { const request = new RequestType< - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any { module_name: string; args: string[]; cwd?: string; env?: any }, ExecResponse, void, @@ -343,7 +343,7 @@ export abstract class BasePythonDaemon { return response; } private monitorConnection() { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const logConnectionStatus = (msg: string, ex?: any) => { if (!this.disposed) { this.connectionClosedMessage += msg + (ex ? `, With Error: ${util.format(ex)}` : ''); diff --git a/src/client/common/process/internal/scripts/index.ts b/src/client/common/process/internal/scripts/index.ts index 00b981388ca..226e0417827 100644 --- a/src/client/common/process/internal/scripts/index.ts +++ b/src/client/common/process/internal/scripts/index.ts @@ -72,7 +72,7 @@ namespace _completion { id: number; }; type _Response1 = { - // tslint:disable-next-line:no-any no-banned-terms + // eslint-disable-next-line @typescript-eslint/no-explicit-any, no-caller, no-eval arguments: any[]; }; type _Response2 = @@ -197,11 +197,11 @@ export function refactor(root: string): [string[], (out: string) => object[]] { const script = path.join(SCRIPTS_DIR, 'refactor.py'); const args = [ISOLATED, script, root]; - // tslint:disable-next-line:no-suspicious-comment + // eslint-disable-next-line // TODO: Make the return type more specific, like we did // with completion(). function parse(out: string): object[] { - // tslint:disable-next-line:no-suspicious-comment + // eslint-disable-next-line // TODO: Also handle "STARTED"? return out .split(/\r?\n/g) diff --git a/src/client/common/process/proc.ts b/src/client/common/process/proc.ts index 0c8f6f2f272..ed1624f07dd 100644 --- a/src/client/common/process/proc.ts +++ b/src/client/common/process/proc.ts @@ -20,7 +20,7 @@ import { StdErrError } from './types'; -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ export class ProcessService extends EventEmitter implements IProcessService { private processesToKill = new Set(); constructor(private readonly decoder: IBufferDecoder, private readonly env?: EnvironmentVariables) { @@ -63,7 +63,7 @@ export class ProcessService extends EventEmitter implements IProcessService { const proc = spawn(file, args, spawnOptions); let procExited = false; const disposable: IDisposable = { - // tslint:disable-next-line: no-function-expression + // eslint-disable-next-line dispose: function () { if (proc && !proc.killed && !procExited) { ProcessService.kill(proc.pid); diff --git a/src/client/common/process/pythonDaemonPool.ts b/src/client/common/process/pythonDaemonPool.ts index e82d52f4828..3f967d04624 100644 --- a/src/client/common/process/pythonDaemonPool.ts +++ b/src/client/common/process/pythonDaemonPool.ts @@ -46,13 +46,13 @@ export class PythonDaemonExecutionServicePool extends PythonDaemonFactory implem } const promises = Promise.all( [ - // tslint:disable-next-line: prefer-array-literal + // eslint-disable-next-line ...new Array(this.options.daemonCount ?? 2).keys() ].map(() => this.addDaemonService('StandardDaemon')) ); const promises2 = Promise.all( [ - // tslint:disable-next-line: prefer-array-literal + // eslint-disable-next-line ...new Array(this.options.observableDaemonCount ?? 1).keys() ].map(() => this.addDaemonService('ObservableDaemon')) ); diff --git a/src/client/common/process/pythonEnvironment.ts b/src/client/common/process/pythonEnvironment.ts index e5bc2685051..d2eeedfe11c 100644 --- a/src/client/common/process/pythonEnvironment.ts +++ b/src/client/common/process/pythonEnvironment.ts @@ -129,7 +129,7 @@ export function createCondaEnv( const deps = createDeps( async (filename) => fs.localFileExists(filename), pythonArgv, - // tslint:disable-next-line:no-suspicious-comment + // eslint-disable-next-line // TODO: Use pythonArgv here once 'conda run' can be // run without buffering output. // See https://github.com/microsoft/vscode-python/issues/8473. diff --git a/src/client/common/process/types.ts b/src/client/common/process/types.ts index d19fe67dcea..4c8d917e699 100644 --- a/src/client/common/process/types.ts +++ b/src/client/common/process/types.ts @@ -26,7 +26,7 @@ export type ObservableExecutionResult = { dispose(): void; }; -// tslint:disable-next-line:interface-name +// eslint-disable-next-line @typescript-eslint/naming-convention export type SpawnOptions = ChildProcessSpawnOptions & { encoding?: string; token?: CancellationToken; @@ -35,7 +35,7 @@ export type SpawnOptions = ChildProcessSpawnOptions & { extraVariables?: NodeJS.ProcessEnv; }; -// tslint:disable-next-line:interface-name +// eslint-disable-next-line @typescript-eslint/naming-convention export type ShellOptions = ExecOptions & { throwOnStdErr?: boolean }; export type ExecutionResult = { diff --git a/src/client/common/serviceRegistry.ts b/src/client/common/serviceRegistry.ts index 3f742cdb7a0..80558ca11ca 100644 --- a/src/client/common/serviceRegistry.ts +++ b/src/client/common/serviceRegistry.ts @@ -74,7 +74,7 @@ import { } from './types'; import { IMultiStepInputFactory, MultiStepInputFactory } from './utils/multiStepInput'; -// tslint:disable-next-line: max-func-body-length +// eslint-disable-next-line export function registerTypes(serviceManager: IServiceManager) { serviceManager.addSingletonInstance(IsWindows, IS_WINDOWS); diff --git a/src/client/common/types.ts b/src/client/common/types.ts index 65c2b41740a..6f47ae31ecb 100644 --- a/src/client/common/types.ts +++ b/src/client/common/types.ts @@ -82,7 +82,7 @@ export interface IInstaller { translateProductToModuleName(product: Product, purpose: ModuleNamePurpose): string; } -// tslint:disable-next-line:no-suspicious-comment +// eslint-disable-next-line // TODO: Drop IPathUtils in favor of IFileSystemPathUtils. // See https://github.com/microsoft/vscode-python/issues/8542. export const IPathUtils = Symbol('IPathUtils'); @@ -284,7 +284,7 @@ export interface IExtensions { /** * All extensions currently known to the system. */ - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any readonly all: readonly Extension[]; /** @@ -299,7 +299,7 @@ export interface IExtensions { * @param extensionId An extension identifier. * @return An extension or `undefined`. */ - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any getExtension(extensionId: string): Extension | undefined; /** diff --git a/src/client/common/utils/async.ts b/src/client/common/utils/async.ts index 00566150b2c..18752975391 100644 --- a/src/client/common/utils/async.ts +++ b/src/client/common/utils/async.ts @@ -27,12 +27,12 @@ export async function waitForPromise(promise: Promise, timeout: number): P }); } -// tslint:disable-next-line: no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any export function isThenable(v: any): v is Thenable { return typeof v?.then === 'function'; } -// tslint:disable-next-line: no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any export function isPromise(v: any): v is Promise { return typeof v?.then === 'function' && typeof v?.catch === 'function'; } @@ -40,40 +40,40 @@ export function isPromise(v: any): v is Promise { //====================== // Deferred -// tslint:disable-next-line:interface-name +// eslint-disable-next-line @typescript-eslint/naming-convention export interface Deferred { readonly promise: Promise; readonly resolved: boolean; readonly rejected: boolean; readonly completed: boolean; resolve(value?: T | PromiseLike): void; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any reject(reason?: any): void; } class DeferredImpl implements Deferred { private _resolve!: (value?: T | PromiseLike) => void; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any private _reject!: (reason?: any) => void; private _resolved: boolean = false; private _rejected: boolean = false; private _promise: Promise; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any constructor(private scope: any = null) { - // tslint:disable-next-line:promise-must-complete + // eslint-disable-next-line this._promise = new Promise((res, rej) => { this._resolve = res; this._reject = rej; }); } public resolve(_value?: T | PromiseLike) { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any this._resolve.apply(this.scope ? this.scope : this, arguments as any); this._resolved = true; } - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public reject(_reason?: any) { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any this._reject.apply(this.scope ? this.scope : this, arguments as any); this._rejected = true; } @@ -90,7 +90,7 @@ class DeferredImpl implements Deferred { return this._rejected || this._resolved; } } -// tslint:disable-next-line:no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any export function createDeferred(scope: any = null): Deferred { return new DeferredImpl(scope); } @@ -98,9 +98,9 @@ export function createDeferred(scope: any = null): Deferred { export function createDeferredFrom(...promises: Promise[]): Deferred { const deferred = createDeferred(); Promise.all(promises) - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any .then(deferred.resolve.bind(deferred) as any) - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any .catch(deferred.reject.bind(deferred) as any); return deferred; @@ -118,7 +118,7 @@ export function createDeferredFromPromise(promise: Promise): Deferred { * An iterator that yields nothing. */ export function iterEmpty(): AsyncIterator { - // tslint:disable-next-line:no-empty + // eslint-disable-next-line no-empty,@typescript-eslint/no-empty-function return ((async function* () {})() as unknown) as AsyncIterator; } @@ -136,7 +136,7 @@ async function getNext(it: AsyncIterator, indexMaybe?: number): } } -// tslint:disable-next-line:promise-must-complete no-empty +// eslint-disable-next-line no-empty,@typescript-eslint/no-empty-function export const NEVER: Promise = new Promise(() => {}); /** diff --git a/src/client/common/utils/cacheUtils.ts b/src/client/common/utils/cacheUtils.ts index 472e7b40f14..03dc7a00e3c 100644 --- a/src/client/common/utils/cacheUtils.ts +++ b/src/client/common/utils/cacheUtils.ts @@ -3,7 +3,7 @@ 'use strict'; -// tslint:disable:no-any no-require-imports +/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-require-imports */ import '../../common/extensions'; diff --git a/src/client/common/utils/decorators.ts b/src/client/common/utils/decorators.ts index a422bdbd751..403fcd8a912 100644 --- a/src/client/common/utils/decorators.ts +++ b/src/client/common/utils/decorators.ts @@ -1,4 +1,4 @@ -// tslint:disable:no-any no-require-imports no-function-expression no-invalid-this +/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-require-imports, , no-invalid-this */ import { ProgressLocation, ProgressOptions, window } from 'vscode'; import '../../common/extensions'; @@ -8,7 +8,7 @@ import { createDeferred, Deferred } from './async'; import { DataWithExpiry, getCacheKeyFromFunctionArgs, getGlobalCacheStore } from './cacheUtils'; import { TraceInfo, tracing } from './misc'; -// tslint:disable-next-line:no-require-imports no-var-requires +// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires const _debounce = require('lodash/debounce') as typeof import('lodash/debounce'); type VoidFunction = () => any; @@ -55,7 +55,7 @@ export function debounceAsync(wait?: number) { } export function makeDebounceDecorator(wait?: number) { - // tslint:disable-next-line:no-any no-function-expression + // eslint-disable-next-line @typescript-eslint/no-explicit-any, return function (_target: any, _propertyName: string, descriptor: TypedPropertyDescriptor) { // We could also make use of _debounce() options. For instance, // the following causes the original method to be called @@ -82,7 +82,7 @@ export function makeDebounceDecorator(wait?: number) { } export function makeDebounceAsyncDecorator(wait?: number) { - // tslint:disable-next-line:no-any no-function-expression + // eslint-disable-next-line @typescript-eslint/no-explicit-any, return function (_target: any, _propertyName: string, descriptor: TypedPropertyDescriptor) { type StateInformation = { started: boolean; @@ -163,14 +163,14 @@ export function cache(expiryDurationMs: number) { * @returns void */ export function swallowExceptions(scopeName?: string) { - // tslint:disable-next-line:no-any no-function-expression + // eslint-disable-next-line @typescript-eslint/no-explicit-any, return function (_target: any, propertyName: string, descriptor: TypedPropertyDescriptor) { const originalMethod = descriptor.value!; const errorMessage = `Jupyter Extension (Error in ${scopeName || propertyName}, method:${propertyName}):`; - // tslint:disable-next-line:no-any no-function-expression + // eslint-disable-next-line @typescript-eslint/no-explicit-any, descriptor.value = function (...args: any[]) { try { - // tslint:disable-next-line:no-invalid-this no-use-before-declare no-unsafe-any + // eslint-disable-next-line no-invalid-this, @typescript-eslint/no-use-before-define, const result = originalMethod.apply(this, args); // If method being wrapped returns a promise then wait and swallow errors. @@ -192,16 +192,16 @@ export function swallowExceptions(scopeName?: string) { }; } -// tslint:disable-next-line:no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any type PromiseFunction = (...any: any[]) => Promise; export function displayProgress(title: string, location = ProgressLocation.Window) { return function (_target: Object, _propertyName: string, descriptor: TypedPropertyDescriptor) { const originalMethod = descriptor.value!; - // tslint:disable-next-line:no-any no-function-expression + // eslint-disable-next-line @typescript-eslint/no-explicit-any, descriptor.value = async function (...args: any[]) { const progressOptions: ProgressOptions = { location, title }; - // tslint:disable-next-line:no-invalid-this + // eslint-disable-next-line no-invalid-this const promise = originalMethod.apply(this, args); if (!isTestExecution()) { window.withProgress(progressOptions, () => promise); @@ -215,23 +215,23 @@ export function displayProgress(title: string, location = ProgressLocation.Windo export type CallInfo = { kind: string; // "Class", etc. name: string; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any args: any[]; }; // Return a decorator that traces the decorated function. export function trace(log: (c: CallInfo, t: TraceInfo) => void) { - // tslint:disable-next-line:no-function-expression no-any + // eslint-disable-next-line , @typescript-eslint/no-explicit-any return function (_: Object, __: string, descriptor: TypedPropertyDescriptor) { const originalMethod = descriptor.value; - // tslint:disable-next-line:no-function-expression no-any + // eslint-disable-next-line , @typescript-eslint/no-explicit-any descriptor.value = function (...args: any[]) { const call = { kind: 'Class', name: _ && _.constructor ? _.constructor.name : '', args }; - // tslint:disable-next-line:no-this-assignment no-invalid-this + // eslint-disable-next-line @typescript-eslint/no-this-alias, no-invalid-this const scope = this; return tracing( // "log()" diff --git a/src/client/common/utils/localize.ts b/src/client/common/utils/localize.ts index d41072b4f94..cd6f6d3ed0f 100644 --- a/src/client/common/utils/localize.ts +++ b/src/client/common/utils/localize.ts @@ -1002,7 +1002,7 @@ export function getCollectionJSON(): string { return JSON.stringify({ ...defaultCollection, ...loadedCollection }); } -// tslint:disable-next-line:no-suspicious-comment +// eslint-disable-next-line export function localize(key: string, defValue?: string) { // Return a pointer to function so that we refetch it on each call. return () => { diff --git a/src/client/common/utils/logging.ts b/src/client/common/utils/logging.ts index c9c2f756c09..9bcb4559258 100644 --- a/src/client/common/utils/logging.ts +++ b/src/client/common/utils/logging.ts @@ -14,7 +14,7 @@ export function formatErrorForLogging(error: Error | string): string { if (error.name && error.message.indexOf(error.name) === -1) { message += `, (${error.name})`; } - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const innerException = (error as any).innerException; if (innerException && (innerException.message || innerException.name)) { if (innerException.message) { diff --git a/src/client/common/utils/misc.ts b/src/client/common/utils/misc.ts index 8c6783b78c9..e5347f2dc82 100644 --- a/src/client/common/utils/misc.ts +++ b/src/client/common/utils/misc.ts @@ -8,7 +8,7 @@ import { IAsyncDisposable, IDisposable, Resource } from '../types'; import { isPromise } from './async'; import { StopWatch } from './stopWatch'; -// tslint:disable-next-line:no-empty +// eslint-disable-next-line no-empty,@typescript-eslint/no-empty-function export function noop() {} /** @@ -46,7 +46,7 @@ export async function usingAsync( * * See https://github.com/Microsoft/TypeScript/pull/21316. */ -// tslint:disable-next-line:no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any export type DeepReadonly = T extends any[] ? IDeepReadonlyArray : DeepReadonlyNonArray; type DeepReadonlyNonArray = T extends object ? DeepReadonlyObject : T; interface IDeepReadonlyArray extends ReadonlyArray> {} @@ -59,7 +59,7 @@ type NonFunctionPropertyNames = { [K in keyof T]: T[K] extends Function ? nev export type TraceInfo = { elapsed: number; // milliseconds // Either returnValue or err will be set. - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any returnValue?: any; err?: Error; }; @@ -68,12 +68,12 @@ export type TraceInfo = { export function tracing(log: (t: TraceInfo) => void, run: () => T): T { const timer = new StopWatch(); try { - // tslint:disable-next-line:no-invalid-this no-use-before-declare no-unsafe-any + // eslint-disable-next-line no-invalid-this, @typescript-eslint/no-use-before-define, const result = run(); // If method being wrapped returns a promise then wait for it. if (isPromise(result)) { - // tslint:disable-next-line:prefer-type-cast + // eslint-disable-next-line (result as Promise) .then((data) => { log({ elapsed: timer.elapsedTime, returnValue: data }); @@ -81,7 +81,7 @@ export function tracing(log: (t: TraceInfo) => void, run: () => T): T { }) .catch((ex) => { log({ elapsed: timer.elapsedTime, err: ex }); - // tslint:disable-next-line:no-suspicious-comment + // eslint-disable-next-line // TODO(GH-11645) Re-throw the error like we do // in the non-Promise case. }); @@ -121,7 +121,7 @@ export function isResource(resource?: InterpreterUri): resource is Resource { * @param {InterpreterUri} [resource] * @returns {resource is Uri} */ -// tslint:disable-next-line: no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any export function isUri(resource?: Uri | any): resource is Uri { if (!resource) { return false; diff --git a/src/client/common/utils/multiStepInput.ts b/src/client/common/utils/multiStepInput.ts index 03e68155e86..78d31f42139 100644 --- a/src/client/common/utils/multiStepInput.ts +++ b/src/client/common/utils/multiStepInput.ts @@ -3,7 +3,7 @@ 'use strict'; -// tslint:disable:max-func-body-length no-any no-unnecessary-class +/* eslint-disable , @typescript-eslint/no-explicit-any, @typescript-eslint/no-extraneous-class */ import { inject, injectable } from 'inversify'; import { Disposable, QuickInput, QuickInputButton, QuickInputButtons, QuickPickItem } from 'vscode'; @@ -36,7 +36,7 @@ export interface IQuickPickParameters { shouldResume?(): Promise; } -// tslint:disable-next-line: interface-name +// eslint-disable-next-line @typescript-eslint/naming-convention export interface InputBoxParameters { title: string; password?: boolean; diff --git a/src/client/common/utils/platform.ts b/src/client/common/utils/platform.ts index cc20a8ca0ce..9169dc0fbe7 100644 --- a/src/client/common/utils/platform.ts +++ b/src/client/common/utils/platform.ts @@ -26,7 +26,7 @@ export function getOSType(platform: string = process.platform): OSType { } export function getEnvironmentVariable(key: string): string | undefined { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any return ((process.env as any) as EnvironmentVariables)[key]; } diff --git a/src/client/common/utils/serializers.ts b/src/client/common/utils/serializers.ts index 7626c078026..7e3b4e3d9a5 100644 --- a/src/client/common/utils/serializers.ts +++ b/src/client/common/utils/serializers.ts @@ -14,33 +14,33 @@ export function serializeDataViews(buffers: undefined | (ArrayBuffer | ArrayBuff if (!buffers || !Array.isArray(buffers) || buffers.length === 0) { return; } - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const newBufferView: any[] = []; - // tslint:disable-next-line: prefer-for-of + // eslint-disable-next-line @typescript-eslint/prefer-for-of for (let i = 0; i < buffers.length; i += 1) { const item = buffers[i]; if ('buffer' in item && 'byteOffset' in item) { // It is an ArrayBufferView - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const buffer = Array.apply(null, new Uint8Array(item.buffer as any) as any); newBufferView.push({ ...item, byteLength: item.byteLength, byteOffset: item.byteOffset, buffer - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any); } else { // Do not use `Array.apply`, it will not work for large arrays. // Nodejs will throw `stackoverflow` exceptions. // Else following ipynb fails https://github.com/K3D-tools/K3D-jupyter/blob/821a59ed88579afaafababd6291e8692d70eb088/examples/camera_manipulation.ipynb // Yet another case where 99% can work, but 1% can fail when testing. - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any newBufferView.push([...new Uint8Array(item as any)]); } } - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any return newBufferView; } @@ -56,18 +56,18 @@ export function deserializeDataViews(buffers: undefined | (ArrayBuffer | ArrayBu return buffers; } const newBufferView: (ArrayBuffer | ArrayBufferView)[] = []; - // tslint:disable-next-line: prefer-for-of + // eslint-disable-next-line @typescript-eslint/prefer-for-of for (let i = 0; i < buffers.length; i += 1) { const item = buffers[i]; if ('buffer' in item && 'byteOffset' in item) { const buffer = new Uint8Array(item.buffer).buffer; // It is an ArrayBufferView - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const bufferView = new DataView(buffer, item.byteOffset, item.byteLength); newBufferView.push(bufferView); } else { const buffer = new Uint8Array(item).buffer; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any newBufferView.push(buffer); } } diff --git a/src/client/common/utils/sysTypes.ts b/src/client/common/utils/sysTypes.ts index ce0bce0af96..18a7fbd73d1 100644 --- a/src/client/common/utils/sysTypes.ts +++ b/src/client/common/utils/sysTypes.ts @@ -5,7 +5,7 @@ 'use strict'; -// tslint:disable:rule1 no-any no-unnecessary-callback-wrapper jsdoc-format no-for-in prefer-const no-increment-decrement +/* eslint-disable @typescript-eslint/no-explicit-any, jsdoc/check-alignment, jsdoc/check-indentation, jsdoc/newline-after-description, no-restricted-syntax, prefer-const */ const _typeof = { number: 'number', diff --git a/src/client/common/utils/version.ts b/src/client/common/utils/version.ts index cad0bea9ad9..f579b07ae33 100644 --- a/src/client/common/utils/version.ts +++ b/src/client/common/utils/version.ts @@ -9,7 +9,7 @@ export function parseVersion(raw: string): semver.SemVer { raw = raw.replace(/\.00*(?=[1-9]|0\.)/, '.'); const ver = semver.coerce(raw); if (ver === null || !semver.valid(ver)) { - // tslint:disable-next-line: no-suspicious-comment + // eslint-disable-next-line // TODO: Raise an exception instead? return new semver.SemVer('0.0.0'); } diff --git a/src/client/common/variables/environmentVariablesProvider.ts b/src/client/common/variables/environmentVariablesProvider.ts index e74dafc16ef..01d795fb826 100644 --- a/src/client/common/variables/environmentVariablesProvider.ts +++ b/src/client/common/variables/environmentVariablesProvider.ts @@ -60,7 +60,7 @@ export class EnvironmentVariablesProvider implements IEnvironmentVariablesProvid const workspaceFolderUri = this.getWorkspaceFolderUri(resource); this.trackedWorkspaceFolders.add(workspaceFolderUri ? workspaceFolderUri.fsPath : ''); - // tslint:disable-next-line: no-suspicious-comment + // eslint-disable-next-line // TODO: This should be added to the python API (or this entire service should move there) // https://github.com/microsoft/vscode-jupyter/issues/51 const envFile = workspaceFolderUri?.fsPath ? path.join(workspaceFolderUri.fsPath, '.env') : '.env'; diff --git a/src/client/common/variables/sysTypes.ts b/src/client/common/variables/sysTypes.ts index 10bd2b776b1..b8f425e8cb9 100644 --- a/src/client/common/variables/sysTypes.ts +++ b/src/client/common/variables/sysTypes.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -// tslint:disable:no-any no-increment-decrement +/* eslint-disable @typescript-eslint/no-explicit-any, */ import { isFunction, isString } from '../utils/sysTypes'; diff --git a/src/client/common/variables/systemVariables.ts b/src/client/common/variables/systemVariables.ts index 74b307dafb7..8f41c802800 100644 --- a/src/client/common/variables/systemVariables.ts +++ b/src/client/common/variables/systemVariables.ts @@ -10,7 +10,7 @@ import { IDocumentManager, IWorkspaceService } from '../application/types'; import * as Types from '../utils/sysTypes'; import { IStringDictionary, ISystemVariables } from './types'; -/* tslint:disable:rule1 no-any no-unnecessary-callback-wrapper jsdoc-format no-for-in prefer-const no-increment-decrement */ +/* eslint-disable , @typescript-eslint/no-explicit-any, , jsdoc/check-alignment,jsdoc/check-indentation,jsdoc/newline-after-description, no-restricted-syntax, prefer-const, */ abstract class AbstractSystemVariables implements ISystemVariables { public resolve(value: string): string; @@ -18,7 +18,7 @@ abstract class AbstractSystemVariables implements ISystemVariables { public resolve(value: IStringDictionary): IStringDictionary; public resolve(value: IStringDictionary): IStringDictionary; public resolve(value: IStringDictionary>): IStringDictionary>; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public resolve(value: any): any { if (Types.isString(value)) { return this.__resolveString(value); @@ -32,7 +32,7 @@ abstract class AbstractSystemVariables implements ISystemVariables { } public resolveAny(value: T): T; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public resolveAny(value: any): any { if (Types.isString(value)) { return this.__resolveString(value); @@ -48,7 +48,7 @@ abstract class AbstractSystemVariables implements ISystemVariables { private __resolveString(value: string): string { const regexp = /\$\{(.*?)\}/g; return value.replace(regexp, (match: string, name: string) => { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const newValue = (this)[name]; if (Types.isString(newValue)) { return newValue; @@ -64,19 +64,19 @@ abstract class AbstractSystemVariables implements ISystemVariables { const result: IStringDictionary | string[]> = Object.create(null); Object.keys(values).forEach((key) => { const value = values[key]; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any result[key] = this.resolve(value); }); return result; } private __resolveAnyLiteral(values: T): T; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any private __resolveAnyLiteral(values: any): any { const result: IStringDictionary | string[]> = Object.create(null); Object.keys(values).forEach((key) => { const value = values[key]; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any result[key] = this.resolveAny(value); }); return result; @@ -87,7 +87,7 @@ abstract class AbstractSystemVariables implements ISystemVariables { } private __resolveAnyArray(value: T[]): T[]; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any private __resolveAnyArray(value: any[]): any[] { return value.map((s) => this.resolveAny(s)); } diff --git a/src/client/common/variables/types.ts b/src/client/common/variables/types.ts index 1b1a0582925..c42de5171dc 100644 --- a/src/client/common/variables/types.ts +++ b/src/client/common/variables/types.ts @@ -36,7 +36,7 @@ export interface ISystemVariables { resolve(value: IStringDictionary): IStringDictionary; resolve(value: IStringDictionary>): IStringDictionary>; resolveAny(value: T): T; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any [key: string]: any; } diff --git a/src/client/datascience/baseJupyterSession.ts b/src/client/datascience/baseJupyterSession.ts index 381d19f07ad..2019d7696d9 100644 --- a/src/client/datascience/baseJupyterSession.ts +++ b/src/client/datascience/baseJupyterSession.ts @@ -48,7 +48,7 @@ export abstract class BaseJupyterSession implements IJupyterSession { } private get jupyterLab(): undefined | typeof import('@jupyterlab/services') { if (!this._jupyterLab) { - // tslint:disable-next-line:no-require-imports + // eslint-disable-next-line @typescript-eslint/no-require-imports this._jupyterLab = require('@jupyterlab/services') as typeof import('@jupyterlab/services'); // NOSONAR } return this._jupyterLab; @@ -245,7 +245,7 @@ export abstract class BaseJupyterSession implements IJupyterSession { public sendInputReply(content: string) { if (this.session && this.session.kernel) { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any this.session.kernel.sendInputReply({ value: content, status: 'ok' }); } } @@ -264,9 +264,9 @@ export abstract class BaseJupyterSession implements IJupyterSession { public sendCommMessage( buffers: (ArrayBuffer | ArrayBufferView)[], content: { comm_id: string; data: JSONObject; target_name: string | undefined }, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any metadata: any, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any msgId: any ): Kernel.IShellFuture< KernelMessage.IShellMessage<'comm_msg'>, @@ -274,7 +274,7 @@ export abstract class BaseJupyterSession implements IJupyterSession { > { if (this.session && this.session.kernel && this.jupyterLab) { const shellMessage = this.jupyterLab.KernelMessage.createMessage>({ - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any msgType: 'comm_msg', channel: 'shell', buffers, @@ -338,7 +338,7 @@ export abstract class BaseJupyterSession implements IJupyterSession { protected async waitForIdleOnSession(session: ISessionWithSocket | undefined, timeout: number): Promise { if (session && session.kernel) { traceInfo(`Waiting for idle on (kernel): ${session.kernel.id} -> ${session.kernel.status}`); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const statusHandler = (resolve: () => void, reject: (exc: any) => void, e: Kernel.Status | undefined) => { if (e === 'idle') { resolve(); diff --git a/src/client/datascience/codeCssGenerator.ts b/src/client/datascience/codeCssGenerator.ts index 599eedcef39..bf9ea276f68 100644 --- a/src/client/datascience/codeCssGenerator.ts +++ b/src/client/datascience/codeCssGenerator.ts @@ -14,7 +14,7 @@ import { IConfigurationService, Resource } from '../common/types'; import { DefaultTheme } from './constants'; import { ICodeCssGenerator, IThemeFinder } from './types'; -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ const DarkTheme = 'dark'; const LightTheme = 'light'; @@ -23,7 +23,7 @@ const ThreeColorRegEx = /^#?([0-9A-Fa-f])([0-9A-Fa-f])([0-9A-Fa-f])$/; // These are based on the colors generated by 'Default Light+' and are only set when we // are ignoring themes. -//tslint:disable:no-multiline-string object-literal-key-quotes +/* eslint-disable no-multi-str, quote-props */ const DefaultCssVars: { [key: string]: string } = { light: ` :root { @@ -211,7 +211,7 @@ export class CodeCssGenerator implements ICodeCssGenerator { : 'var(--override-foreground, var(--vscode-editor-foreground))'; } - // tslint:disable-next-line:max-func-body-length + // eslint-disable-next-line private generateCss(args: IApplyThemeArgs): string { // There's a set of values that need to be found const commentStyle = this.getScopeStyle(args.tokenColors, 'comment', 'comment', args.defaultStyle); @@ -243,7 +243,7 @@ ${args.defaultStyle ? DefaultCssVars[args.defaultStyle] : ''} // Based on this data here: // https://github.com/Microsoft/vscode/blob/master/src/vs/editor/standalone/common/themes.ts#L13 - // tslint:disable: max-func-body-length + /* eslint-disable */ private generateMonacoThemeObject(args: IApplyThemeArgs): monacoEditor.editor.IStandaloneThemeData { const result: monacoEditor.editor.IStandaloneThemeData = { base: args.isDark ? 'vs-dark' : 'vs', @@ -292,7 +292,7 @@ ${args.defaultStyle ? DefaultCssVars[args.defaultStyle] : ''} // Special case some items. punctuation.definition.comment doesn't seem to // be listed anywhere. Add it manually when we find a 'comment' - // tslint:disable-next-line: possible-timing-attack + // eslint-disable-next-line if (token === 'comment') { result.rules.push({ token: 'punctuation.definition.comment', @@ -303,7 +303,7 @@ ${args.defaultStyle ? DefaultCssVars[args.defaultStyle] : ''} } // Same for string - // tslint:disable-next-line: possible-timing-attack + // eslint-disable-next-line if (token === 'string') { result.rules.push({ token: 'punctuation.definition.string', diff --git a/src/client/datascience/commands/commandRegistry.ts b/src/client/datascience/commands/commandRegistry.ts index f0b2dcb2438..0143ba8e93b 100644 --- a/src/client/datascience/commands/commandRegistry.ts +++ b/src/client/datascience/commands/commandRegistry.ts @@ -129,7 +129,7 @@ export class CommandRegistry implements IDisposable { private registerCommand< E extends keyof ICommandNameArgumentTypeMapping, U extends ICommandNameArgumentTypeMapping[E] - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any >(command: E, callback: (...args: U) => any) { const disposable = this.commandManager.registerCommand(command, callback, this); this.disposables.push(disposable); diff --git a/src/client/datascience/commands/exportCommands.ts b/src/client/datascience/commands/exportCommands.ts index ab9c15b44bf..488ac8edada 100644 --- a/src/client/datascience/commands/exportCommands.ts +++ b/src/client/datascience/commands/exportCommands.ts @@ -57,7 +57,7 @@ export class ExportCommands implements IDisposable { private registerCommand< E extends keyof ICommandNameArgumentTypeMapping, U extends ICommandNameArgumentTypeMapping[E] - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any >(command: E, callback: (...args: U) => any) { const disposable = this.commandManager.registerCommand(command, callback, this); this.disposables.push(disposable); diff --git a/src/client/datascience/common.ts b/src/client/datascience/common.ts index 8272af6dd2a..772fe632888 100644 --- a/src/client/datascience/common.ts +++ b/src/client/datascience/common.ts @@ -72,15 +72,15 @@ export function pruneCell(cell: nbformat.ICell): nbformat.ICell { const result = ({ ...cell, source: splitMultilineString(cell.source) - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any) as nbformat.ICell; // nyc (code coverage) barfs on this so just trick it. // Remove outputs and execution_count from non code cells if (result.cell_type !== 'code') { // Map to any so nyc will build. - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any delete (result).outputs; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any delete (result).execution_count; } else { // Clean outputs from code cells diff --git a/src/client/datascience/data-viewing/dataViewer.ts b/src/client/datascience/data-viewing/dataViewer.ts index eea574c8403..19d1258fec3 100644 --- a/src/client/datascience/data-viewing/dataViewer.ts +++ b/src/client/datascience/data-viewing/dataViewer.ts @@ -95,7 +95,7 @@ export class DataViewer extends WebviewPanelHost implements return undefined; } - //tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any protected onMessage(message: string, payload: any) { switch (message) { case DataViewerMessages.GetAllRowsRequest: diff --git a/src/client/datascience/data-viewing/dataViewerMessageListener.ts b/src/client/datascience/data-viewing/dataViewerMessageListener.ts index 7d9cb03526a..652fe939f31 100644 --- a/src/client/datascience/data-viewing/dataViewerMessageListener.ts +++ b/src/client/datascience/data-viewing/dataViewerMessageListener.ts @@ -5,7 +5,7 @@ import '../../common/extensions'; import { IWebviewPanel, IWebviewPanelMessageListener } from '../../common/application/types'; -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ // This class listens to messages that come from the local Data Explorer window export class DataViewerMessageListener implements IWebviewPanelMessageListener { diff --git a/src/client/datascience/data-viewing/types.ts b/src/client/datascience/data-viewing/types.ts index df3c97bc5cd..e45983a9e67 100644 --- a/src/client/datascience/data-viewing/types.ts +++ b/src/client/datascience/data-viewing/types.ts @@ -69,7 +69,7 @@ export enum ColumnType { Bool = 'bool' } -// tslint:disable-next-line: no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any export type IRowsResponse = any[]; export const IDataViewerFactory = Symbol('IDataViewerFactory'); diff --git a/src/client/datascience/dataScienceSurveyBanner.ts b/src/client/datascience/dataScienceSurveyBanner.ts index 79ffe8740d8..ce3091baa93 100644 --- a/src/client/datascience/dataScienceSurveyBanner.ts +++ b/src/client/datascience/dataScienceSurveyBanner.ts @@ -36,7 +36,7 @@ const NotebookExecutionThreshold = 100; @injectable() export class DataScienceSurveyBannerLogger implements IInteractiveWindowListener { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any private postEmitter = new EventEmitter<{ message: string; payload: any }>(); constructor( @inject(IPersistentStateFactory) private persistentState: IPersistentStateFactory, @@ -44,11 +44,11 @@ export class DataScienceSurveyBannerLogger implements IInteractiveWindowListener @named(BANNER_NAME_DS_SURVEY) private readonly dataScienceSurveyBanner: IJupyterExtensionBanner ) {} - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public get postMessage(): Event<{ message: string; payload: any }> { return this.postEmitter.event; } - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public onMessage(message: string, payload?: any): void { if (message === InteractiveWindowMessages.ReExecuteCells) { const args = payload as IReExecuteCells; diff --git a/src/client/datascience/datascience.ts b/src/client/datascience/datascience.ts index 3a5a526ac3d..8e66e86e479 100644 --- a/src/client/datascience/datascience.ts +++ b/src/client/datascience/datascience.ts @@ -92,7 +92,7 @@ export class DataScience implements IDataScience { @swallowExceptions('Sending DataScience Settings Telemetry failed') private async sendSettingsTelemetry(): Promise { // Get our current settings. This is what we want to send. - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const settings = this.configuration.getSettings() as any; // Translate all of the 'string' based settings into known values or not. diff --git a/src/client/datascience/editor-integration/cellhashprovider.ts b/src/client/datascience/editor-integration/cellhashprovider.ts index 871549c92ac..b2b99666248 100644 --- a/src/client/datascience/editor-integration/cellhashprovider.ts +++ b/src/client/datascience/editor-integration/cellhashprovider.ts @@ -27,9 +27,9 @@ import { INotebookExecutionLogger } from '../types'; -// tslint:disable-next-line:no-require-imports no-var-requires +// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires const _escapeRegExp = require('lodash/escapeRegExp') as typeof import('lodash/escapeRegExp'); // NOSONAR -// tslint:disable-next-line: no-require-imports no-var-requires +// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires const _escape = require('lodash/escape') as typeof import('lodash/escape'); // NOSONAR const LineNumberMatchRegex = /(;32m[ ->]*?)(\d+)(.*)/g; @@ -47,10 +47,10 @@ interface IRangedCellHash extends ICellHash { // hashes for cells. @injectable() export class CellHashProvider implements ICellHashProvider, INotebookExecutionLogger { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any private postEmitter: EventEmitter<{ message: string; payload: any }> = new EventEmitter<{ message: string; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any payload: any; }>(); // Map of file to Map of start line to actual hash @@ -79,7 +79,7 @@ export class CellHashProvider implements ICellHashProvider, INotebookExecutionLo return this.updateEventEmitter.event; } - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public get postMessage(): Event<{ message: string; payload: any }> { return this.postEmitter.event; } @@ -166,7 +166,7 @@ export class CellHashProvider implements ICellHashProvider, INotebookExecutionLo return ``; } - // tslint:disable-next-line: cyclomatic-complexity + // eslint-disable-next-line complexity public async addCellHash(cell: ICell, expectedCount: number): Promise { // Find the text document that matches. We need more information than // the add code gives us @@ -445,7 +445,7 @@ export class CellHashProvider implements ICellHashProvider, INotebookExecutionLo export function getCellHashProvider(notebook: INotebook): ICellHashProvider | undefined { const logger = notebook.getLoggers().find((f) => f instanceof CellHashProvider); if (logger) { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any return (logger as any) as ICellHashProvider; } } diff --git a/src/client/datascience/editor-integration/codeLensFactory.ts b/src/client/datascience/editor-integration/codeLensFactory.ts index a3352d289f1..d93b9f128a0 100644 --- a/src/client/datascience/editor-integration/codeLensFactory.ts +++ b/src/client/datascience/editor-integration/codeLensFactory.ts @@ -47,10 +47,10 @@ type PerNotebookData = { @injectable() export class CodeLensFactory implements ICodeLensFactory, IInteractiveWindowListener { private updateEvent: EventEmitter = new EventEmitter(); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any private postEmitter: EventEmitter<{ message: string; payload: any }> = new EventEmitter<{ message: string; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any payload: any; }>(); private notebookData = new Map(); @@ -70,12 +70,12 @@ export class CodeLensFactory implements ICodeLensFactory, IInteractiveWindowList noop(); } - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public get postMessage(): Event<{ message: string; payload: any }> { return this.postEmitter.event; } - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public onMessage(message: string, payload?: any) { switch (message) { case InteractiveWindowMessages.NotebookIdentity: @@ -320,7 +320,7 @@ export class CodeLensFactory implements ICodeLensFactory, IInteractiveWindowList return fullCommandList; } - // tslint:disable-next-line: max-func-body-length + // eslint-disable-next-line private createCodeLens( document: TextDocument, cellRange: { range: Range; cell_type: string }, @@ -478,13 +478,13 @@ export class CodeLensFactory implements ICodeLensFactory, IInteractiveWindowList } } - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any private generateCodeLens(range: Range, commandName: string, title: string, args?: any[]): CodeLens { return new CodeLens(range, generateCommand(commandName, title, args)); } } -// tslint:disable-next-line: no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any export function generateCommand(commandName: string, title: string, args?: any[]): Command { return { arguments: args, diff --git a/src/client/datascience/editor-integration/decorator.ts b/src/client/datascience/editor-integration/decorator.ts index 991a1ae1ef1..0b9bf11f762 100644 --- a/src/client/datascience/editor-integration/decorator.ts +++ b/src/client/datascience/editor-integration/decorator.ts @@ -42,7 +42,7 @@ export class Decorator implements IExtensionSingleActivationService, IDisposable public dispose() { if (this.timer) { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any clearTimeout(this.timer as any); } } @@ -71,7 +71,7 @@ export class Decorator implements IExtensionSingleActivationService, IDisposable private triggerUpdate(editor: vscode.TextEditor | undefined) { if (this.timer) { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any clearTimeout(this.timer as any); } this.timer = setTimeout(() => this.update(editor), 100); diff --git a/src/client/datascience/editor-integration/hoverProvider.ts b/src/client/datascience/editor-integration/hoverProvider.ts index 358b8a7742f..cab5caf5450 100644 --- a/src/client/datascience/editor-integration/hoverProvider.ts +++ b/src/client/datascience/editor-integration/hoverProvider.ts @@ -37,7 +37,7 @@ export class HoverProvider implements INotebookExecutionLogger, vscode.HoverProv noop(); } - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public onKernelRestarted() { this.runFiles.clear(); } diff --git a/src/client/datascience/export/exportBase.ts b/src/client/datascience/export/exportBase.ts index 8ca6580585f..fb0054f7f56 100644 --- a/src/client/datascience/export/exportBase.ts +++ b/src/client/datascience/export/exportBase.ts @@ -25,7 +25,7 @@ export class ExportBase implements IExport { _target: Uri, _interpreter: PythonEnvironment, _token: CancellationToken - // tslint:disable-next-line: no-empty + // eslint-disable-next-line no-empty,@typescript-eslint/no-empty-function ): Promise {} @reportAction(ReportableAction.PerformingExport) @@ -70,7 +70,6 @@ export class ExportBase implements IExport { tempTarget.dispose(); return; } - try { if ((await this.fs.stat(Uri.file(tempTarget.filePath))).size > 1) { await this.fs.copyLocal(tempTarget.filePath, target.fsPath); diff --git a/src/client/datascience/export/exportManager.ts b/src/client/datascience/export/exportManager.ts index bf4db2a447e..6a82806bd70 100644 --- a/src/client/datascience/export/exportManager.ts +++ b/src/client/datascience/export/exportManager.ts @@ -105,7 +105,7 @@ export class ExportManager implements IExportManager { } private showExportFailed(msg: string) { - // tslint:disable-next-line: messages-must-be-localized + // eslint-disable-next-line this.applicationShell.showErrorMessage(`${localize.DataScience.failedExportMessage()} ${msg}`).then(); } diff --git a/src/client/datascience/interactive-common/debugListener.ts b/src/client/datascience/interactive-common/debugListener.ts index c50fb893ced..31c3a8a998a 100644 --- a/src/client/datascience/interactive-common/debugListener.ts +++ b/src/client/datascience/interactive-common/debugListener.ts @@ -11,7 +11,7 @@ import { Identifiers } from '../constants'; import { IInteractiveWindowListener, IJupyterDebugService } from '../types'; import { InteractiveWindowMessages } from './interactiveWindowTypes'; -// tslint:disable: no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ @injectable() export class DebugListener implements IInteractiveWindowListener { private postEmitter: EventEmitter<{ message: string; payload: any }> = new EventEmitter<{ diff --git a/src/client/datascience/interactive-common/intellisense/conversion.ts b/src/client/datascience/interactive-common/intellisense/conversion.ts index b83551c4f09..df0a20cd62f 100644 --- a/src/client/datascience/interactive-common/intellisense/conversion.ts +++ b/src/client/datascience/interactive-common/intellisense/conversion.ts @@ -178,7 +178,7 @@ export function convertToMonacoCompletionItem( requiresKindConversion: boolean ): monacoEditor.languages.CompletionItem { // They should be pretty much identical? Except for ranges. - // tslint:disable-next-line: no-object-literal-type-assertion no-any + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions, @typescript-eslint/no-explicit-any const result = ({ ...item } as any) as monacoEditor.languages.CompletionItem; if (requiresKindConversion) { result.kind = convertToMonacoCompletionItemKind(item.kind); @@ -189,7 +189,7 @@ export function convertToMonacoCompletionItem( result.insertText = result.label; } - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const snippet = (result.insertText as any) as vscode.SnippetString; if (snippet.value) { result.insertTextRules = SnippetEscape; @@ -198,7 +198,7 @@ export function convertToMonacoCompletionItem( } // Make sure we don't have _documentPosition. It holds onto a huge tree of information - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const resultAny = result as any; if (resultAny._documentPosition) { delete resultAny._documentPosition; @@ -208,7 +208,7 @@ export function convertToMonacoCompletionItem( } export function convertToVSCodeCompletionItem(item: monacoEditor.languages.CompletionItem): vscode.CompletionItem { - // tslint:disable-next-line: no-object-literal-type-assertion no-any + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions, @typescript-eslint/no-explicit-any const result = ({ ...item } as any) as vscode.CompletionItem; if (item.kind && result.kind) { @@ -262,7 +262,7 @@ function convertToMonacoMarkdown( | vscode.MarkedString | vscode.MarkedString[] ): monacoEditor.IMarkdownString[] { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any if ('kind' in (strings as any)) { const content = strings as vscodeLanguageClient.MarkupContent; return [ @@ -270,9 +270,9 @@ function convertToMonacoMarkdown( value: content.value } ]; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any } else if ('value' in (strings as any)) { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const content = strings as any; return [ { @@ -311,13 +311,13 @@ export function convertToMonacoHover( export function convertStringsToSuggestions( strings: ReadonlyArray, range: monacoEditor.IRange, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any metadata: any ): monacoEditor.languages.CompletionItem[] { // Try to compute kind from the metadata. let kinds: number[]; if (metadata && metadata._jupyter_types_experimental) { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any kinds = metadata._jupyter_types_experimental.map((e: any) => { const result = mapJupyterKind.get(e.type); return result ? result : 3; // If not found use Field = 3 diff --git a/src/client/datascience/interactive-common/intellisense/intellisenseProvider.ts b/src/client/datascience/interactive-common/intellisense/intellisenseProvider.ts index e9f7bad2771..abc4b738c64 100644 --- a/src/client/datascience/interactive-common/intellisense/intellisenseProvider.ts +++ b/src/client/datascience/interactive-common/intellisense/intellisenseProvider.ts @@ -84,7 +84,7 @@ const GeneralCallableSignature = '(*args, **kwargs)'; // Example string: ```python\n(variable) some_var: Any\n``` const CallableRegex = /python\n\(.+?\) \S+?: (\([\s\S]+?\))/; -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ @injectable() export class IntellisenseProvider implements IInteractiveWindowListener { public get postMessage(): Event<{ message: string; payload: any }> { diff --git a/src/client/datascience/interactive-common/intellisense/wordHelper.ts b/src/client/datascience/interactive-common/intellisense/wordHelper.ts index e8ae47b1bd0..462306fae06 100644 --- a/src/client/datascience/interactive-common/intellisense/wordHelper.ts +++ b/src/client/datascience/interactive-common/intellisense/wordHelper.ts @@ -48,7 +48,7 @@ export function ensureValidWordDefinition(wordDefinition?: RegExp | null): RegEx if (wordDefinition.multiline) { flags += 'm'; } - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any if ((wordDefinition as any).unicode) { flags += 'u'; } @@ -163,7 +163,7 @@ export function regExpLeadsToEndlessLoop(regexp: RegExp): boolean { // We check against an empty string. If the regular expression doesn't advance // (e.g. ends in an endless loop) it will match an empty string. const match = regexp.exec(''); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any return !!(match && regexp.lastIndex === 0); } diff --git a/src/client/datascience/interactive-common/interactiveBase.ts b/src/client/datascience/interactive-common/interactiveBase.ts index 63a0ddf4b80..59abda4ccfa 100644 --- a/src/client/datascience/interactive-common/interactiveBase.ts +++ b/src/client/datascience/interactive-common/interactiveBase.ts @@ -233,7 +233,7 @@ export abstract class InteractiveBase extends WebviewPanelHost( _message: T, - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any payload: any, handler: (args: M[T]) => void ) { @@ -881,7 +881,7 @@ export abstract class InteractiveBase extends WebviewPanelHost { if (!this.notebookPromise) { this.notebookPromise = this.ensureNotebookImpl(serverConnection); @@ -969,10 +969,10 @@ export abstract class InteractiveBase extends WebviewPanelHost l.onMessage(message, payload)); @@ -1385,7 +1385,7 @@ export abstract class InteractiveBase extends WebviewPanelHost => { // Execute the code 'import sys\r\nsys.version' and 'import sys\r\nsys.executable' to get our @@ -1460,7 +1460,7 @@ export abstract class InteractiveBase extends WebviewPanelHost { // Direct undefined check as false boolean will skip code if (payload !== undefined) { @@ -1474,7 +1474,7 @@ export abstract class InteractiveBase extends WebviewPanelHost; }; public [InteractiveWindowMessages.NativeCommand]: INativeCommand; diff --git a/src/client/datascience/interactive-common/linkProvider.ts b/src/client/datascience/interactive-common/linkProvider.ts index 6c48b193e95..bb95089e02e 100644 --- a/src/client/datascience/interactive-common/linkProvider.ts +++ b/src/client/datascience/interactive-common/linkProvider.ts @@ -20,7 +20,7 @@ const LineQueryRegex = /line=(\d+)/; // in a markdown cell using the syntax: https://command:[my.vscode.command]. const linkCommandAllowList = ['jupyter.latestExtension', 'jupyter.enableLoadingWidgetScriptsFromThirdPartySource']; -// tslint:disable: no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ @injectable() export class LinkProvider implements IInteractiveWindowListener { private postEmitter: EventEmitter<{ message: string; payload: any }> = new EventEmitter<{ diff --git a/src/client/datascience/interactive-common/serialization.ts b/src/client/datascience/interactive-common/serialization.ts index da853c44f6e..da931e95d34 100644 --- a/src/client/datascience/interactive-common/serialization.ts +++ b/src/client/datascience/interactive-common/serialization.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. import { CharacterPair, CommentRule, EnterAction, IndentationRule, LanguageConfiguration, OnEnterRule } from 'vscode'; -// tslint:disable: no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ export interface IRegExpDto { pattern: string; diff --git a/src/client/datascience/interactive-common/showPlotListener.ts b/src/client/datascience/interactive-common/showPlotListener.ts index 7151c9ffd10..a688caea6fc 100644 --- a/src/client/datascience/interactive-common/showPlotListener.ts +++ b/src/client/datascience/interactive-common/showPlotListener.ts @@ -10,7 +10,7 @@ import { noop } from '../../common/utils/misc'; import { IInteractiveWindowListener, IPlotViewerProvider } from '../types'; import { InteractiveWindowMessages } from './interactiveWindowTypes'; -// tslint:disable: no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ @injectable() export class ShowPlotListener implements IInteractiveWindowListener { private postEmitter: EventEmitter<{ message: string; payload: any }> = new EventEmitter<{ diff --git a/src/client/datascience/interactive-common/synchronization.ts b/src/client/datascience/interactive-common/synchronization.ts index 9726a4b4fea..852914001b8 100644 --- a/src/client/datascience/interactive-common/synchronization.ts +++ b/src/client/datascience/interactive-common/synchronization.ts @@ -31,7 +31,7 @@ export enum MessageType { noIdea = 1 << 2 } -// tslint:disable-next-line: no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any type MessageAction = (payload: any) => boolean; type MessageMapping = { @@ -284,7 +284,7 @@ export function checkToPostBasedOnOriginalMessageType(messageType?: MessageType) return true; } -// tslint:disable-next-line: no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any export function shouldRebroadcast(message: keyof IInteractiveWindowMapping, payload: any): [boolean, MessageType] { // Get the configured type for this message (whether it should be re-broadcasted or not). const messageTypeOrFunc: MessageType | undefined | MessageAction = messageWithMessageTypes[message]; diff --git a/src/client/datascience/interactive-common/types.ts b/src/client/datascience/interactive-common/types.ts index 3c22935868a..5531d3514b9 100644 --- a/src/client/datascience/interactive-common/types.ts +++ b/src/client/datascience/interactive-common/types.ts @@ -37,6 +37,6 @@ export type BaseReduxActionPayload = T extends never : BaseDataWithPayload; export type SyncPayload = { type: InteractiveWindowMessages | SharedMessages | CommonActionType | CssMessages; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any payload: BaseReduxActionPayload; }; diff --git a/src/client/datascience/interactive-ipynb/autoSaveService.ts b/src/client/datascience/interactive-ipynb/autoSaveService.ts index d393edcea24..19a4593462f 100644 --- a/src/client/datascience/interactive-ipynb/autoSaveService.ts +++ b/src/client/datascience/interactive-ipynb/autoSaveService.ts @@ -19,7 +19,7 @@ import { WebViewViewChangeEventArgs } from '../types'; -// tslint:disable: no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ /** * Sends notifications to Notebooks to save the notebook. diff --git a/src/client/datascience/interactive-ipynb/nativeEditor.ts b/src/client/datascience/interactive-ipynb/nativeEditor.ts index 2a8948387cd..107b14b3157 100644 --- a/src/client/datascience/interactive-ipynb/nativeEditor.ts +++ b/src/client/datascience/interactive-ipynb/nativeEditor.ts @@ -70,7 +70,7 @@ import { import { NativeEditorSynchronizer } from './nativeEditorSynchronizer'; import type { nbformat } from '@jupyterlab/coreutils'; -// tslint:disable-next-line: no-require-imports +// eslint-disable-next-line @typescript-eslint/no-require-imports import cloneDeep = require('lodash/cloneDeep'); import { concatMultilineString, splitMultilineString } from '../../../datascience-ui/common'; import { ServerStatus } from '../../../datascience-ui/interactive-common/mainState'; @@ -145,7 +145,7 @@ export class NativeEditor extends InteractiveBase implements INotebookEditor { private executeCancelTokens = new Set(); private loadPromise: Promise; private previouslyNotTrusted: boolean = false; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any private waitingForMessageResponse = new Map>(); constructor( @@ -255,7 +255,7 @@ export class NativeEditor extends InteractiveBase implements INotebookEditor { ...c.data, source: result.code[i] } - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any; // Deal with nyc problems }) ); @@ -279,7 +279,7 @@ export class NativeEditor extends InteractiveBase implements INotebookEditor { ...c.data, source: c.id === cellId ? result.code : c.data.source } - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any; // Deal with nyc problems }) ); @@ -295,7 +295,7 @@ export class NativeEditor extends InteractiveBase implements INotebookEditor { return this.close(); } - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public onMessage(message: string, payload: any) { super.onMessage(message, payload); switch (message) { @@ -460,7 +460,7 @@ export class NativeEditor extends InteractiveBase implements INotebookEditor { } @captureTelemetry(Telemetry.SubmitCellThroughInput, undefined, false) - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any protected submitNewCell(info: ISubmitNewCell) { // If there's any payload, it has the code and the id if (info && info.code && info.id) { @@ -488,7 +488,7 @@ export class NativeEditor extends InteractiveBase implements INotebookEditor { } @captureTelemetry(Telemetry.ExecuteNativeCell, undefined, true) - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any protected async reexecuteCells(info: IReExecuteCells): Promise { // This is here for existing functional tests that somehow pass undefined into this method. if (!this.model || !info || !Array.isArray(info.cellIds)) { @@ -692,7 +692,7 @@ export class NativeEditor extends InteractiveBase implements INotebookEditor { private renameVariableExplorerHeights(name: string, updatedName: string) { // Updates the workspace storage to reflect the updated name of the notebook // should be called if the name of the notebook changes - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const value = this.workspaceStorage.get(VariableExplorerStateKeys.height, {} as any); if (!(name in value)) { return; // Nothing to update @@ -745,7 +745,7 @@ export class NativeEditor extends InteractiveBase implements INotebookEditor { // Make this error our cell output this.sendCellsToWebView([ { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any data: { ...cell.data, outputs: [createErrorOutput(exc)] } as any, // nyc compiler issue id: cell.id, file: Identifiers.EmptyFileName, @@ -888,7 +888,7 @@ export class NativeEditor extends InteractiveBase implements INotebookEditor { // Make this error our cell output this.sendCellsToWebView([ { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any data: { ...runByLine.cell.data, outputs: [createErrorOutput(exc)] } as any, // nyc compiler issue id: runByLine.cell.id, file: Identifiers.EmptyFileName, diff --git a/src/client/datascience/interactive-ipynb/nativeEditorOldWebView.ts b/src/client/datascience/interactive-ipynb/nativeEditorOldWebView.ts index f2f92294503..1c576eeeff8 100644 --- a/src/client/datascience/interactive-ipynb/nativeEditorOldWebView.ts +++ b/src/client/datascience/interactive-ipynb/nativeEditorOldWebView.ts @@ -158,7 +158,7 @@ export class NativeEditorOldWebView extends NativeEditor { }); } - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public onMessage(message: string, payload: any) { super.onMessage(message, payload); switch (message) { @@ -235,7 +235,7 @@ export class NativeEditorOldWebView extends NativeEditor { const yes = localize.DataScience.dirtyNotebookYes(); const no = localize.DataScience.dirtyNotebookNo(); const result = await this.applicationShell.showInformationMessage( - // tslint:disable-next-line: messages-must-be-localized + // eslint-disable-next-line `${message1}\n${message2}`, { modal: true }, yes, diff --git a/src/client/datascience/interactive-ipynb/nativeEditorProviderOld.ts b/src/client/datascience/interactive-ipynb/nativeEditorProviderOld.ts index c81c316e3a2..5e0225b58c3 100644 --- a/src/client/datascience/interactive-ipynb/nativeEditorProviderOld.ts +++ b/src/client/datascience/interactive-ipynb/nativeEditorProviderOld.ts @@ -60,7 +60,7 @@ import { NativeEditor } from './nativeEditor'; import { NativeEditorOldWebView } from './nativeEditorOldWebView'; import { NativeEditorSynchronizer } from './nativeEditorSynchronizer'; -// tslint:disable-next-line:no-require-imports no-var-requires +// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires const debounce = require('lodash/debounce') as typeof import('lodash/debounce'); @injectable() diff --git a/src/client/datascience/interactive-ipynb/nativeEditorRunByLineListener.ts b/src/client/datascience/interactive-ipynb/nativeEditorRunByLineListener.ts index fc2860cae74..fb0fd5da30a 100644 --- a/src/client/datascience/interactive-ipynb/nativeEditorRunByLineListener.ts +++ b/src/client/datascience/interactive-ipynb/nativeEditorRunByLineListener.ts @@ -21,7 +21,7 @@ import { Identifiers, Telemetry } from '../constants'; import { InteractiveWindowMessages, IRunByLine } from '../interactive-common/interactiveWindowTypes'; import { ICell, IInteractiveWindowListener, IJupyterDebugService } from '../types'; -// tslint:disable: no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ /** * Native editor listener that responds to run by line commands from the UI and uses * those commands to control a debug client. diff --git a/src/client/datascience/interactive-ipynb/nativeEditorSynchronizer.ts b/src/client/datascience/interactive-ipynb/nativeEditorSynchronizer.ts index 54956e9a278..1625dc53ac5 100644 --- a/src/client/datascience/interactive-ipynb/nativeEditorSynchronizer.ts +++ b/src/client/datascience/interactive-ipynb/nativeEditorSynchronizer.ts @@ -10,7 +10,7 @@ import { IInteractiveWindowMapping, InteractiveWindowMessages } from '../interac import { SyncPayload } from '../interactive-common/types'; import { INotebookEditor } from '../types'; -// tslint:disable: no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ type UserActionNotificationCallback = ( type: T, diff --git a/src/client/datascience/interactive-window/interactiveWindow.ts b/src/client/datascience/interactive-window/interactiveWindow.ts index 316023d2b10..d9a1d44e2ed 100644 --- a/src/client/datascience/interactive-window/interactiveWindow.ts +++ b/src/client/datascience/interactive-window/interactiveWindow.ts @@ -244,7 +244,7 @@ export class InteractiveWindow extends InteractiveBase implements IInteractiveWi this.postMessage(InteractiveWindowMessages.GetAllCells).ignoreErrors(); } - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public onMessage(message: string, payload: any) { super.onMessage(message, payload); @@ -362,7 +362,7 @@ export class InteractiveWindow extends InteractiveBase implements IInteractiveWi } @captureTelemetry(Telemetry.SubmitCellThroughInput, undefined, false) - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any protected submitNewCell(info: ISubmitNewCell) { // If there's any payload, it has the code and the id if (info && info.code && info.id) { @@ -503,7 +503,7 @@ export class InteractiveWindow extends InteractiveBase implements IInteractiveWi } @captureTelemetry(Telemetry.ExportNotebookInteractive, undefined, false) - // tslint:disable-next-line: no-any no-empty + // eslint-disable-next-line @typescript-eslint/no-explicit-any, no-empty,@typescript-eslint/no-empty-function private async export(cells: ICell[]) { // Export requires the python extension if (!this.extensionChecker.isPythonExtensionInstalled) { @@ -571,7 +571,7 @@ export class InteractiveWindow extends InteractiveBase implements IInteractiveWi } } - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any private handleReturnAllCells(cells: ICell[]) { // See what we're waiting for. if (this.waitingForExportCells) { diff --git a/src/client/datascience/interactive-window/interactiveWindowCommandListener.ts b/src/client/datascience/interactive-window/interactiveWindowCommandListener.ts index 4cf5092a4e0..6613b0ddf8b 100644 --- a/src/client/datascience/interactive-window/interactiveWindowCommandListener.ts +++ b/src/client/datascience/interactive-window/interactiveWindowCommandListener.ts @@ -146,7 +146,7 @@ export class InteractiveWindowCommandListener implements IDataScienceCommandList ); } - // tslint:disable:no-any + /* eslint-disable @typescript-eslint/no-explicit-any */ private async listenForErrors(promise: () => Promise): Promise { let result: any; try { @@ -470,7 +470,7 @@ export class InteractiveWindowCommandListener implements IDataScienceCommandList // Scroll to cell in the one that has the cell. We need this so // we don't activate all of them. - // tslint:disable-next-line: prefer-for-of + // eslint-disable-next-line @typescript-eslint/prefer-for-of for (let i = 0; i < possibles.length; i += 1) { if (await possibles[i].hasCell(id)) { possibles[i].scrollToCell(id); diff --git a/src/client/datascience/interactive-window/interactiveWindowProvider.ts b/src/client/datascience/interactive-window/interactiveWindowProvider.ts index 8b790bdff6d..5581af6d54c 100644 --- a/src/client/datascience/interactive-window/interactiveWindowProvider.ts +++ b/src/client/datascience/interactive-window/interactiveWindowProvider.ts @@ -301,7 +301,7 @@ export class InteractiveWindowProvider implements IInteractiveWindowProvider, IA } } - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any private async onRemoteCreate(...args: any[]) { // Should be 3 args, the originator of the create, the key, and the owner. Key isn't used here // but it is passed through to the response. @@ -319,7 +319,7 @@ export class InteractiveWindowProvider implements IInteractiveWindowProvider, IA } } - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any private onRemoteSync(...args: any[]) { // Should be 3 args, the originator of the create, the key, and the owner (owner used on other call) if (args.length > 1 && args[0].toString() === this.id) { diff --git a/src/client/datascience/ipywidgets/cdnWidgetScriptSourceProvider.ts b/src/client/datascience/ipywidgets/cdnWidgetScriptSourceProvider.ts index 75d2713dd73..7d1a2e04773 100644 --- a/src/client/datascience/ipywidgets/cdnWidgetScriptSourceProvider.ts +++ b/src/client/datascience/ipywidgets/cdnWidgetScriptSourceProvider.ts @@ -18,7 +18,7 @@ import { IWidgetScriptSourceProvider, WidgetScriptSource } from './types'; const unpgkUrl = 'https://unpkg.com/'; const jsdelivrUrl = 'https://cdn.jsdelivr.net/npm/'; -// tslint:disable: no-var-requires no-require-imports +/* eslint-disable @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports */ const sanitize = require('sanitize-filename'); function moduleNameToCDNUrl(cdn: string, moduleName: string, moduleVersion: string) { @@ -202,7 +202,7 @@ export class CDNWidgetScriptSourceProvider implements IWidgetScriptSourceProvide private handleResponse(req: request.Request, filePath: string): Promise { const deferred = createDeferred(); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const errorHandler = (e: any) => { traceError('Error downloading from CDN', e); deferred.resolve(false); diff --git a/src/client/datascience/ipywidgets/commonMessageCoordinator.ts b/src/client/datascience/ipywidgets/commonMessageCoordinator.ts index 36c8c2e11ed..592d7b01abb 100644 --- a/src/client/datascience/ipywidgets/commonMessageCoordinator.ts +++ b/src/client/datascience/ipywidgets/commonMessageCoordinator.ts @@ -40,15 +40,15 @@ import { IIPyWidgetMessageDispatcher } from './types'; @injectable() // export class CommonMessageCoordinator { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public get postMessage(): Event<{ message: string; payload: any }> { return this.postEmitter.event; } private ipyWidgetMessageDispatcher?: IIPyWidgetMessageDispatcher; private ipyWidgetScriptSource?: IPyWidgetScriptSource; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any private postEmitter: EventEmitter<{ message: string; payload: any }>; - // tslint:disable-next-line: no-require-imports + // eslint-disable-next-line @typescript-eslint/no-require-imports private hashFn = require('hash.js').sha256; private disposables: IDisposableRegistry; private jupyterOutput: IOutputChannel; @@ -56,14 +56,14 @@ export class CommonMessageCoordinator { private constructor( private readonly identity: Uri, private readonly serviceContainer: IServiceContainer, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any postEmitter?: EventEmitter<{ message: string; payload: any }> ) { this.postEmitter = postEmitter ?? new EventEmitter<{ message: string; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any payload: any; }>(); this.disposables = this.serviceContainer.get(IDisposableRegistry); @@ -73,7 +73,7 @@ export class CommonMessageCoordinator { public static async create( identity: Uri, serviceContainer: IServiceContainer, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any postEmitter?: EventEmitter<{ message: string; payload: any }> ): Promise { const result = new CommonMessageCoordinator(identity, serviceContainer, postEmitter); @@ -86,7 +86,7 @@ export class CommonMessageCoordinator { this.ipyWidgetScriptSource?.dispose(); // NOSONAR } - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public onMessage(message: string, payload?: any): void { if (message === InteractiveWindowMessages.IPyWidgetLoadSuccess) { this.sendLoadSucceededTelemetry(payload); @@ -102,7 +102,7 @@ export class CommonMessageCoordinator { // Pass onto our two objects that are listening to messages - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any this.getIPyWidgetMessageDispatcher()?.receiveMessage({ message: message as any, payload }); // NOSONAR this.getIPyWidgetScriptSource()?.onMessage(message, payload); } diff --git a/src/client/datascience/ipywidgets/ipyWidgetMessageDispatcher.ts b/src/client/datascience/ipywidgets/ipyWidgetMessageDispatcher.ts index 8560bc94230..3ba28e91a47 100644 --- a/src/client/datascience/ipywidgets/ipyWidgetMessageDispatcher.ts +++ b/src/client/datascience/ipywidgets/ipyWidgetMessageDispatcher.ts @@ -25,7 +25,7 @@ type PendingMessage = { startTime: number; }; -// tslint:disable: no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ /** * This class maps between messages from the react code and talking to a real kernel. */ @@ -79,7 +79,7 @@ export class IPyWidgetMessageDispatcher implements IIPyWidgetMessageDispatcher { ); this.mirrorSend = this.mirrorSend.bind(this); this.onKernelSocketMessage = this.onKernelSocketMessage.bind(this); - // tslint:disable-next-line: no-require-imports + // eslint-disable-next-line @typescript-eslint/no-require-imports const jupyterLabSerialize = require('@jupyterlab/services/lib/kernel/serialize') as typeof import('@jupyterlab/services/lib/kernel/serialize'); // NOSONAR this.deserialize = jupyterLabSerialize.deserialize; } @@ -149,7 +149,7 @@ export class IPyWidgetMessageDispatcher implements IIPyWidgetMessageDispatcher { public async initialize() { if (!this.jupyterLab) { // Lazy load jupyter lab for faster extension loading. - // tslint:disable-next-line:no-require-imports + // eslint-disable-next-line @typescript-eslint/no-require-imports this.jupyterLab = require('@jupyterlab/services') as typeof import('@jupyterlab/services'); // NOSONAR } @@ -225,7 +225,7 @@ export class IPyWidgetMessageDispatcher implements IIPyWidgetMessageDispatcher { // we get the kernel in the UI to have the same set of futures we have on this side if (typeof data === 'string') { const startTime = Date.now(); - // tslint:disable-next-line: no-require-imports + // eslint-disable-next-line @typescript-eslint/no-require-imports const msg = this.deserialize(data); if (msg.channel === 'shell' && msg.header.msg_type === 'execute_request') { const promise = this.mirrorExecuteRequest(msg as KernelMessage.IExecuteRequestMsg); // NOSONAR @@ -463,7 +463,7 @@ export class IPyWidgetMessageDispatcher implements IIPyWidgetMessageDispatcher { private async messageHookCallback(msg: KernelMessage.IIOPubMessage): Promise { const promise = createDeferred(); const requestId = uuid(); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const parentId = (msg.parent_header as any).msg_id; if (this.messageHooks.has(parentId)) { this.messageHookRequests.set(requestId, promise); diff --git a/src/client/datascience/ipywidgets/ipyWidgetScriptSource.ts b/src/client/datascience/ipywidgets/ipyWidgetScriptSource.ts index da639f0ea38..6c4ee352295 100644 --- a/src/client/datascience/ipywidgets/ipyWidgetScriptSource.ts +++ b/src/client/datascience/ipywidgets/ipyWidgetScriptSource.ts @@ -28,15 +28,15 @@ import { InteractiveWindowMessages, IPyWidgetMessages } from '../interactive-com import { ILocalResourceUriConverter, INotebook, INotebookProvider } from '../types'; import { IPyWidgetScriptSourceProvider } from './ipyWidgetScriptSourceProvider'; import { WidgetScriptSource } from './types'; -// tslint:disable: no-var-requires no-require-imports +/* eslint-disable @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports */ const sanitize = require('sanitize-filename'); export class IPyWidgetScriptSource implements ILocalResourceUriConverter { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public get postMessage(): Event<{ message: string; payload: any }> { return this.postEmitter.event; } - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public get postInternalMessage(): Event<{ message: string; payload: any }> { return this.postInternalMessageEmitter.event; } @@ -47,12 +47,12 @@ export class IPyWidgetScriptSource implements ILocalResourceUriConverter { private readonly resourcesMappedToExtensionFolder = new Map>(); private postEmitter = new EventEmitter<{ message: string; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any payload: any; }>(); private postInternalMessageEmitter = new EventEmitter<{ message: string; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any payload: any; }>(); private notebook?: INotebook; @@ -157,7 +157,7 @@ export class IPyWidgetScriptSource implements ILocalResourceUriConverter { } } - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public onMessage(message: string, payload?: any): void { if (message === InteractiveWindowMessages.ConvertUriForUseInWebViewResponse) { const response: undefined | { request: Uri; response: Uri } = payload; @@ -176,7 +176,7 @@ export class IPyWidgetScriptSource implements ILocalResourceUriConverter { public async initialize() { if (!this.jupyterLab) { // Lazy load jupyter lab for faster extension loading. - // tslint:disable-next-line:no-require-imports + // eslint-disable-next-line @typescript-eslint/no-require-imports this.jupyterLab = require('@jupyterlab/services') as typeof jupyterlabService; // NOSONAR } diff --git a/src/client/datascience/ipywidgets/localWidgetScriptSourceProvider.ts b/src/client/datascience/ipywidgets/localWidgetScriptSourceProvider.ts index fc4425f120c..389648cbd72 100644 --- a/src/client/datascience/ipywidgets/localWidgetScriptSourceProvider.ts +++ b/src/client/datascience/ipywidgets/localWidgetScriptSourceProvider.ts @@ -76,11 +76,11 @@ export class LocalWidgetScriptSourceProvider implements IWidgetScriptSourceProvi const fileUri = Uri.file(path.join(nbextensionsPath, file)); const scriptUri = (await this.localResourceUriConverter.asWebviewUri(fileUri)).toString(); - // tslint:disable-next-line: no-unnecessary-local-variable + // eslint-disable-next-line const widgetScriptSource: WidgetScriptSource = { moduleName, scriptUri, source: 'local' }; return widgetScriptSource; }); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any return Promise.all(mappedFiles as any); } private async getSysPrefixOfKernel() { diff --git a/src/client/datascience/ipywidgets/notebookIPyWidgetCoordinator.ts b/src/client/datascience/ipywidgets/notebookIPyWidgetCoordinator.ts index e8b626693c1..e42f4ffb094 100644 --- a/src/client/datascience/ipywidgets/notebookIPyWidgetCoordinator.ts +++ b/src/client/datascience/ipywidgets/notebookIPyWidgetCoordinator.ts @@ -48,7 +48,7 @@ export class NotebookIPyWidgetCoordinator implements INotebookKernelResolver { // See if this is the last copy of this document if (!this.notebookProvider.notebookDocuments.find((d) => d.uri === e.uri)) { const coordinator = this.messageCoordinators.get(e.uri.toString()); - coordinator?.then((c) => c.dispose()); + void coordinator?.then((c) => c.dispose()); this.messageCoordinators.delete(e.uri.toString()); const attachment = this.attachedWebViews.get(e.uri.toString()); attachment?.disposables?.forEach((d) => d.dispose()); @@ -79,7 +79,7 @@ export class NotebookIPyWidgetCoordinator implements INotebookKernelResolver { response: webview.asWebviewUri(e.payload) }); } else { - webview.postMessage({ type: e.message, payload: e.payload }); + void webview.postMessage({ type: e.message, payload: e.payload }); } }) ); diff --git a/src/client/datascience/ipywidgets/types.ts b/src/client/datascience/ipywidgets/types.ts index e09243ffa1f..fd1469e51de 100644 --- a/src/client/datascience/ipywidgets/types.ts +++ b/src/client/datascience/ipywidgets/types.ts @@ -9,7 +9,7 @@ import { IPyWidgetMessages } from '../interactive-common/interactiveWindowTypes' export interface IPyWidgetMessage { message: IPyWidgetMessages; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any payload: any; } @@ -17,9 +17,9 @@ export interface IPyWidgetMessage { * Used to send/receive messages related to IPyWidgets */ export interface IIPyWidgetMessageDispatcher extends IDisposable { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any postMessage: Event; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any receiveMessage(message: IPyWidgetMessage): void; initialize(): Promise; } diff --git a/src/client/datascience/ipywidgets/webviewIPyWidgetCoordinator.ts b/src/client/datascience/ipywidgets/webviewIPyWidgetCoordinator.ts index 19873db227b..ae9379fb586 100644 --- a/src/client/datascience/ipywidgets/webviewIPyWidgetCoordinator.ts +++ b/src/client/datascience/ipywidgets/webviewIPyWidgetCoordinator.ts @@ -16,25 +16,25 @@ import { CommonMessageCoordinator } from './commonMessageCoordinator'; */ @injectable() export class WebviewIPyWidgetCoordinator implements IInteractiveWindowListener { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public get postMessage(): Event<{ message: string; payload: any }> { return this.postEmitter.event; } - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public get postInternalMessage(): Event<{ message: string; payload: any }> { return this.postInternalMessageEmitter.event; } private notebookIdentity: Uri | undefined; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any private postEmitter: EventEmitter<{ message: string; payload: any }> = new EventEmitter<{ message: string; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any payload: any; }>(); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any private postInternalMessageEmitter: EventEmitter<{ message: string; payload: any }> = new EventEmitter<{ message: string; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any payload: any; }>(); private messageCoordinator: CommonMessageCoordinator | undefined; @@ -47,7 +47,7 @@ export class WebviewIPyWidgetCoordinator implements IInteractiveWindowListener { this.messageCoordinator?.dispose(); // NOSONAR } - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public onMessage(message: string, payload?: any): void { if (message === InteractiveWindowMessages.NotebookIdentity) { this.saveIdentity(payload).catch((ex) => traceError('Failed to initialize ipywidgetHandler', ex)); @@ -64,7 +64,7 @@ export class WebviewIPyWidgetCoordinator implements IInteractiveWindowListener { this.notebookIdentity = args.resource; const emitter = new EventEmitter<{ message: string; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any payload: any; }>(); this.messageCoordinatorEvent = emitter.event((e) => { diff --git a/src/client/datascience/jupyter/commandLineSelector.ts b/src/client/datascience/jupyter/commandLineSelector.ts index 3f0eb69145a..ac38d14b3e6 100644 --- a/src/client/datascience/jupyter/commandLineSelector.ts +++ b/src/client/datascience/jupyter/commandLineSelector.ts @@ -4,7 +4,7 @@ 'use strict'; import { inject, injectable } from 'inversify'; -// tslint:disable-next-line: import-name +// eslint-disable-next-line import parseArgsStringToArgv from 'string-argv'; import { ConfigurationChangeEvent, ConfigurationTarget, QuickPickItem, Uri } from 'vscode'; import { IApplicationShell, ICommandManager, IWorkspaceService } from '../../common/application/types'; diff --git a/src/client/datascience/jupyter/debuggerVariables.ts b/src/client/datascience/jupyter/debuggerVariables.ts index dd791ef83e5..a7b76a162c5 100644 --- a/src/client/datascience/jupyter/debuggerVariables.ts +++ b/src/client/datascience/jupyter/debuggerVariables.ts @@ -111,7 +111,7 @@ export class DebuggerVariables extends DebugLocationTracker // Then eval calling the main function with our target variable const results = await this.evaluate( `${DataFrameLoading.DataFrameInfoImportFunc}(${targetVariable.name})`, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (targetVariable as any).frameId ); @@ -146,7 +146,7 @@ export class DebuggerVariables extends DebugLocationTracker // Since the debugger splits up long requests, split this based on the number of items. // Maximum 100 cells at a time or one row - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any let output: any; const minnedEnd = Math.min(targetVariable.rowCount || 0, end); const totalRowCount = end - start; @@ -156,7 +156,7 @@ export class DebuggerVariables extends DebugLocationTracker const chunkEnd = Math.min(pos + chunkSize, minnedEnd); const results = await this.evaluate( `${DataFrameLoading.DataFrameRowImportFunc}(${targetVariable.name}, ${pos}, ${chunkEnd})`, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (targetVariable as any).frameId ); const chunkResults = JSON.parse(results.result); @@ -175,7 +175,7 @@ export class DebuggerVariables extends DebugLocationTracker } // This special DebugAdapterTracker function listens to messages sent from the debug adapter to VS Code - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public onDidSendMessage(message: any) { super.onDidSendMessage(message); // When the initialize response comes back, indicate we have started. @@ -183,7 +183,7 @@ export class DebuggerVariables extends DebugLocationTracker this.debuggingStarted = true; } else if (message.type === 'response' && message.command === 'variables' && message.body) { // If using the interactive debugger, update our variables. - // tslint:disable-next-line: no-suspicious-comment + // eslint-disable-next-line // TODO: Figure out what resource to use this.updateVariables(undefined, message as DebugProtocol.VariablesResponse); this.monkeyPatchDataViewableVariables(message); @@ -223,7 +223,7 @@ export class DebuggerVariables extends DebugLocationTracker this.importedGetVariableInfoScriptsIntoKernel.delete(key); } - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any private async evaluate(code: string, frameId?: number): Promise { if (this.debugService.activeDebugSession) { const results = await this.debugService.activeDebugSession.customRequest('evaluate', { @@ -277,7 +277,7 @@ export class DebuggerVariables extends DebugLocationTracker // Then eval calling the variable info function with our target variable const results = await this.evaluate( `${GetVariableInfo.VariableInfoImportFunc}(${variable.name})`, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (variable as any).frameId ); if (results && results.result) { @@ -296,7 +296,7 @@ export class DebuggerVariables extends DebugLocationTracker private monkeyPatchDataViewableVariables(variablesResponse: DebugProtocol.VariablesResponse) { variablesResponse.body.variables.forEach((v) => { if (v.type && DataViewableTypes.has(v.type)) { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (v as any).__vscodeVariableMenuContext = 'viewableInDataViewer'; } }); diff --git a/src/client/datascience/jupyter/interpreter/jupyterCommand.ts b/src/client/datascience/jupyter/interpreter/jupyterCommand.ts index 7204f12a3b2..2f61ae9bfeb 100644 --- a/src/client/datascience/jupyter/interpreter/jupyterCommand.ts +++ b/src/client/datascience/jupyter/interpreter/jupyterCommand.ts @@ -177,7 +177,7 @@ export class InterpreterJupyterNotebookCommand extends InterpreterJupyterCommand * @class InterpreterJupyterKernelSpecCommand * @implements {IJupyterCommand} */ -// tslint:disable-next-line: max-classes-per-file +// eslint-disable-next-line max-classes-per-file export class InterpreterJupyterKernelSpecCommand extends InterpreterJupyterCommand { constructor( moduleName: string, @@ -290,7 +290,7 @@ export class InterpreterJupyterKernelSpecCommand extends InterpreterJupyterComma } } -// tslint:disable-next-line: max-classes-per-file +// eslint-disable-next-line max-classes-per-file @injectable() export class JupyterCommandFactory implements IJupyterCommandFactory { constructor( diff --git a/src/client/datascience/jupyter/jupyterCellOutputMimeTypeTracker.ts b/src/client/datascience/jupyter/jupyterCellOutputMimeTypeTracker.ts index 7f8c417223a..68f62e3ade3 100644 --- a/src/client/datascience/jupyter/jupyterCellOutputMimeTypeTracker.ts +++ b/src/client/datascience/jupyter/jupyterCellOutputMimeTypeTracker.ts @@ -9,7 +9,7 @@ import { IExtensionSingleActivationService } from '../../activation/types'; import { captureTelemetry, sendTelemetryEvent } from '../../telemetry'; import { Telemetry } from '../constants'; import { CellState, ICell, INotebookEditor, INotebookEditorProvider, INotebookExecutionLogger } from '../types'; -// tslint:disable-next-line:no-require-imports no-var-requires +// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires const flatten = require('lodash/flatten') as typeof import('lodash/flatten'); @injectable() @@ -57,7 +57,7 @@ export class CellOutputMimeTypeTracker implements IExtensionSingleActivationServ if (cell.data.cell_type !== 'code') { return []; } - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const outputs: nbformat.IOutput[] = cell.data.outputs as any; if (!Array.isArray(outputs)) { return []; @@ -73,7 +73,7 @@ export class CellOutputMimeTypeTracker implements IExtensionSingleActivationServ } } private getOutputMimeTypes(output: nbformat.IOutput): string[] { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const outputType: nbformat.OutputType = output.output_type as any; switch (outputType) { case 'error': @@ -83,7 +83,7 @@ export class CellOutputMimeTypeTracker implements IExtensionSingleActivationServ case 'display_data': case 'update_display_data': case 'execute_result': - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const data = (output as any).data; return data ? Object.keys(data) : []; default: @@ -96,7 +96,7 @@ export class CellOutputMimeTypeTracker implements IExtensionSingleActivationServ // If already scheduled, cancel. const currentTimeout = this.pendingChecks.get(id); if (currentTimeout) { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any clearTimeout(currentTimeout as any); this.pendingChecks.delete(id); } diff --git a/src/client/datascience/jupyter/jupyterConnection.ts b/src/client/datascience/jupyter/jupyterConnection.ts index 0406dcc0fbc..eb6eb4caad6 100644 --- a/src/client/datascience/jupyter/jupyterConnection.ts +++ b/src/client/datascience/jupyter/jupyterConnection.ts @@ -19,7 +19,7 @@ import { RegExpValues } from '../constants'; import { IJupyterConnection } from '../types'; import { JupyterConnectError } from './jupyterConnectError'; -// tslint:disable-next-line:no-require-imports no-var-requires no-any +// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires, @typescript-eslint/no-explicit-any const namedRegexp = require('named-js-regexp'); const urlMatcher = namedRegexp(RegExpValues.UrlPatternRegEx); @@ -96,7 +96,7 @@ export class JupyterConnectionWaiter implements IDisposable { ); } public dispose() { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any clearTimeout(this.launchTimeout as any); this.subscriptions.forEach((d) => d.unsubscribe()); } @@ -106,11 +106,11 @@ export class JupyterConnectionWaiter implements IDisposable { } private createConnection(baseUrl: string, token: string, hostName: string, processDisposable: Disposable) { - // tslint:disable-next-line: no-use-before-declare + // eslint-disable-next-line @typescript-eslint/no-use-before-define return new JupyterConnection(baseUrl, token, hostName, this.rootDir, processDisposable, this.launchResult.proc); } - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any private output(data: any) { if (!this.connectionDisposed) { traceInfo(data.toString('utf8')); @@ -118,7 +118,7 @@ export class JupyterConnectionWaiter implements IDisposable { } // From a list of jupyter server infos try to find the matching jupyter that we launched - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any private getJupyterURL(serverInfos: JupyterServerInfo[] | undefined, data: any) { if (serverInfos && serverInfos.length > 0 && !this.startPromise.completed) { const matchInfo = serverInfos.find((info) => @@ -138,9 +138,9 @@ export class JupyterConnectionWaiter implements IDisposable { } } - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any private getJupyterURLFromString(data: any) { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const urlMatch = urlMatcher.exec(data) as any; const groups = urlMatch.groups() as RegExpValues.IUrlPatternGroupType; if (urlMatch && !this.startPromise.completed && groups && (groups.LOCAL || groups.IP)) { @@ -149,7 +149,7 @@ export class JupyterConnectionWaiter implements IDisposable { const uriString = `${groups.PREFIX}${host}${groups.REST}`; // URL is not being found for some reason. Pull it in forcefully - // tslint:disable-next-line:no-require-imports + // eslint-disable-next-line @typescript-eslint/no-require-imports const URL = require('url').URL; let url: URL; try { @@ -169,7 +169,7 @@ export class JupyterConnectionWaiter implements IDisposable { } } - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any private extractConnectionInformation = (data: any) => { this.output(data); @@ -193,7 +193,7 @@ export class JupyterConnectionWaiter implements IDisposable { }; private resolveStartPromise = (baseUrl: string, token: string, hostName: string) => { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any clearTimeout(this.launchTimeout as any); if (!this.startPromise.rejected) { const connection = this.createConnection(baseUrl, token, hostName, this.launchResult); @@ -207,9 +207,9 @@ export class JupyterConnectionWaiter implements IDisposable { } }; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any private rejectStartPromise = (message: string) => { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any clearTimeout(this.launchTimeout as any); if (!this.startPromise.resolved) { this.startPromise.reject( diff --git a/src/client/datascience/jupyter/jupyterDebugger.ts b/src/client/datascience/jupyter/jupyterDebugger.ts index 09998b1f774..e9c022a033f 100644 --- a/src/client/datascience/jupyter/jupyterDebugger.ts +++ b/src/client/datascience/jupyter/jupyterDebugger.ts @@ -138,7 +138,7 @@ export class JupyterDebugger implements IJupyterDebugger, ICellHashListener { traceInfo('connected to notebook during debugging'); // First check if this is a live share session. Skip debugging attach on the guest - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const hasRole = (notebook as any) as ILiveShareHasRole; if (hasRole && hasRole.role && hasRole.role === vsls.Role.Guest) { traceInfo('guest mode attach skipped'); @@ -221,7 +221,7 @@ export class JupyterDebugger implements IJupyterDebugger, ICellHashListener { const extraPaths: string[] = []; // Add the settings path first as it takes precedence over the ptvsd extension path - // tslint:disable-next-line:no-multiline-string + // eslint-disable-next-line no-multi-str let settingsPath = this.configService.getSettings(notebook.resource).debugpyDistPath; // Escape windows path chars so they end up in the source escaped if (settingsPath) { @@ -330,7 +330,7 @@ export class JupyterDebugger implements IJupyterDebugger, ICellHashListener { if (outputs.length > 0) { const data = outputs[0].data; if (data && data.hasOwnProperty('text/plain')) { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any return concatMultilineString((data as any)['text/plain']); } if (outputs[0].output_type === 'stream') { @@ -367,7 +367,7 @@ export class JupyterDebugger implements IJupyterDebugger, ICellHashListener { // `import ptvsd // ptvsd.enable_attach(('0.0.0.0', ${portNumber})) // print("('${connectionInfo.hostName}', ${portNumber})")` : - // // tslint:disable-next-line: no-multiline-string + // eslint-disable-next-line no-multi-str // `import ptvsd // port = ${Settings.RemoteDebuggerPortBegin} // attached = False diff --git a/src/client/datascience/jupyter/jupyterExecution.ts b/src/client/datascience/jupyter/jupyterExecution.ts index f6b2190ea70..19eaaa71329 100644 --- a/src/client/datascience/jupyter/jupyterExecution.ts +++ b/src/client/datascience/jupyter/jupyterExecution.ts @@ -124,13 +124,13 @@ export class JupyterExecutionBase implements IJupyterExecution { return this.isNotebookSupported(cancelToken); } - //tslint:disable:cyclomatic-complexity max-func-body-length + /* eslint-disable complexity, */ public connectToNotebookServer( options?: INotebookServerOptions, cancelToken?: CancellationToken ): Promise { // Return nothing if we cancel - // tslint:disable-next-line: max-func-body-length + // eslint-disable-next-line return Cancellation.race(async () => { let result: INotebookServer | undefined; let connection: IJupyterConnection | undefined; @@ -212,7 +212,7 @@ export class JupyterExecutionBase implements IJupyterExecution { purpose: options ? options.purpose : uuid() }; - // tslint:disable-next-line: no-constant-condition + // eslint-disable-next-line no-constant-condition while (true) { try { traceInfo( @@ -385,7 +385,7 @@ export class JupyterExecutionBase implements IJupyterExecution { } } - // tslint:disable-next-line: max-func-body-length + // eslint-disable-next-line @captureTelemetry(Telemetry.StartJupyter) private async startNotebookServer( useDefaultConfig: boolean, @@ -410,7 +410,7 @@ export class JupyterExecutionBase implements IJupyterExecution { } private clearTimeouts() { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any this.pendingTimeouts.forEach((t) => clearTimeout(t as any)); this.pendingTimeouts = []; } diff --git a/src/client/datascience/jupyter/jupyterExecutionFactory.ts b/src/client/datascience/jupyter/jupyterExecutionFactory.ts index c2bed0117d7..c79a482148a 100644 --- a/src/client/datascience/jupyter/jupyterExecutionFactory.ts +++ b/src/client/datascience/jupyter/jupyterExecutionFactory.ts @@ -27,7 +27,7 @@ import { NotebookStarter } from './notebookStarter'; interface IJupyterExecutionInterface extends IRoleBasedObject, IJupyterExecution {} -// tslint:disable:callable-types +/* eslint-disable @typescript-eslint/prefer-function-type */ type JupyterExecutionClassType = { new ( liveShare: ILiveShareApi, @@ -44,7 +44,7 @@ type JupyterExecutionClassType = { serviceContainer: IServiceContainer ): IJupyterExecutionInterface; }; -// tslint:enable:callable-types +/* eslint-enable @typescript-eslint/prefer-function-type */ @injectable() export class JupyterExecutionFactory implements IJupyterExecution, IAsyncDisposable { diff --git a/src/client/datascience/jupyter/jupyterExporter.ts b/src/client/datascience/jupyter/jupyterExporter.ts index 25538f549e7..14da73ba3f9 100644 --- a/src/client/datascience/jupyter/jupyterExporter.ts +++ b/src/client/datascience/jupyter/jupyterExporter.ts @@ -57,7 +57,7 @@ export class JupyterExporter implements INotebookExporter { const notebook = await this.translateToNotebook(cells, directoryChange); try { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const contents = JSON.stringify(notebook); await this.trustService.trustNotebook(Uri.file(file), contents); await this.fileSystem.writeFile(Uri.file(file), contents); @@ -116,7 +116,7 @@ export class JupyterExporter implements INotebookExporter { version: pythonNumber }, orig_nbformat: 2, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any kernelspec: kernelSpec as any }; diff --git a/src/client/datascience/jupyter/jupyterImporter.ts b/src/client/datascience/jupyter/jupyterImporter.ts index 8cb3ffdcf8d..1e1ff1081d7 100644 --- a/src/client/datascience/jupyter/jupyterImporter.ts +++ b/src/client/datascience/jupyter/jupyterImporter.ts @@ -23,7 +23,7 @@ export class JupyterImporter implements INotebookImporter { public isDisposed: boolean = false; // Template that changes markdown cells to have # %% [markdown] in the comments private readonly nbconvertBaseTemplateFormat = - // tslint:disable-next-line:no-multiline-string + // eslint-disable-next-line no-multi-str `{%- extends '{0}' -%} {% block codecell %} {1} diff --git a/src/client/datascience/jupyter/jupyterNotebook.ts b/src/client/datascience/jupyter/jupyterNotebook.ts index 24cf7282ff1..c0f52370aaa 100644 --- a/src/client/datascience/jupyter/jupyterNotebook.ts +++ b/src/client/datascience/jupyter/jupyterNotebook.ts @@ -37,7 +37,7 @@ import { import { expandWorkingDir } from './jupyterUtils'; import { KernelConnectionMetadata } from './kernels/types'; -// tslint:disable-next-line: no-require-imports +// eslint-disable-next-line @typescript-eslint/no-require-imports import cloneDeep = require('lodash/cloneDeep'); import { concatMultilineString, formatStreamText, splitMultilineString } from '../../../datascience-ui/common'; import { PYTHON_LANGUAGE } from '../../common/constants'; @@ -93,7 +93,7 @@ class CellSubscriber { } } - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public error(sessionStartTime: number | undefined, err: any) { if (this.isValid(sessionStartTime)) { this.subscriber.error(err); @@ -113,7 +113,7 @@ class CellSubscriber { this.attemptToFinish(); } - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public reject(e: any) { if (!this.deferred.completed) { this.cellRef.state = CellState.error; @@ -278,7 +278,7 @@ export class JupyterNotebookBase implements INotebook { } // Set up our initial plotting and imports - // tslint:disable-next-line: cyclomatic-complexity + // eslint-disable-next-line complexity public async initialize(cancelToken?: CancellationToken): Promise { if (this.ranInitialSetup) { return; @@ -704,9 +704,9 @@ export class JupyterNotebookBase implements INotebook { public sendCommMessage( buffers: (ArrayBuffer | ArrayBufferView)[], content: { comm_id: string; data: JSONObject; target_name: string | undefined }, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any metadata: any, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any msgId: any ): Kernel.IShellFuture< KernelMessage.IShellMessage<'comm_msg'>, @@ -848,7 +848,7 @@ export class JupyterNotebookBase implements INotebook { private generateRequest = ( code: string, silent?: boolean, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any metadata?: Record ): Kernel.IShellFuture | undefined => { //traceInfo(`Executing code in jupyter : ${code}`); @@ -955,12 +955,12 @@ export class JupyterNotebookBase implements INotebook { silent: boolean | undefined, clearState: RefBool, msg: KernelMessage.IIOPubMessage - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any ) { // Let our loggers get a first crack at the message. They may change it this.getLoggers().forEach((f) => (msg = f.preHandleIOPub ? f.preHandleIOPub(msg) : msg)); - // tslint:disable-next-line:no-require-imports + // eslint-disable-next-line @typescript-eslint/no-require-imports const jupyterLab = require('@jupyterlab/services') as typeof import('@jupyterlab/services'); // Create a trimming function. Only trim user output. Silent output requires the full thing @@ -1059,7 +1059,7 @@ export class JupyterNotebookBase implements INotebook { clearState: RefBool, msg: KernelMessage.IShellControlMessage ) { - // tslint:disable-next-line:no-require-imports + // eslint-disable-next-line @typescript-eslint/no-require-imports const jupyterLab = require('@jupyterlab/services') as typeof import('@jupyterlab/services'); // Create a trimming function. Only trim user output. Silent output requires the full thing @@ -1078,7 +1078,7 @@ export class JupyterNotebookBase implements INotebook { } } - // tslint:disable-next-line: max-func-body-length + // eslint-disable-next-line private handleCodeRequest = (subscriber: CellSubscriber, silent?: boolean) => { // Generate a new request if we still can if (subscriber.isValid(this.sessionStartTime)) { @@ -1235,7 +1235,7 @@ export class JupyterNotebookBase implements INotebook { // Check our length on text output if (msg.content.data && msg.content.data.hasOwnProperty('text/plain')) { msg.content.data['text/plain'] = splitMultilineString( - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any trimFunc(concatMultilineString(msg.content.data['text/plain'] as any)) ); } @@ -1246,7 +1246,7 @@ export class JupyterNotebookBase implements INotebook { output_type: 'execute_result', data: msg.content.data, metadata: msg.content.metadata, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any transient: msg.content.transient as any, // NOSONAR execution_count: msg.content.execution_count }, @@ -1264,7 +1264,7 @@ export class JupyterNotebookBase implements INotebook { if (reply.payload) { reply.payload.forEach((o) => { if (o.data && o.data.hasOwnProperty('text/plain')) { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const str = concatMultilineString((o.data as any)['text/plain']); // NOSONAR const data = trimFunc(str); this.addToCellData( @@ -1315,7 +1315,7 @@ export class JupyterNotebookBase implements INotebook { : undefined; if (existing) { const originalText = formatStreamText( - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any `${concatMultilineString(existing.text as any)}${concatMultilineString(msg.content.text)}` ); originalTextLength = originalText.length; @@ -1356,7 +1356,7 @@ export class JupyterNotebookBase implements INotebook { output_type: 'display_data', data: newData, metadata: msg.content.metadata, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any transient: msg.content.transient as any // NOSONAR }; this.addToCellData(cell, output, clearState); @@ -1404,7 +1404,7 @@ export class JupyterNotebookBase implements INotebook { traceback: msg.content.traceback }; if (msg.content.hasOwnProperty('transient')) { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any output.transient = (msg.content as any).transient; } this.addToCellData(cell, output, clearState); diff --git a/src/client/datascience/jupyter/jupyterRequest.ts b/src/client/datascience/jupyter/jupyterRequest.ts index 027103fb8d8..e037a1fef5d 100644 --- a/src/client/datascience/jupyter/jupyterRequest.ts +++ b/src/client/datascience/jupyter/jupyterRequest.ts @@ -4,7 +4,7 @@ import * as nodeFetch from 'node-fetch'; // Function for creating node Request object that prevents jupyterlab services from writing its own // authorization header. -// tslint:disable: no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ export function createAuthorizingRequest(getAuthHeader: () => any) { class AuthorizingRequest extends nodeFetch.Request { constructor(input: nodeFetch.RequestInfo, init?: nodeFetch.RequestInit) { diff --git a/src/client/datascience/jupyter/jupyterServerWrapper.ts b/src/client/datascience/jupyter/jupyterServerWrapper.ts index 5228b6cdc67..620893177a9 100644 --- a/src/client/datascience/jupyter/jupyterServerWrapper.ts +++ b/src/client/datascience/jupyter/jupyterServerWrapper.ts @@ -39,7 +39,7 @@ import { ILiveShareHasRole } from './liveshare/types'; interface IJupyterServerInterface extends IRoleBasedObject, INotebookServer {} -// tslint:disable:callable-types +/* eslint-disable @typescript-eslint/prefer-function-type */ type JupyterServerClassType = { new ( liveShare: ILiveShareApi, @@ -59,7 +59,7 @@ type JupyterServerClassType = { extensionChecker: IPythonExtensionChecker ): IJupyterServerInterface; }; -// tslint:enable:callable-types +/* eslint-enable @typescript-eslint/prefer-function-type */ // This class wraps either a HostJupyterServer or a GuestJupyterServer based on the liveshare state. It abstracts // out the live share specific parts. diff --git a/src/client/datascience/jupyter/jupyterSession.ts b/src/client/datascience/jupyter/jupyterSession.ts index ff8f705a289..1ce014dbda2 100644 --- a/src/client/datascience/jupyter/jupyterSession.ts +++ b/src/client/datascience/jupyter/jupyterSession.ts @@ -114,7 +114,7 @@ export class JupyterSession extends BaseJupyterSession { } let result: ISessionWithSocket | undefined; let tryCount = 0; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any let exception: any; while (tryCount < 3) { try { @@ -210,7 +210,7 @@ export class JupyterSession extends BaseJupyterSession { ); // Add on the kernel sock information - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (session as any).kernelSocketInformation = { socket: JupyterWebSockets.get(session.kernel.id), options: { diff --git a/src/client/datascience/jupyter/jupyterSessionManager.ts b/src/client/datascience/jupyter/jupyterSessionManager.ts index a80f55bc87e..eb9e1587678 100644 --- a/src/client/datascience/jupyter/jupyterSessionManager.ts +++ b/src/client/datascience/jupyter/jupyterSessionManager.ts @@ -31,7 +31,7 @@ import { KernelConnectionMetadata } from './kernels/types'; // Key for our insecure connection global state const GlobalStateUserAllowsInsecureConnections = 'DataScienceAllowInsecureConnections'; -// tslint:disable: no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ export class JupyterSessionManager implements IJupyterSessionManager { private static secureServers = new Map>(); @@ -45,7 +45,7 @@ export class JupyterSessionManager implements IJupyterSessionManager { private restartSessionUsedEvent = new EventEmitter(); private get jupyterlab(): typeof import('@jupyterlab/services') { if (!this._jupyterlab) { - // tslint:disable-next-line: no-require-imports + // eslint-disable-next-line @typescript-eslint/no-require-imports this._jupyterlab = require('@jupyterlab/services'); } return this._jupyterlab!; @@ -85,7 +85,7 @@ export class JupyterSessionManager implements IJupyterSessionManager { // Make sure it finishes startup. await Promise.race([sleep(10_000), this.sessionManager.ready]); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const sessionManager = this.sessionManager as any; this.sessionManager.dispose(); // Note, shutting down all will kill all kernels on the same connection. We don't want that. this.sessionManager = undefined; @@ -237,7 +237,7 @@ export class JupyterSessionManager implements IJupyterSessionManager { } } - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any private clearPoll(poll: { _timeout: any }) { try { clearTimeout(poll._timeout); @@ -258,10 +258,10 @@ export class JupyterSessionManager implements IJupyterSessionManager { await this.secureConnectionCheck(connInfo); // Agent is allowed to be set on this object, but ts doesn't like it on RequestInit, so any - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any let requestInit: any = { cache: 'no-store', credentials: 'same-origin' }; let cookieString; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any let requestCtor: any = nodeFetch.Request; // If authorization header is provided, then we need to prevent jupyterlab services from @@ -317,15 +317,15 @@ export class JupyterSessionManager implements IJupyterSessionManager { cookieString, allowUnauthorized, connInfo.getAuthHeader - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any ) as any, // Redefine fetch to our node-modules so it picks up the correct version. // Typecasting as any works fine as long as all 3 of these are the same version - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any fetch: nodeFetch.default as any, - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any Request: requestCtor, - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any Headers: nodeFetch.Headers as any }; diff --git a/src/client/datascience/jupyter/jupyterWebSocket.ts b/src/client/datascience/jupyter/jupyterWebSocket.ts index f11ed928129..8e9dc028644 100644 --- a/src/client/datascience/jupyter/jupyterWebSocket.ts +++ b/src/client/datascience/jupyter/jupyterWebSocket.ts @@ -7,7 +7,7 @@ import { noop } from '../../common/utils/misc'; import { KernelSocketWrapper } from '../kernelSocketWrapper'; import { IKernelSocket } from '../types'; -// tslint:disable: no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ export const JupyterWebSockets = new Map(); // NOSONAR // We need to override the websocket that jupyter lab services uses to put in our cookie information diff --git a/src/client/datascience/jupyter/kernelVariables.ts b/src/client/datascience/jupyter/kernelVariables.ts index 9a0f41b4c89..03efec8a38c 100644 --- a/src/client/datascience/jupyter/kernelVariables.ts +++ b/src/client/datascience/jupyter/kernelVariables.ts @@ -24,7 +24,7 @@ import { import { JupyterDataRateLimitError } from './jupyterDataRateLimitError'; import { getKernelConnectionLanguage, isPythonKernelConnection } from './kernels/helpers'; -// tslint:disable-next-line: no-var-requires no-require-imports +// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports // Regexes for parsing data from Python kernel. Not sure yet if other // kernels will add the ansi encoding. @@ -251,7 +251,7 @@ export class KernelVariables implements IJupyterVariables { if (codeCellOutput && codeCellOutput.output_type === 'execute_result') { const data = codeCellOutput.data; if (data && data.hasOwnProperty('text/plain')) { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any return (data as any)['text/plain']; } } @@ -315,7 +315,7 @@ export class KernelVariables implements IJupyterVariables { private getAllMatches(regex: RegExp, text: string): string[] { const result: string[] = []; let m: RegExpExecArray | null = null; - // tslint:disable-next-line: no-conditional-assignment + // eslint-disable-next-line no-cond-assign while ((m = regex.exec(text)) !== null) { if (m.index === regex.lastIndex) { regex.lastIndex += 1; @@ -420,7 +420,7 @@ export class KernelVariables implements IJupyterVariables { return []; } - // tslint:disable-next-line: cyclomatic-complexity + // eslint-disable-next-line complexity private async getVariableValueFromKernel( targetVariable: IJupyterVariable, notebook: INotebook, @@ -432,7 +432,7 @@ export class KernelVariables implements IJupyterVariables { // Should be a text/plain inside of it (at least IPython does this) if (output && output.hasOwnProperty('text/plain')) { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const text = (output as any)['text/plain'].toString(); // Parse into bits diff --git a/src/client/datascience/jupyter/kernels/cellExecution.ts b/src/client/datascience/jupyter/kernels/cellExecution.ts index ba5a42b45b8..f2996643971 100644 --- a/src/client/datascience/jupyter/kernels/cellExecution.ts +++ b/src/client/datascience/jupyter/kernels/cellExecution.ts @@ -49,7 +49,7 @@ import { } from '../../types'; import { translateCellFromNative } from '../../utils'; import { IKernel } from './types'; -// tslint:disable-next-line: no-var-requires no-require-imports +// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports const vscodeNotebookEnums = require('vscode') as typeof import('vscode-proposed'); export class CellExecutionFactory { @@ -62,7 +62,7 @@ export class CellExecutionFactory { ) {} public create(cell: NotebookCell, isPythonKernelConnection: boolean) { - // tslint:disable-next-line: no-use-before-declare + // eslint-disable-next-line @typescript-eslint/no-use-before-define return CellExecution.fromCell( this.vscNotebook.notebookEditors.find((e) => e.document === cell.notebook)!, cell, @@ -399,7 +399,7 @@ export class CellExecution { private async executeCodeCell(code: string, session: IJupyterSession, loggers: INotebookExecutionLogger[]) { // Generate metadata from our cell (some kernels expect this.) - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const metadata: any = { ...(this.cell.metadata?.custom?.metadata || {}), // Send the Cell Metadata ...{ cellId: this.cell.uri.toString() } @@ -499,7 +499,7 @@ export class CellExecution { // Let our loggers get a first crack at the message. They may change it loggers.forEach((f) => (msg = f.preHandleIOPub ? f.preHandleIOPub(msg) : msg)); - // tslint:disable-next-line:no-require-imports + // eslint-disable-next-line @typescript-eslint/no-require-imports const jupyterLab = require('@jupyterlab/services') as typeof import('@jupyterlab/services'); try { @@ -601,7 +601,7 @@ export class CellExecution { output_type: 'execute_result', data: msg.content.data, metadata: msg.content.metadata, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any transient: msg.content.transient as any, // NOSONAR execution_count: msg.content.execution_count }, @@ -619,7 +619,7 @@ export class CellExecution { { // Mark as stream output so the text is formatted because it likely has ansi codes in it. output_type: 'stream', - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any text: (o.data as any)['text/plain'].toString(), name: 'stdout', metadata: {}, @@ -643,7 +643,7 @@ export class CellExecution { traceCellMessage(this.cell, `Kernel switching to ${msg.content.execution_state}`); } private async handleStreamMessage(msg: KernelMessage.IStreamMsg, clearState: RefBool) { - // tslint:disable-next-line: cyclomatic-complexity + // eslint-disable-next-line complexity await chainWithPendingUpdates(this.editor, (edit) => { traceCellMessage(this.cell, 'Update streamed output'); let exitingCellOutput = this.cell.outputs; @@ -679,7 +679,7 @@ export class CellExecution { existingOutput = existingOutputLines.join('\n'); newContent = newContent.substring(moveUpCode.length); } - // tslint:disable-next-line:restrict-plus-operands + // eslint-disable-next-line @typescript-eslint/restrict-plus-operands existing.data['text/plain'] = formatStreamText(concatMultilineString(`${existingOutput}${newContent}`)); edit.replaceCellOutput(this.cell.index, [...exitingCellOutput]); // This is necessary to get VS code to update (for now) } else { @@ -700,7 +700,7 @@ export class CellExecution { output_type: 'display_data', data: handleTensorBoardDisplayDataOutput(msg.content.data), metadata: msg.content.metadata, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any transient: msg.content.transient as any // NOSONAR }; await this.addToCellData(output, clearState); @@ -732,7 +732,7 @@ export class CellExecution { @swallowExceptions() private async handleReply(clearState: RefBool, msg: KernelMessage.IShellControlMessage) { - // tslint:disable-next-line:no-require-imports + // eslint-disable-next-line @typescript-eslint/no-require-imports const jupyterLab = require('@jupyterlab/services') as typeof import('@jupyterlab/services'); if (jupyterLab.KernelMessage.isExecuteReplyMsg(msg)) { diff --git a/src/client/datascience/jupyter/kernels/helpers.ts b/src/client/datascience/jupyter/kernels/helpers.ts index e08f0b2234c..b66d04c6612 100644 --- a/src/client/datascience/jupyter/kernels/helpers.ts +++ b/src/client/datascience/jupyter/kernels/helpers.ts @@ -6,10 +6,10 @@ import type { Kernel } from '@jupyterlab/services'; import * as fastDeepEqual from 'fast-deep-equal'; import { IJupyterKernelSpec } from '../../types'; import { JupyterKernelSpec } from './jupyterKernelSpec'; -// tslint:disable-next-line: no-var-requires no-require-imports +// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports const NamedRegexp = require('named-js-regexp') as typeof import('named-js-regexp'); import { nbformat } from '@jupyterlab/coreutils'; -// tslint:disable-next-line: no-require-imports +// eslint-disable-next-line @typescript-eslint/no-require-imports import cloneDeep = require('lodash/cloneDeep'); import { PYTHON_LANGUAGE } from '../../../common/constants'; import { ReadWrite } from '../../../common/types'; @@ -143,7 +143,7 @@ export function getLanguageInNotebookMetadata(metadata?: nbformat.INotebookMetad return; } // If kernel spec is defined & we have a language in that, then use that information. - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const kernelSpec: IJupyterKernelSpec | undefined = metadata.kernelspec as any; // When a kernel spec is stored in ipynb, the `language` of the kernel spec is also saved. // Unfortunately there's no strong typing for this. @@ -242,7 +242,7 @@ export function detectDefaultKernelName(name: string) { } export function cleanEnvironment(spec: T): T { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const copy = cloneDeep(spec) as { env?: any }; if (copy.env) { diff --git a/src/client/datascience/jupyter/kernels/jupyterKernelSpec.ts b/src/client/datascience/jupyter/kernels/jupyterKernelSpec.ts index 350a0d531cb..2adda492f27 100644 --- a/src/client/datascience/jupyter/kernels/jupyterKernelSpec.ts +++ b/src/client/datascience/jupyter/kernels/jupyterKernelSpec.ts @@ -22,7 +22,7 @@ export class JupyterKernelSpec implements IJupyterKernelSpec { public argv: string[]; public interrupt_mode?: 'message' | 'signal'; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public metadata?: Record & { interpreter?: Partial }; constructor( specModel: Kernel.ISpecModel, @@ -35,9 +35,9 @@ export class JupyterKernelSpec implements IJupyterKernelSpec { this.path = specModel.argv && specModel.argv.length > 0 ? specModel.argv[0] : ''; this.display_name = specModel.display_name; this.metadata = specModel.metadata; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any this.env = specModel.env as any; // JSONObject, but should match - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any this.interrupt_mode = specModel.interrupt_mode as any; } } diff --git a/src/client/datascience/jupyter/kernels/kernelExecution.ts b/src/client/datascience/jupyter/kernels/kernelExecution.ts index 405593c3926..c271432e013 100644 --- a/src/client/datascience/jupyter/kernels/kernelExecution.ts +++ b/src/client/datascience/jupyter/kernels/kernelExecution.ts @@ -21,7 +21,7 @@ import { import { CellExecution, CellExecutionFactory } from './cellExecution'; import { isPythonKernelConnection } from './helpers'; import type { IKernel, IKernelProvider, IKernelSelectionUsage, KernelConnectionMetadata } from './types'; -// tslint:disable-next-line: no-var-requires no-require-imports +// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports const vscodeNotebookEnums = require('vscode') as typeof import('vscode-proposed'); /** diff --git a/src/client/datascience/jupyter/kernels/kernelSelections.ts b/src/client/datascience/jupyter/kernels/kernelSelections.ts index 69d34ac127d..947c363ea5d 100644 --- a/src/client/datascience/jupyter/kernels/kernelSelections.ts +++ b/src/client/datascience/jupyter/kernels/kernelSelections.ts @@ -34,7 +34,7 @@ import { } from './types'; // Small classes, hence all put into one file. -// tslint:disable: max-classes-per-file +/* eslint-disable max-classes-per-file */ const isSimplePythonDisplayName = /python\s?\d?\.?\d?/; /** @@ -133,7 +133,7 @@ export class ActiveJupyterSessionKernelSelectionListProvider const matchingSpec: Partial = kernelSpecs.find((spec) => spec.name === item.kernel.name) || {}; const activeKernel = activeKernels.find((active) => active.id === item.kernel.id) || {}; - // tslint:disable-next-line: no-object-literal-type-assertion + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions return { ...item.kernel, ...matchingSpec, @@ -409,7 +409,7 @@ export class KernelSelectionProvider { ) : Promise.resolve([]); - // tslint:disable-next-line: prefer-const + // eslint-disable-next-line prefer-const let [installedKernels, interpreters] = await Promise.all([installedKernelsPromise, interpretersPromise]); interpreters = interpreters diff --git a/src/client/datascience/jupyter/kernels/kernelSelector.ts b/src/client/datascience/jupyter/kernels/kernelSelector.ts index 0ef95ff6e70..3d4d04b021b 100644 --- a/src/client/datascience/jupyter/kernels/kernelSelector.ts +++ b/src/client/datascience/jupyter/kernels/kernelSelector.ts @@ -4,7 +4,7 @@ import type { nbformat } from '@jupyterlab/coreutils'; import type { Kernel } from '@jupyterlab/services'; import { sha256 } from 'hash.js'; import { inject, injectable } from 'inversify'; -// tslint:disable-next-line: no-require-imports +// eslint-disable-next-line @typescript-eslint/no-require-imports import cloneDeep = require('lodash/cloneDeep'); import { CancellationToken } from 'vscode-jsonrpc'; import { IPythonExtensionChecker } from '../../../api/types'; @@ -252,7 +252,7 @@ export class KernelSelector implements IKernelSelectionUsage { * Gets a kernel that needs to be used with a remote session. * (will attempt to find the best matching kernel, or prompt user to use current interpreter or select one). */ - // tslint:disable-next-line: cyclomatic-complexity + // eslint-disable-next-line complexity @reportAction(ReportableAction.KernelsGetKernelForRemoteConnection) public async getPreferredKernelForRemoteConnection( resource: Resource, @@ -275,7 +275,7 @@ export class KernelSelector implements IKernelSelectionUsage { if (preferredKernelId) { const session = sessions?.find((s) => s.kernel.id === preferredKernelId); if (session) { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const liveKernel = session.kernel as any; const lastActivityTime = liveKernel.last_activity ? new Date(Date.parse(liveKernel.last_activity.toString())) diff --git a/src/client/datascience/jupyter/kernels/kernelService.ts b/src/client/datascience/jupyter/kernels/kernelService.ts index 867b7a90200..f72d0658dab 100644 --- a/src/client/datascience/jupyter/kernels/kernelService.ts +++ b/src/client/datascience/jupyter/kernels/kernelService.ts @@ -39,7 +39,7 @@ import { cleanEnvironment, detectDefaultKernelName } from './helpers'; import { JupyterKernelSpec } from './jupyterKernelSpec'; import { LiveKernelModel } from './types'; -// tslint:disable-next-line: no-var-requires no-require-imports +// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports const NamedRegexp = require('named-js-regexp') as typeof import('named-js-regexp'); /** @@ -131,7 +131,7 @@ export class KernelService { * @returns {(Promise)} * @memberof KernelService */ - // tslint:disable-next-line: cyclomatic-complexity + // eslint-disable-next-line complexity @traceDecorators.verbose('Find matching interpreter for a given kernel spec') public async findMatchingInterpreter( kernelSpec: IJupyterKernelSpec | LiveKernelModel, @@ -290,12 +290,12 @@ export class KernelService { * @returns {Promise} * @memberof KernelService */ - // tslint:disable-next-line: max-func-body-length - // tslint:disable-next-line: cyclomatic-complexity + // eslint-disable-next-line + // eslint-disable-next-line complexity @captureTelemetry(Telemetry.RegisterInterpreterAsKernel, undefined, true) @traceDecorators.error('Failed to register an interpreter as a kernel') @reportAction(ReportableAction.KernelsRegisterKernel) - // tslint:disable-next-line:max-func-body-length + // eslint-disable-next-line public async registerKernel( interpreter: PythonEnvironment, disableUI?: boolean, @@ -430,7 +430,7 @@ export class KernelService { specModel.env = await this.activationHelper .getActivatedEnvironmentVariables(undefined, interpreter, true) .catch(noop) - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any .then((env) => (env || {}) as any); if (Cancellation.isCanceled(cancelToken)) { return; @@ -439,7 +439,7 @@ export class KernelService { // Special case, modify the PYTHONWARNINGS env to the global value. // otherwise it's forced to 'ignore' because activated variables are cached. if (specModel.env && process.env[PYTHON_WARNINGS]) { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any specModel.env[PYTHON_WARNINGS] = process.env[PYTHON_WARNINGS] as any; } else if (specModel.env && specModel.env[PYTHON_WARNINGS]) { delete specModel.env[PYTHON_WARNINGS]; @@ -448,7 +448,7 @@ export class KernelService { // We'll need information such as interpreter type, display name, path, etc... // Its just a JSON file, and the information is small, hence might as well store everything. specModel.metadata = specModel.metadata || {}; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any specModel.metadata.interpreter = interpreter as any; // Indicate we need to write diff --git a/src/client/datascience/jupyter/kernels/kernelSwitcher.ts b/src/client/datascience/jupyter/kernels/kernelSwitcher.ts index b6f1c8d8844..8e55e665291 100644 --- a/src/client/datascience/jupyter/kernels/kernelSwitcher.ts +++ b/src/client/datascience/jupyter/kernels/kernelSwitcher.ts @@ -39,7 +39,7 @@ export class KernelSwitcher { // Keep retrying, until it works or user cancels. // Sometimes if a bad kernel is selected, starting a session can fail. // In such cases we need to let the user know about this and prompt them to select another kernel. - // tslint:disable-next-line: no-constant-condition + // eslint-disable-next-line no-constant-condition while (true) { try { await this.switchToKernel(notebook, kernel); diff --git a/src/client/datascience/jupyter/liveshare/guestJupyterNotebook.ts b/src/client/datascience/jupyter/liveshare/guestJupyterNotebook.ts index 543e3534dc2..1e63c82d76f 100644 --- a/src/client/datascience/jupyter/liveshare/guestJupyterNotebook.ts +++ b/src/client/datascience/jupyter/liveshare/guestJupyterNotebook.ts @@ -38,7 +38,7 @@ export class GuestJupyterNotebook implements INotebook, ILiveShareParticipant { private get jupyterLab(): typeof import('@jupyterlab/services') { if (!this._jupyterLab) { - // tslint:disable-next-line:no-require-imports + // eslint-disable-next-line @typescript-eslint/no-require-imports this._jupyterLab = require('@jupyterlab/services') as typeof import('@jupyterlab/services'); // NOSONAR } return this._jupyterLab!; @@ -277,16 +277,16 @@ export class GuestJupyterNotebook public sendCommMessage( buffers: (ArrayBuffer | ArrayBufferView)[], content: { comm_id: string; data: JSONObject; target_name: string | undefined }, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any metadata: any, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any msgId: any ): Kernel.IShellFuture< KernelMessage.IShellMessage<'comm_msg'>, KernelMessage.IShellMessage > { const shellMessage = this.jupyterLab?.KernelMessage.createMessage>({ - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any msgType: 'comm_msg', channel: 'shell', buffers, @@ -319,7 +319,7 @@ export class GuestJupyterNotebook channel: 'shell', content: { status: 'ok' - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any, metadata: {}, session: '1', @@ -354,7 +354,7 @@ export class GuestJupyterNotebook } }; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any private async sendRequest(command: string, args: any[]): Promise { const service = await this.waitForService(); if (service) { diff --git a/src/client/datascience/jupyter/liveshare/guestJupyterServer.ts b/src/client/datascience/jupyter/liveshare/guestJupyterServer.ts index 9e0c9a19c82..ce96daeb172 100644 --- a/src/client/datascience/jupyter/liveshare/guestJupyterServer.ts +++ b/src/client/datascience/jupyter/liveshare/guestJupyterServer.ts @@ -137,7 +137,7 @@ export class GuestJupyterServer if (!launchInfo) { return LiveShare.JupyterServerSharedService; } - // tslint:disable-next-line:no-suspicious-comment + // eslint-disable-next-line // TODO: Should there be some separator in the name? return `${LiveShare.JupyterServerSharedService}${launchInfo.purpose}`; } diff --git a/src/client/datascience/jupyter/liveshare/hostJupyterExecution.ts b/src/client/datascience/jupyter/liveshare/hostJupyterExecution.ts index cabcec2905e..58a31fce26c 100644 --- a/src/client/datascience/jupyter/liveshare/hostJupyterExecution.ts +++ b/src/client/datascience/jupyter/liveshare/hostJupyterExecution.ts @@ -30,7 +30,7 @@ import { LiveShareParticipantHost } from './liveShareParticipantMixin'; import { IRoleBasedObject } from './roleBasedFactory'; import { ServerCache } from './serverCache'; -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ // This class is really just a wrapper around a jupyter execution that also provides a shared live share service export class HostJupyterExecution diff --git a/src/client/datascience/jupyter/liveshare/hostJupyterNotebook.ts b/src/client/datascience/jupyter/liveshare/hostJupyterNotebook.ts index 0f3a600b580..2e233618a3c 100644 --- a/src/client/datascience/jupyter/liveshare/hostJupyterNotebook.ts +++ b/src/client/datascience/jupyter/liveshare/hostJupyterNotebook.ts @@ -27,11 +27,11 @@ import { ResponseQueue } from './responseQueue'; import { IRoleBasedObject } from './roleBasedFactory'; import { IExecuteObservableResponse, IResponseMapping, IServerResponse, ServerResponseType } from './types'; -// tslint:disable-next-line: no-require-imports +// eslint-disable-next-line @typescript-eslint/no-require-imports import cloneDeep = require('lodash/cloneDeep'); import { IFileSystem } from '../../../common/platform/types'; -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ export class HostJupyterNotebook extends LiveShareParticipantHost(JupyterNotebookBase, LiveShare.JupyterNotebookSharedService) diff --git a/src/client/datascience/jupyter/liveshare/hostJupyterServer.ts b/src/client/datascience/jupyter/liveshare/hostJupyterServer.ts index fb4793a19e6..4cee0c37caf 100644 --- a/src/client/datascience/jupyter/liveshare/hostJupyterServer.ts +++ b/src/client/datascience/jupyter/liveshare/hostJupyterServer.ts @@ -45,7 +45,7 @@ import { KernelConnectionMetadata } from '../kernels/types'; import { HostJupyterNotebook } from './hostJupyterNotebook'; import { LiveShareParticipantHost } from './liveShareParticipantMixin'; import { IRoleBasedObject } from './roleBasedFactory'; -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ export class HostJupyterServer extends LiveShareParticipantHost(JupyterServerBase, LiveShare.JupyterServerSharedService) implements IRoleBasedObject, INotebookServer { @@ -169,7 +169,7 @@ export class HostJupyterServer extends LiveShareParticipantHost(JupyterServerBas if (!launchInfo) { return LiveShare.JupyterServerSharedService; } - // tslint:disable-next-line:no-suspicious-comment + // eslint-disable-next-line // TODO: Should there be some separator in the name? return `${LiveShare.JupyterServerSharedService}${launchInfo.purpose}`; } diff --git a/src/client/datascience/jupyter/liveshare/liveShareParticipantMixin.ts b/src/client/datascience/jupyter/liveshare/liveShareParticipantMixin.ts index 84a1ac362b3..2a49e7bfaea 100644 --- a/src/client/datascience/jupyter/liveshare/liveShareParticipantMixin.ts +++ b/src/client/datascience/jupyter/liveshare/liveShareParticipantMixin.ts @@ -11,7 +11,7 @@ import { ClassType } from '../../../ioc/types'; import { ILiveShareParticipant } from './types'; import { waitForGuestService, waitForHostService } from './utils'; -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ export class LiveShareParticipantDefault implements IAsyncDisposable { constructor(..._rest: any[]) { diff --git a/src/client/datascience/jupyter/liveshare/roleBasedFactory.ts b/src/client/datascience/jupyter/liveshare/roleBasedFactory.ts index c85f6a64501..03678a7908c 100644 --- a/src/client/datascience/jupyter/liveshare/roleBasedFactory.ts +++ b/src/client/datascience/jupyter/liveshare/roleBasedFactory.ts @@ -11,7 +11,7 @@ import { ILiveShareHasRole, ILiveShareParticipant } from './types'; export interface IRoleBasedObject extends IAsyncDisposable, ILiveShareParticipant {} -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ export class RoleBasedFactory> implements ILiveShareHasRole { private ctorArgs: ConstructorParameters[]; private firstTime: boolean = true; diff --git a/src/client/datascience/jupyter/liveshare/serverCache.ts b/src/client/datascience/jupyter/liveshare/serverCache.ts index 9b317cb90e4..2468e5689c8 100644 --- a/src/client/datascience/jupyter/liveshare/serverCache.ts +++ b/src/client/datascience/jupyter/liveshare/serverCache.ts @@ -110,7 +110,7 @@ export class ServerCache implements IAsyncDisposable { // This should be quick. The server is either already up or will never come back. const server = await Promise.race([d.promise, sleep(1000)]); if (typeof server !== 'number') { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any await (server as any).dispose(); } else { traceInfo('ServerCache Dispose, no server'); diff --git a/src/client/datascience/jupyter/liveshare/types.ts b/src/client/datascience/jupyter/liveshare/types.ts index 5e662b13517..7df7ca2318a 100644 --- a/src/client/datascience/jupyter/liveshare/types.ts +++ b/src/client/datascience/jupyter/liveshare/types.ts @@ -6,7 +6,7 @@ import * as vsls from 'vsls/vscode'; import { IAsyncDisposable } from '../../../common/types'; import { ICell } from '../../types'; -// tslint:disable:max-classes-per-file +/* eslint-disable max-classes-per-file */ export enum ServerResponseType { ExecuteObservable, diff --git a/src/client/datascience/jupyter/notebookStarter.ts b/src/client/datascience/jupyter/notebookStarter.ts index 27610c69378..60530aa7e24 100644 --- a/src/client/datascience/jupyter/notebookStarter.ts +++ b/src/client/datascience/jupyter/notebookStarter.ts @@ -55,7 +55,7 @@ export class NotebookStarter implements Disposable { } } } - // tslint:disable-next-line: max-func-body-length + // eslint-disable-next-line @reportAction(ReportableAction.NotebookStart) public async start( useDefaultConfig: boolean, diff --git a/src/client/datascience/jupyter/serverSelector.ts b/src/client/datascience/jupyter/serverSelector.ts index dabb0046a6d..7b752a0f412 100644 --- a/src/client/datascience/jupyter/serverSelector.ts +++ b/src/client/datascience/jupyter/serverSelector.ts @@ -114,7 +114,7 @@ export class JupyterServerSelector { } private generateUriFromRemoteProvider(id: string, result: JupyterServerUriHandle) { - // tslint:disable-next-line: no-http-string + // eslint-disable-next-line return `${Identifiers.REMOTE_URI}?${Identifiers.REMOTE_URI_ID_PARAM}=${id}&${ Identifiers.REMOTE_URI_HANDLE_PARAM }=${encodeURI(result)}`; @@ -174,7 +174,7 @@ export class JupyterServerSelector { } private validateSelectJupyterURI = async (inputText: string): Promise => { try { - // tslint:disable-next-line:no-unused-expression + // eslint-disable-next-line @typescript-eslint/no-unused-expressions new URL(inputText); // Double check http diff --git a/src/client/datascience/jupyterDebugService.ts b/src/client/datascience/jupyterDebugService.ts index f0f6319a343..266773a30eb 100644 --- a/src/client/datascience/jupyterDebugService.ts +++ b/src/client/datascience/jupyterDebugService.ts @@ -30,7 +30,7 @@ import { EXTENSION_ROOT_DIR } from '../constants'; import { IProtocolParser } from '../debugger/extension/types'; import { IJupyterDebugService } from './types'; -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ // For debugging set these environment variables // PYDEVD_DEBUG=True @@ -68,7 +68,7 @@ class JupyterDebugSession implements DebugSession { } } -//tslint:disable:trailing-comma no-any no-multiline-string +/* eslint-disable comma-dangle, @typescript-eslint/no-explicit-any, no-multi-str */ /** * IJupyterDebugService that talks directly to the debugger. Supports both run by line and * regular debugging (regular is used in tests). diff --git a/src/client/datascience/jupyterUriProviderWrapper.ts b/src/client/datascience/jupyterUriProviderWrapper.ts index 7c1019bb62a..830e8b0598d 100644 --- a/src/client/datascience/jupyterUriProviderWrapper.ts +++ b/src/client/datascience/jupyterUriProviderWrapper.ts @@ -30,9 +30,9 @@ export class JupyterUriProviderWrapper implements IJupyterUriProvider { item: vscode.QuickPickItem, back: boolean ): Promise { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any if ((item as any).original) { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any return this.provider.handleQuickPick((item as any).original, back); } return this.provider.handleQuickPick(item, back); diff --git a/src/client/datascience/kernel-launcher/kernelProcess.ts b/src/client/datascience/kernel-launcher/kernelProcess.ts index 4d204b0b235..3b92dfdc021 100644 --- a/src/client/datascience/kernel-launcher/kernelProcess.ts +++ b/src/client/datascience/kernel-launcher/kernelProcess.ts @@ -208,7 +208,7 @@ export class KernelProcess implements IKernelProcess { } if (!Array.isArray(kernelSpec.argv)) { traceError('KernelSpec.argv in KernelProcess is undefined'); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any this._launchKernelSpec = undefined; } else { // Copy our kernelspec and assign a new argv array diff --git a/src/client/datascience/kernelSocketWrapper.ts b/src/client/datascience/kernelSocketWrapper.ts index ca87b32723f..e6e86405753 100644 --- a/src/client/datascience/kernelSocketWrapper.ts +++ b/src/client/datascience/kernelSocketWrapper.ts @@ -4,7 +4,7 @@ import * as WebSocketWS from 'ws'; import { ClassType } from '../ioc/types'; import { IKernelSocket } from './types'; -// tslint:disable: no-any prefer-method-signature +/* eslint-disable @typescript-eslint/no-explicit-any */ export type IWebSocketLike = { onopen: (event: { target: any }) => void; onerror: (event: { error: any; message: string; type: string; target: any }) => void; @@ -104,12 +104,12 @@ export function KernelSocketWrapper>(SuperCl this.receiveHooks = this.receiveHooks.filter((l) => l !== hook); } - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public addSendHook(patch: (data: any, cb?: (err?: Error) => void) => Promise): void { this.sendHooks.push(patch); } - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public removeSendHook(patch: (data: any, cb?: (err?: Error) => void) => Promise): void { this.sendHooks = this.sendHooks.filter((p) => p !== patch); } diff --git a/src/client/datascience/liveshare/liveshare.ts b/src/client/datascience/liveshare/liveshare.ts index 3e074763c5e..30462911353 100644 --- a/src/client/datascience/liveshare/liveshare.ts +++ b/src/client/datascience/liveshare/liveshare.ts @@ -8,7 +8,7 @@ import { IApplicationShell, ILiveShareApi, IWorkspaceService } from '../../commo import { IConfigurationService, IDisposableRegistry } from '../../common/types'; import { LiveShareProxy } from './liveshareProxy'; -// tslint:disable:no-any unified-signatures +/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/unified-signatures */ @injectable() export class LiveShareApi implements ILiveShareApi { diff --git a/src/client/datascience/liveshare/liveshareProxy.ts b/src/client/datascience/liveshare/liveshareProxy.ts index 4a4b2f10b5d..ab436c15971 100644 --- a/src/client/datascience/liveshare/liveshareProxy.ts +++ b/src/client/datascience/liveshare/liveshareProxy.ts @@ -10,7 +10,7 @@ import * as localize from '../../common/utils/localize'; import { LiveShare, LiveShareCommands } from '../constants'; import { ServiceProxy } from './serviceProxy'; -// tslint:disable:no-any unified-signatures +/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/unified-signatures */ export class LiveShareProxy implements vsls.LiveShare { private currentRole: vsls.Role = vsls.Role.None; private guestChecker: vsls.SharedService | vsls.SharedServiceProxy | null = null; diff --git a/src/client/datascience/liveshare/postOffice.ts b/src/client/datascience/liveshare/postOffice.ts index ac255edd586..1ce7db7888d 100644 --- a/src/client/datascience/liveshare/postOffice.ts +++ b/src/client/datascience/liveshare/postOffice.ts @@ -11,7 +11,7 @@ import { IAsyncDisposable } from '../../common/types'; import { createDeferred, Deferred } from '../../common/utils/async'; import { LiveShare } from '../constants'; -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ interface IMessageArgs { args: string; diff --git a/src/client/datascience/liveshare/serviceProxy.ts b/src/client/datascience/liveshare/serviceProxy.ts index 31d94cb2643..90c579aafac 100644 --- a/src/client/datascience/liveshare/serviceProxy.ts +++ b/src/client/datascience/liveshare/serviceProxy.ts @@ -4,7 +4,7 @@ import { Event } from 'vscode'; import * as vsls from 'vsls/vscode'; -// tslint:disable:no-any unified-signatures +/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/unified-signatures */ export class ServiceProxy implements vsls.SharedService { constructor( private realService: vsls.SharedService, diff --git a/src/client/datascience/notebook/contentProvider.ts b/src/client/datascience/notebook/contentProvider.ts index 97fbeaaa24c..8459301e40a 100644 --- a/src/client/datascience/notebook/contentProvider.ts +++ b/src/client/datascience/notebook/contentProvider.ts @@ -25,7 +25,7 @@ import { INotebookStorageProvider } from '../notebookStorage/notebookStorageProv import { VSCodeNotebookModel } from '../notebookStorage/vscNotebookModel'; import { INotebookModel } from '../types'; import { NotebookEditorCompatibilitySupport } from './notebookEditorCompatibilitySupport'; -// tslint:disable-next-line: no-var-requires no-require-imports +// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports const vscodeNotebookEnums = require('vscode') as typeof import('vscode-proposed'); /** * This class is responsible for reading a notebook file (ipynb or other files) and returning VS Code with the NotebookData. diff --git a/src/client/datascience/notebook/defaultCellLanguageService.ts b/src/client/datascience/notebook/defaultCellLanguageService.ts index 144932d6e16..09fd2c62544 100644 --- a/src/client/datascience/notebook/defaultCellLanguageService.ts +++ b/src/client/datascience/notebook/defaultCellLanguageService.ts @@ -17,7 +17,7 @@ import { translateKernelLanguageToMonaco } from '../common'; import { getLanguageInNotebookMetadata } from '../jupyter/kernels/helpers'; import { IJupyterKernelSpec } from '../types'; import { getNotebookMetadata } from './helpers/helpers'; -// tslint:disable-next-line: no-var-requires no-require-imports +// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports const vscodeNotebookEnums = require('vscode') as typeof import('vscode-proposed'); export const LastSavedNotebookCellLanguage = 'DATASCIENCE.LAST_SAVED_CELL_LANGUAGE'; diff --git a/src/client/datascience/notebook/emptyNotebookCellLanguageService.ts b/src/client/datascience/notebook/emptyNotebookCellLanguageService.ts index 89d1a26df98..010bb7bde62 100644 --- a/src/client/datascience/notebook/emptyNotebookCellLanguageService.ts +++ b/src/client/datascience/notebook/emptyNotebookCellLanguageService.ts @@ -12,7 +12,7 @@ import { noop } from '../../common/utils/misc'; import { translateKernelLanguageToMonaco } from '../common'; import { isJupyterKernel, isJupyterNotebook } from './helpers/helpers'; import { chainWithPendingUpdates } from './helpers/notebookUpdater'; -// tslint:disable-next-line: no-var-requires no-require-imports +// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports const vscodeNotebookEnums = require('vscode') as typeof import('vscode-proposed'); /** diff --git a/src/client/datascience/notebook/helpers/executionHelpers.ts b/src/client/datascience/notebook/helpers/executionHelpers.ts index 76232143857..d6e6383601f 100644 --- a/src/client/datascience/notebook/helpers/executionHelpers.ts +++ b/src/client/datascience/notebook/helpers/executionHelpers.ts @@ -15,7 +15,7 @@ import { translateErrorOutput } from './helpers'; import { chainWithPendingUpdates } from './notebookUpdater'; -// tslint:disable-next-line: no-var-requires no-require-imports +// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports const vscodeNotebookEnums = require('vscode') as typeof import('vscode-proposed'); // After executing %tensorboard --logdir to launch @@ -57,7 +57,7 @@ export async function handleUpdateDisplayDataMessage( if ( (output.output_type === 'display_data' || output.output_type === 'execute_result') && output.transient && - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (output.transient as any).display_id === msg.content.transient.display_id ) { // Remember we have updated output for this cell. diff --git a/src/client/datascience/notebook/helpers/helpers.ts b/src/client/datascience/notebook/helpers/helpers.ts index aafb01c7032..49ca4876737 100644 --- a/src/client/datascience/notebook/helpers/helpers.ts +++ b/src/client/datascience/notebook/helpers/helpers.ts @@ -28,11 +28,11 @@ import { KernelConnectionMetadata } from '../../jupyter/kernels/types'; import { updateNotebookMetadata } from '../../notebookStorage/baseModel'; import { CellState, IJupyterKernelSpec } from '../../types'; import { JupyterNotebookView } from '../constants'; -// tslint:disable-next-line: no-var-requires no-require-imports +// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports const vscodeNotebookEnums = require('vscode') as typeof import('vscode-proposed'); -// tslint:disable-next-line: no-require-imports +// eslint-disable-next-line @typescript-eslint/no-require-imports import { KernelMessage } from '@jupyterlab/services'; -// tslint:disable-next-line: no-require-imports +// eslint-disable-next-line @typescript-eslint/no-require-imports import cloneDeep = require('lodash/cloneDeep'); import { Uri } from 'vscode'; import { VSCodeNotebookKernelMetadata } from '../kernelWithMetadata'; @@ -49,7 +49,7 @@ export interface IBaseCellVSCodeMetadata { * Remember, there could be other notebooks such as GitHub Issues nb by VS Code. */ export function isJupyterNotebook(document: NotebookDocument): boolean; -// tslint:disable-next-line: unified-signatures +// eslint-disable-next-line @typescript-eslint/unified-signatures export function isJupyterNotebook(viewType: string): boolean; export function isJupyterNotebook(option: NotebookDocument | string) { if (typeof option === 'string') { @@ -72,7 +72,7 @@ const kernelInformationForNotebooks = new WeakMap< >(); export function getNotebookMetadata(document: NotebookDocument): nbformat.INotebookMetadata | undefined { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any let notebookContent: Partial = document.metadata.custom as any; // If language isn't specified in the metadata, at least specify that @@ -81,7 +81,7 @@ export function getNotebookMetadata(document: NotebookDocument): nbformat.INoteb const metadata = content.metadata || { orig_nbformat: 3, language_info: {} }; const language_info = { ...metadata.language_info, name: document.languages[0] }; // Fix nyc compiler not working. - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any notebookContent = { ...content, metadata: { ...metadata, language_info } } as any; } notebookContent = cloneDeep(notebookContent); @@ -94,7 +94,7 @@ export function getNotebookMetadata(document: NotebookDocument): nbformat.INoteb } export function isPythonNotebook(metadata?: nbformat.INotebookMetadata) { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const kernelSpec = (metadata?.kernelspec as any) as IJupyterKernelSpec | undefined; if (metadata?.language_info?.name && metadata.language_info.name !== PYTHON_LANGUAGE) { return false; @@ -213,7 +213,7 @@ export function createJupyterCellFromVSCNotebookCell( if ('vscode' in cell.metadata) { const metadata = { ...cell.metadata }; // Persisting these require us to save custom metadata in ipynb. Not sure users would like this. We'll have more changes in ipynb files. - // tslint:disable-next-line: no-suspicious-comment + // eslint-disable-next-line // TODO: Discuss whether we need to persist these. delete metadata.vscode; // if (metadata.vscode && typeof metadata.vscode === 'object' && 'transient' in metadata.vscode) { @@ -234,7 +234,7 @@ export function getCustomNotebookCellMetadata(cell: nbformat.IBaseCell): Record< // We put this only for VSC to display in diff view. // Else we don't use this. const propertiesToClone = ['metadata', 'attachments']; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const custom: Record = {}; propertiesToClone.forEach((propertyToClone) => { if (cell[propertyToClone]) { @@ -304,7 +304,7 @@ function createNotebookCellDataFromCodeCell( cell: nbformat.ICodeCell, cellLanguage: string ): NotebookCellData { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const cellOutputs: nbformat.IOutput[] = Array.isArray(cell.outputs) ? cell.outputs : []; const outputs = createVSCCellOutputsFromOutputs(cellOutputs); // If we have an execution count & no errors, then success state. @@ -319,7 +319,7 @@ function createNotebookCellDataFromCodeCell( } else if (hasErrors) { runState = vscodeNotebookEnums.NotebookCellRunState.Error; // Error details are stripped from the output, get raw output. - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any statusMessage = getCellStatusMessageBasedOnFirstErrorOutput(cellOutputs); } else { runState = vscodeNotebookEnums.NotebookCellRunState.Success; @@ -441,7 +441,7 @@ export async function updateCellExecutionTimes( return; } // Persisting these require us to save custom metadata in ipynb. Not sure users would like this. We'll have more changes in ipynb files. - // tslint:disable-next-line: no-suspicious-comment + // eslint-disable-next-line // TODO: Discuss whether we need to persist these. // const startTimeISO = new Date(times.startTime).toISOString(); // const endTimeISO = new Date(times.startTime + times.lastRunDuration).toISOString(); @@ -503,15 +503,15 @@ const cellOutputMappers = new Map< nbformat.OutputType, (output: nbformat.IOutput, outputType: nbformat.OutputType) => CellOutput >(); -// tslint:disable-next-line: no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any cellOutputMappers.set('display_data', translateDisplayDataOutput as any); -// tslint:disable-next-line: no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any cellOutputMappers.set('error', translateErrorOutput as any); -// tslint:disable-next-line: no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any cellOutputMappers.set('execute_result', translateDisplayDataOutput as any); -// tslint:disable-next-line: no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any cellOutputMappers.set('stream', translateStreamOutput as any); -// tslint:disable-next-line: no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any cellOutputMappers.set('update_display_data', translateDisplayDataOutput as any); export function cellOutputToVSCCellOutput(output: nbformat.IOutput): CellOutput { const fn = cellOutputMappers.get(output.output_type as nbformat.OutputType); @@ -522,7 +522,7 @@ export function cellOutputToVSCCellOutput(output: nbformat.IOutput): CellOutput traceWarning(`Unable to translate cell from ${output.output_type} to NotebookCellData for VS Code.`); result = { outputKind: vscodeNotebookEnums.CellOutputKind.Rich, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any data: output.data as any, metadata: { custom: { vscode: { outputType: output.output_type } } } }; @@ -535,7 +535,7 @@ export function cellOutputToVSCCellOutput(output: nbformat.IOutput): CellOutput result.outputKind === vscodeNotebookEnums.CellOutputKind.Rich && result.metadata ) { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any result.metadata.custom = { ...result.metadata.custom, transient: output.transient }; } return result; @@ -573,7 +573,7 @@ function translateDisplayDataOutput( outputType: nbformat.OutputType ): CellDisplayOutput | undefined { const data = { ...output.data }; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const metadata = output.metadata ? ({ custom: cloneDeep(output.metadata) } as any) : { custom: {} }; metadata.custom.vscode = { outputType }; if (output.execution_count) { @@ -619,7 +619,7 @@ export function isStreamOutput(output: CellOutput, expectedStreamName: string): return true; } -// tslint:disable-next-line: no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any function getSanitizedCellMetadata(metadata?: { [key: string]: any }) { const cloned = { ...metadata }; if ('vscode' in cloned) { @@ -798,7 +798,7 @@ export async function updateVSCNotebookAfterTrustingNotebook( // Restore the output once we trust the notebook. edit.replaceCellOutput( index, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any createVSCCellOutputsFromOutputs(originalCells[index].outputs as any) ); } diff --git a/src/client/datascience/notebook/helpers/notebookUpdater.ts b/src/client/datascience/notebook/helpers/notebookUpdater.ts index d83c2d0d47a..5eb1ff7dd00 100644 --- a/src/client/datascience/notebook/helpers/notebookUpdater.ts +++ b/src/client/datascience/notebook/helpers/notebookUpdater.ts @@ -43,7 +43,7 @@ export async function chainWithPendingUpdates( } export function clearPendingChainedUpdatesForTests() { - // tslint:disable-next-line: no-any no-require-imports + // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-require-imports const vsc = require('vscode') as any; const editor: NotebookEditor | undefined = vsc.notebook.activeNotebookEditor; if (editor?.document) { diff --git a/src/client/datascience/notebook/kernelProvider.ts b/src/client/datascience/notebook/kernelProvider.ts index 5c070fbf4d8..e8d252fb0d2 100644 --- a/src/client/datascience/notebook/kernelProvider.ts +++ b/src/client/datascience/notebook/kernelProvider.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. import { inject, injectable } from 'inversify'; -// tslint:disable-next-line: no-require-imports +// eslint-disable-next-line @typescript-eslint/no-require-imports import { CancellationToken, Event, EventEmitter } from 'vscode'; import { NotebookCommunication, @@ -249,7 +249,7 @@ export class VSCodeKernelPickerProvider implements INotebookKernelProvider { const model = this.storageProvider.get(document.uri); if (!model || !model.isTrusted) { - // tslint:disable-next-line: no-suspicious-comment + // eslint-disable-next-line // TODO: https://github.com/microsoft/vscode-python/issues/13476 // If a model is not trusted, we cannot change the kernel (this results in changes to notebook metadata). // This is because we store selected kernel in the notebook metadata. @@ -315,7 +315,7 @@ export class VSCodeKernelPickerProvider implements INotebookKernelProvider { this.disposables ); } - // tslint:disable-next-line: no-suspicious-comment + // eslint-disable-next-line // TODO: https://github.com/microsoft/vscode-python/issues/13514 // We need to handle these exceptions in `siwthKernelWithRetry`. // We shouldn't handle them here, as we're already handling some errors in the `siwthKernelWithRetry` method. diff --git a/src/client/datascience/notebook/kernelWithMetadata.ts b/src/client/datascience/notebook/kernelWithMetadata.ts index 17a5f06b5e1..8a074df5dd7 100644 --- a/src/client/datascience/notebook/kernelWithMetadata.ts +++ b/src/client/datascience/notebook/kernelWithMetadata.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// tslint:disable-next-line: no-require-imports +// eslint-disable-next-line @typescript-eslint/no-require-imports import { join } from 'path'; import { Uri } from 'vscode'; import { NotebookCell, NotebookDocument, NotebookKernel as VSCNotebookKernel } from '../../../../types/vscode-proposed'; @@ -50,10 +50,10 @@ export class VSCodeNotebookKernelMetadata implements VSCNotebookKernel { } } public cancelCellExecution(_: NotebookDocument, cell: NotebookCell) { - this.kernelProvider.get(cell.notebook.uri)?.interrupt(); // NOSONAR + this.kernelProvider.get(cell.notebook.uri)?.interrupt().ignoreErrors(); // NOSONAR } public cancelAllCellsExecution(document: NotebookDocument) { - this.kernelProvider.get(document.uri)?.interrupt(); // NOSONAR + this.kernelProvider.get(document.uri)?.interrupt().ignoreErrors(); // NOSONAR } private updateKernelInfoInNotebookWhenAvailable(kernel: IKernel, doc: NotebookDocument) { const disposable = kernel.onStatusChanged(() => { diff --git a/src/client/datascience/notebook/notebookEditor.ts b/src/client/datascience/notebook/notebookEditor.ts index 6822f682c6a..d9290849db4 100644 --- a/src/client/datascience/notebook/notebookEditor.ts +++ b/src/client/datascience/notebook/notebookEditor.ts @@ -24,7 +24,7 @@ import { } from '../types'; import { NotebookCellLanguageService } from './defaultCellLanguageService'; import { chainWithPendingUpdates } from './helpers/notebookUpdater'; -// tslint:disable-next-line: no-var-requires no-require-imports +// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports const vscodeNotebookEnums = require('vscode') as typeof import('vscode-proposed'); export class NotebookEditor implements INotebookEditor { diff --git a/src/client/datascience/notebookStorage/baseModel.ts b/src/client/datascience/notebookStorage/baseModel.ts index af3e3a21255..086b14ef5d5 100644 --- a/src/client/datascience/notebookStorage/baseModel.ts +++ b/src/client/datascience/notebookStorage/baseModel.ts @@ -28,13 +28,13 @@ export function getInterpreterInfoStoredInMetadata( return; } // See `updateNotebookMetadata` to determine how & where exactly interpreter hash is stored. - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const kernelSpecMetadata: undefined | any = metadata.kernelspec.metadata as any; const interpreterHash = kernelSpecMetadata?.interpreter?.hash; return interpreterHash ? { displayName: metadata.kernelspec.name, hash: interpreterHash } : undefined; } -// tslint:disable-next-line: cyclomatic-complexity +// eslint-disable-next-line complexity export function updateNotebookMetadata( metadata?: nbformat.INotebookMetadata, kernelConnection?: KernelConnectionMetadata, @@ -123,7 +123,7 @@ export function updateNotebookMetadata( } try { // This is set only for when we select an interpreter. - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any delete (metadata.kernelspec as any).metadata; } catch { // Noop. @@ -205,7 +205,7 @@ export abstract class BaseNotebookModel implements INotebookModel { } public get metadata(): Readonly | undefined { // Fix nyc compiler problem - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any return this.notebookJson.metadata as any; } public get isTrusted() { @@ -286,7 +286,7 @@ export abstract class BaseNotebookModel implements INotebookModel { } } - // tslint:disable-next-line: cyclomatic-complexity + // eslint-disable-next-line complexity private updateVersionInfo(kernelConnection: KernelConnectionMetadata | undefined): boolean { this._kernelConnection = kernelConnection; const { changed, kernelId } = updateNotebookMetadata(this.notebookJson.metadata, kernelConnection); diff --git a/src/client/datascience/notebookStorage/nativeEditorStorage.ts b/src/client/datascience/notebookStorage/nativeEditorStorage.ts index 56169aba4cd..ecd2b281606 100644 --- a/src/client/datascience/notebookStorage/nativeEditorStorage.ts +++ b/src/client/datascience/notebookStorage/nativeEditorStorage.ts @@ -1,5 +1,5 @@ import type { nbformat } from '@jupyterlab/coreutils'; -// tslint:disable-next-line:no-require-imports no-var-requires +// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires import detectIndent = require('detect-indent'); import { inject, injectable, named } from 'inversify'; import * as path from 'path'; @@ -214,10 +214,10 @@ export class NativeEditorStorage implements INotebookStorage { notebookData.metadata && notebookData.metadata.language_info && notebookData.metadata.language_info.codemirror_mode && - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any typeof (notebookData.metadata.language_info.codemirror_mode as any).version === 'number' ) { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any return (notebookData.metadata.language_info.codemirror_mode as any).version; } // Use the active interpreter if allowed @@ -317,7 +317,7 @@ export class NativeEditorStorage implements INotebookStorage { isInitiallyDirty = false, forVSCodeNotebook?: boolean ) { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const json = contents ? (JSON.parse(contents) as Partial) : undefined; // Double check json (if we have any) @@ -479,9 +479,9 @@ export class NativeEditorStorage implements INotebookStorage { await this.globalStorage.update(NotebookTransferKey, true); try { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any if ((this.globalStorage as any)._value) { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const keys = Object.keys((this.globalStorage as any)._value); [...keys].forEach((k: string) => { if (k.startsWith(KeyPrefix)) { diff --git a/src/client/datascience/notebookStorage/notebookModel.ts b/src/client/datascience/notebookStorage/notebookModel.ts index 87adf1dcd6b..d9c0bec93bf 100644 --- a/src/client/datascience/notebookStorage/notebookModel.ts +++ b/src/client/datascience/notebookStorage/notebookModel.ts @@ -292,7 +292,7 @@ export class NativeEditorNotebookModel extends BaseNotebookModel { return true; } - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any private asCell(cell: any): ICell { // Works around problems with setting a cell to another one in the nyc compiler. return cell as ICell; diff --git a/src/client/datascience/notebookStorage/notebookStorageProvider.ts b/src/client/datascience/notebookStorage/notebookStorageProvider.ts index b4226eb447e..bb6ca1cc537 100644 --- a/src/client/datascience/notebookStorage/notebookStorageProvider.ts +++ b/src/client/datascience/notebookStorage/notebookStorageProvider.ts @@ -14,7 +14,7 @@ import { IModelLoadOptions, INotebookModel, INotebookModelSynchronization, INote import { getNextUntitledCounter } from './nativeEditorStorage'; import { VSCodeNotebookModel } from './vscNotebookModel'; -// tslint:disable-next-line:no-require-imports no-var-requires +// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires export const INotebookStorageProvider = Symbol.for('INotebookStorageProvider'); export interface INotebookStorageProvider extends INotebookStorage { diff --git a/src/client/datascience/notebookStorage/vscNotebookModel.ts b/src/client/datascience/notebookStorage/vscNotebookModel.ts index 66dd520aada..c19d72150d0 100644 --- a/src/client/datascience/notebookStorage/vscNotebookModel.ts +++ b/src/client/datascience/notebookStorage/vscNotebookModel.ts @@ -18,7 +18,7 @@ import { import { BaseNotebookModel, getDefaultNotebookContentForNativeNotebooks } from './baseModel'; // https://github.com/microsoft/vscode-python/issues/13155 -// tslint:disable-next-line: no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any export function sortObjectPropertiesRecursively(obj: any): any { if (Array.isArray(obj)) { return obj.map(sortObjectPropertiesRecursively); @@ -27,11 +27,11 @@ export function sortObjectPropertiesRecursively(obj: any): any { return ( Object.keys(obj) .sort() - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any .reduce>((sortedObj, prop) => { sortedObj[prop] = sortObjectPropertiesRecursively(obj[prop]); return sortedObj; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any }, {}) as any ); } @@ -168,7 +168,7 @@ export class VSCodeNotebookModel extends BaseNotebookModel { // The output can contain custom metadata, we need to remove that. json.cells = json.cells.map((cell) => { const metadata = { ...cell.metadata }; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const outputs: nbformat.IOutput[] = Array.isArray(cell.outputs) ? (cell.outputs as any) : []; outputs.forEach((output: nbformat.IOutput) => { if ( @@ -186,7 +186,7 @@ export class VSCodeNotebookModel extends BaseNotebookModel { return { ...cell, metadata - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any; }); } diff --git a/src/client/datascience/plotting/plotViewer.ts b/src/client/datascience/plotting/plotViewer.ts index e3a908a026f..d3217eee6bc 100644 --- a/src/client/datascience/plotting/plotViewer.ts +++ b/src/client/datascience/plotting/plotViewer.ts @@ -90,7 +90,7 @@ export class PlotViewer extends WebviewPanelHost implements return undefined; } - //tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any protected onMessage(message: string, payload: any) { switch (message) { case PlotViewerMessages.CopyPlot: @@ -141,10 +141,10 @@ export class PlotViewer extends WebviewPanelHost implements case '.pdf': traceInfo('Attempting pdf write...'); // Import here since pdfkit is so huge. - // tslint:disable-next-line: no-require-imports + // eslint-disable-next-line @typescript-eslint/no-require-imports const SVGtoPDF = require('svg-to-pdfkit'); const deferred = createDeferred(); - // tslint:disable-next-line: no-require-imports + // eslint-disable-next-line @typescript-eslint/no-require-imports const pdfkit = require('pdfkit/js/pdfkit.standalone') as typeof import('pdfkit'); const doc = new pdfkit(); const ws = this.fs.createLocalWriteStream(file.fsPath); diff --git a/src/client/datascience/plotting/plotViewerMessageListener.ts b/src/client/datascience/plotting/plotViewerMessageListener.ts index 2e4affa392c..7224bdf4049 100644 --- a/src/client/datascience/plotting/plotViewerMessageListener.ts +++ b/src/client/datascience/plotting/plotViewerMessageListener.ts @@ -5,7 +5,7 @@ import '../../common/extensions'; import { IWebviewPanel, IWebviewPanelMessageListener } from '../../common/application/types'; -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ // This class listens to messages that come from the local Plot Viewer window export class PlotViewerMessageListener implements IWebviewPanelMessageListener { diff --git a/src/client/datascience/progress/decorator.ts b/src/client/datascience/progress/decorator.ts index 5f0215d0873..4c5363e01cb 100644 --- a/src/client/datascience/progress/decorator.ts +++ b/src/client/datascience/progress/decorator.ts @@ -36,10 +36,10 @@ function report(progress: Progress) { export function reportAction(action: ReportableAction) { return function (_target: Object, _propertyName: string, descriptor: TypedPropertyDescriptor) { const originalMethod = descriptor.value!; - // tslint:disable-next-line:no-any no-function-expression + // eslint-disable-next-line @typescript-eslint/no-explicit-any, descriptor.value = async function (...args: any[]) { report({ action, phase: 'started' }); - // tslint:disable-next-line:no-invalid-this + // eslint-disable-next-line no-invalid-this return originalMethod.apply(this, args).finally(() => { report({ action, phase: 'completed' }); }); diff --git a/src/client/datascience/raw-kernel/liveshare/hostRawNotebookProvider.ts b/src/client/datascience/raw-kernel/liveshare/hostRawNotebookProvider.ts index ebcc2d53e1f..cef89ed3edc 100644 --- a/src/client/datascience/raw-kernel/liveshare/hostRawNotebookProvider.ts +++ b/src/client/datascience/raw-kernel/liveshare/hostRawNotebookProvider.ts @@ -49,8 +49,8 @@ import { calculateWorkingDirectory } from '../../utils'; import { RawJupyterSession } from '../rawJupyterSession'; import { RawNotebookProviderBase } from '../rawNotebookProvider'; -// tslint:disable-next-line: no-require-imports -// tslint:disable:no-any +// eslint-disable-next-line @typescript-eslint/no-require-imports +/* eslint-disable @typescript-eslint/no-explicit-any */ export class HostRawNotebookProvider extends LiveShareParticipantHost(RawNotebookProviderBase, LiveShare.RawNotebookProviderService) diff --git a/src/client/datascience/raw-kernel/rawKernel.ts b/src/client/datascience/raw-kernel/rawKernel.ts index 132181c8bc4..7acca1dd683 100644 --- a/src/client/datascience/raw-kernel/rawKernel.ts +++ b/src/client/datascience/raw-kernel/rawKernel.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. import { Kernel, KernelMessage, ServerConnection } from '@jupyterlab/services'; -// tslint:disable: no-any no-require-imports +/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-require-imports */ import cloneDeep = require('lodash/cloneDeep'); import * as uuid from 'uuid/v4'; import { isTestExecution } from '../../common/constants'; @@ -18,7 +18,7 @@ export function suppressShutdownErrors(realKernel: any) { // When running under a test, mark all futures as done so we // don't hit this problem: // https://github.com/jupyterlab/jupyterlab/issues/4252 - // tslint:disable:no-any + /* eslint-disable @typescript-eslint/no-explicit-any */ if (isTestExecution()) { const defaultKernel = realKernel as any; // NOSONAR if (defaultKernel && defaultKernel._futures) { @@ -192,7 +192,7 @@ export class RawKernel implements Kernel.IKernel { return this.realKernel.requestExecute(content, disposeOnDone, metadata); } public requestDebug( - // tslint:disable-next-line: no-banned-terms + // eslint-disable-next-line no-caller,no-eval content: { seq: number; type: 'request'; command: string; arguments?: any }, disposeOnDone?: boolean ): Kernel.IControlFuture { diff --git a/src/client/datascience/raw-kernel/rawNotebookProviderWrapper.ts b/src/client/datascience/raw-kernel/rawNotebookProviderWrapper.ts index 9fcdfb842d6..7e0d3834847 100644 --- a/src/client/datascience/raw-kernel/rawNotebookProviderWrapper.ts +++ b/src/client/datascience/raw-kernel/rawNotebookProviderWrapper.ts @@ -40,7 +40,7 @@ import { HostRawNotebookProvider } from './liveshare/hostRawNotebookProvider'; interface IRawNotebookProviderInterface extends IRoleBasedObject, IRawNotebookProvider {} -// tslint:disable:callable-types +/* eslint-disable @typescript-eslint/prefer-function-type */ type RawNotebookProviderClassType = { new ( liveShare: ILiveShareApi, @@ -62,7 +62,7 @@ type RawNotebookProviderClassType = { extensionChecker: IPythonExtensionChecker ): IRawNotebookProviderInterface; }; -// tslint:enable:callable-types +/* eslint-enable @typescript-eslint/prefer-function-type */ // This class wraps either a HostRawNotebookProvider or a GuestRawNotebookProvider based on the liveshare state. It abstracts // out the live share specific parts. diff --git a/src/client/datascience/raw-kernel/rawSession.ts b/src/client/datascience/raw-kernel/rawSession.ts index c875204a3c4..d2fde39974f 100644 --- a/src/client/datascience/raw-kernel/rawSession.ts +++ b/src/client/datascience/raw-kernel/rawSession.ts @@ -33,7 +33,7 @@ export class RawSession implements ISessionWithSocket { // RawSession owns the lifetime of the kernel process and will dispose it constructor(public kernelProcess: IKernelProcess) { - // tslint:disable-next-line: no-require-imports + // eslint-disable-next-line @typescript-eslint/no-require-imports const signaling = require('@phosphor/signaling') as typeof import('@phosphor/signaling'); this._statusChanged = new signaling.Signal(this); this._kernelChanged = new signaling.Signal(this); diff --git a/src/client/datascience/raw-kernel/rawSocket.ts b/src/client/datascience/raw-kernel/rawSocket.ts index c592f35bcad..c3367b5e3f5 100644 --- a/src/client/datascience/raw-kernel/rawSocket.ts +++ b/src/client/datascience/raw-kernel/rawSocket.ts @@ -27,7 +27,7 @@ interface IChannels { iopub: Subscriber; } -// tslint:disable: no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ /** * This class creates a WebSocket front end on a ZMQ set of connections. It is special in that * it does all serialization/deserialization itself. @@ -139,7 +139,7 @@ export class RawSocket implements IWebSocketLike, IKernelSocket, IDisposable { channel: 'iopub' | 'shell' | 'control' | 'stdin', readable: Subscriber | Dealer ) { - // tslint:disable-next-line: await-promise + // eslint-disable-next-line @typescript-eslint/await-thenable for await (const msg of readable) { // Make sure to quit if we are disposed. if (this.closed) { @@ -151,7 +151,7 @@ export class RawSocket implements IWebSocketLike, IKernelSocket, IDisposable { } private generateChannels(connection: IKernelConnection): IChannels { - // tslint:disable-next-line: no-require-imports + // eslint-disable-next-line @typescript-eslint/no-require-imports const zmq = require('zeromq') as typeof import('zeromq'); // Need a routing id for them to share. diff --git a/src/client/datascience/serviceRegistry.ts b/src/client/datascience/serviceRegistry.ts index ff1826453ea..028f4c1fb0e 100644 --- a/src/client/datascience/serviceRegistry.ts +++ b/src/client/datascience/serviceRegistry.ts @@ -195,7 +195,7 @@ import { WebviewExtensibility } from './webviewExtensibility'; // README: Did you make sure "dataScienceIocContainer.ts" has also been updated appropriately? -// tslint:disable-next-line: max-func-body-length +// eslint-disable-next-line export function registerTypes(serviceManager: IServiceManager, inNotebookApiExperiment: boolean, inCustomEditorApiExperiment: boolean) { const usingCustomEditor = inCustomEditorApiExperiment && !vscode.env.appName.includes('Insider'); // Don't use app manager in case it's not available yet. const useVSCodeNotebookAPI = inNotebookApiExperiment && !usingCustomEditor; diff --git a/src/client/datascience/statusProvider.ts b/src/client/datascience/statusProvider.ts index c82ad4bad9d..5c2a81f52e9 100644 --- a/src/client/datascience/statusProvider.ts +++ b/src/client/datascience/statusProvider.ts @@ -28,7 +28,7 @@ class StatusItem implements Disposable { if (!this.disposed) { this.disposed = true; if (this.timeout) { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any clearTimeout(this.timeout as any); this.timeout = undefined; } diff --git a/src/client/datascience/themeFinder.ts b/src/client/datascience/themeFinder.ts index b506ff9430c..fd31803597b 100644 --- a/src/client/datascience/themeFinder.ts +++ b/src/client/datascience/themeFinder.ts @@ -13,7 +13,7 @@ import { IExtensions } from '../common/types'; import { getLanguageConfiguration } from '../language/languageConfiguration'; import { IThemeFinder } from './types'; -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ interface IThemeData { rootFile: string; diff --git a/src/client/datascience/types.ts b/src/client/datascience/types.ts index 078bd499016..8e8c1a4577d 100644 --- a/src/client/datascience/types.ts +++ b/src/client/datascience/types.ts @@ -41,7 +41,7 @@ import { JupyterKernelSpec } from './jupyter/kernels/jupyterKernelSpec'; import { KernelConnectionMetadata } from './jupyter/kernels/types'; import { KernelStateEventArgs } from './notebookExtensibility'; -// tslint:disable-next-line:no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any export type PromiseFunction = (...any: any[]) => Promise; // Main interface @@ -77,7 +77,7 @@ export interface IJupyterConnection extends Disposable { localProcExitCode: number | undefined; readonly rootDirectory: string; // Directory where the notebook server was started. readonly url?: string; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any getAuthHeader?(): any; // Snould be a json object } @@ -225,9 +225,9 @@ export interface INotebook extends IAsyncDisposable { sendCommMessage( buffers: (ArrayBuffer | ArrayBufferView)[], content: { comm_id: string; data: JSONObject; target_name: string | undefined }, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any metadata: any, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any msgId: any ): Kernel.IShellFuture< KernelMessage.IShellMessage<'comm_msg'>, @@ -335,9 +335,9 @@ export interface IJupyterSession extends IAsyncDisposable { sendCommMessage( buffers: (ArrayBuffer | ArrayBufferView)[], content: { comm_id: string; data: JSONObject; target_name: string | undefined }, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any metadata: any, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any msgId: any ): Kernel.IShellFuture< KernelMessage.IShellMessage<'comm_msg'>, @@ -416,7 +416,7 @@ export interface IJupyterKernelSpec { * A dictionary of additional attributes about this kernel; used by clients to aid in kernel selection. * Optionally storing the interpreter information in the metadata (helping extension search for kernels that match an interpereter). */ - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any readonly metadata?: Record & { interpreter?: Partial }; readonly argv: string[]; /** @@ -637,19 +637,19 @@ export interface IInteractiveWindowListener extends IDisposable { /** * Fires this event when posting a response message */ - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any postMessage: Event<{ message: string; payload: any }>; /** * Fires this event when posting a message to the interactive base. */ - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any postInternalMessage?: Event<{ message: string; payload: any }>; /** * Handles messages that the interactive window receives * @param message message type * @param payload message payload */ - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any onMessage(message: string, payload?: any): void; /** * Fired when the view state of the interactive window changes @@ -661,9 +661,9 @@ export interface IInteractiveWindowListener extends IDisposable { // Wraps the vscode API in order to send messages back and forth from a webview export const IPostOffice = Symbol('IPostOffice'); export interface IPostOffice { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any post(message: string, params: any[] | undefined): void; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any listen(message: string, listener: (args: any[] | undefined) => void): void; } @@ -1232,7 +1232,7 @@ export interface IJupyterServerProvider { } export interface IKernelSocket { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any sendToRealKernel(data: any, cb?: (err?: Error) => void): void; /** * Adds a listener to a socket that will be called before the socket's onMessage is called. This @@ -1249,13 +1249,13 @@ export interface IKernelSocket { * Adds a hook to the sending of data from a websocket. Hooks can block sending so be careful. * @param patch */ - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any addSendHook(hook: (data: any, cb?: (err?: Error) => void) => Promise): void; /** * Removes a send hook from the socket. * @param hook */ - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any removeSendHook(hook: (data: any, cb?: (err?: Error) => void) => Promise): void; } @@ -1356,7 +1356,7 @@ export interface IJupyterDebugService extends IDebugService { export interface IJupyterServerUri { baseUrl: string; token: string; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any authorizationHeader: any; // JSON object for authorization header. expiration?: Date; // Date/time when header expires and should be refreshed. displayName: string; diff --git a/src/client/datascience/utils.ts b/src/client/datascience/utils.ts index f2bee71d38c..f78d789f32d 100644 --- a/src/client/datascience/utils.ts +++ b/src/client/datascience/utils.ts @@ -13,7 +13,7 @@ import type { NotebookCell, NotebookCellRunState } from '../../../types/vscode-p import { concatMultilineString } from '../../datascience-ui/common'; import { IConfigurationService } from '../common/types'; import { CellState, ICell } from './types'; -// tslint:disable-next-line: no-var-requires no-require-imports +// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports const vscodeNotebookEnums = require('vscode') as typeof import('vscode-proposed'); export async function calculateWorkingDirectory( diff --git a/src/client/datascience/variablesView/variableView.ts b/src/client/datascience/variablesView/variableView.ts index 3d2eef1d453..89eca4eb1ee 100644 --- a/src/client/datascience/variablesView/variableView.ts +++ b/src/client/datascience/variablesView/variableView.ts @@ -89,7 +89,7 @@ export class VariableView extends WebviewViewHost imp return 'variableView'; } - //tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any protected onMessage(message: string, payload: any) { switch (message) { case InteractiveWindowMessages.GetVariablesRequest: @@ -108,7 +108,7 @@ export class VariableView extends WebviewViewHost imp // Handle message helper function to specifically handle our message mapping type protected handleMessage( _message: T, - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any payload: any, handler: (args: M[T]) => void ) { @@ -134,7 +134,7 @@ export class VariableView extends WebviewViewHost imp } catch (e) { traceError(e); sendTelemetryEvent(Telemetry.FailedShowDataViewer); - this.appShell.showErrorMessage(localize.DataScience.showDataViewerFail()); + void this.appShell.showErrorMessage(localize.DataScience.showDataViewerFail()); } } diff --git a/src/client/datascience/variablesView/variableViewMessageListener.ts b/src/client/datascience/variablesView/variableViewMessageListener.ts index 79f514279d3..a0d144dac47 100644 --- a/src/client/datascience/variablesView/variableViewMessageListener.ts +++ b/src/client/datascience/variablesView/variableViewMessageListener.ts @@ -5,7 +5,7 @@ import '../../common/extensions'; import { IWebviewViewMessageListener } from '../../common/application/types'; -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ // Message listening class for the native variable viewer export class VariableViewMessageListener implements IWebviewViewMessageListener { diff --git a/src/client/datascience/webviews/webviewHost.ts b/src/client/datascience/webviews/webviewHost.ts index 986e71f2d86..dcdef1440e1 100644 --- a/src/client/datascience/webviews/webviewHost.ts +++ b/src/client/datascience/webviews/webviewHost.ts @@ -105,7 +105,7 @@ export abstract class WebviewHost implements IDisposable { return this.postMessageInternal(type.toString(), payload); } - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any protected onMessage(message: string, payload: any) { switch (message) { case SharedMessages.Started: @@ -216,7 +216,7 @@ export abstract class WebviewHost implements IDisposable { this.postMessageInternal(SharedMessages.LocInit, locStrings).ignoreErrors(); } - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any protected async postMessageInternal(type: string, payload?: any): Promise { if (this.webviewInit) { // Make sure the webpanel is up before we send it anything. @@ -232,7 +232,7 @@ export abstract class WebviewHost implements IDisposable { } // When the webview has been rendered send telemetry and initial strings + settings - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any protected webViewRendered() { if (this.webviewInit && !this.webviewInit.resolved) { // Send telemetry for startup diff --git a/src/client/debugger/extension/helpers/protocolParser.ts b/src/client/debugger/extension/helpers/protocolParser.ts index 86a8374d51a..1cdb0777019 100644 --- a/src/client/debugger/extension/helpers/protocolParser.ts +++ b/src/client/debugger/extension/helpers/protocolParser.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// tslint:disable:no-constant-condition no-typeof-undefined +/* eslint-disable no-constant-condition */ import { EventEmitter } from 'events'; import { injectable } from 'inversify'; @@ -11,7 +11,7 @@ import { IProtocolParser } from '../types'; const PROTOCOL_START_INDENTIFIER = '\r\n\r\n'; -// tslint:disable-next-line: no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any type Listener = (...args: any[]) => void; /** diff --git a/src/client/extension.ts b/src/client/extension.ts index 8dc56cfc69c..c915eefe0e2 100644 --- a/src/client/extension.ts +++ b/src/client/extension.ts @@ -1,9 +1,9 @@ 'use strict'; -// tslint:disable:no-var-requires no-require-imports +/* eslint-disable @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports */ // This line should always be right on top. -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ if ((Reflect as any).metadata === undefined) { require('reflect-metadata'); } @@ -84,7 +84,7 @@ export function deactivate(): Thenable { ///////////////////////////// // activation helpers -// tslint:disable-next-line:max-func-body-length +// eslint-disable-next-line async function activateUnsafe( context: IExtensionContext, startupStopWatch: StopWatch, @@ -111,7 +111,7 @@ async function activateUnsafe( return [api, activationPromise, serviceContainer]; } -// tslint:disable-next-line:no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any function displayProgress(promise: Promise) { const progressOptions: ProgressOptions = { location: ProgressLocation.Window, title: Common.loadingExtension() }; window.withProgress(progressOptions, () => promise); @@ -134,10 +134,10 @@ interface IAppShell { function notifyUser(msg: string) { try { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any let appShell: IAppShell = (window as any) as IAppShell; if (activatedServiceContainer) { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any appShell = (activatedServiceContainer.get(IApplicationShell) as any) as IAppShell; } appShell.showErrorMessage(msg).ignoreErrors(); diff --git a/src/client/extensionActivation.ts b/src/client/extensionActivation.ts index a7d314196fc..24e5b6a4870 100644 --- a/src/client/extensionActivation.ts +++ b/src/client/extensionActivation.ts @@ -3,7 +3,7 @@ 'use strict'; -// tslint:disable:max-func-body-length +/* eslint-disable */ import { OutputChannel, window } from 'vscode'; import { registerTypes as activationRegisterTypes } from './activation/serviceRegistry'; @@ -49,7 +49,7 @@ export async function activateComponents( ///////////////////////////// // old activation code -// tslint:disable-next-line:no-suspicious-comment +// eslint-disable-next-line // TODO: Gradually move simple initialization // and DI registration currently in this function over // to initializeComponents(). Likewise with complex diff --git a/src/client/extensionInit.ts b/src/client/extensionInit.ts index f53e490ff5b..a0ea7dc3587 100644 --- a/src/client/extensionInit.ts +++ b/src/client/extensionInit.ts @@ -3,7 +3,7 @@ 'use strict'; -// tslint:disable:max-func-body-length +/* eslint-disable */ import { Container } from 'inversify'; import { Disposable, Memento } from 'vscode'; diff --git a/src/client/ioc/serviceManager.ts b/src/client/ioc/serviceManager.ts index 837308dff51..e5b7dcb494f 100644 --- a/src/client/ioc/serviceManager.ts +++ b/src/client/ioc/serviceManager.ts @@ -11,7 +11,7 @@ export class ServiceManager implements IServiceManager { constructor(private container: Container) {} public add( serviceIdentifier: identifier, - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any constructor: new (...args: any[]) => T, name?: string | number | symbol | undefined, bindings?: symbol[] @@ -41,7 +41,7 @@ export class ServiceManager implements IServiceManager { public addSingleton( serviceIdentifier: identifier, - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any constructor: new (...args: any[]) => T, name?: string | number | symbol | undefined, bindings?: symbol[] diff --git a/src/client/ioc/types.ts b/src/client/ioc/types.ts index 079fca02e5b..d3f32c1e473 100644 --- a/src/client/ioc/types.ts +++ b/src/client/ioc/types.ts @@ -4,25 +4,25 @@ import { interfaces } from 'inversify'; import { IDisposable } from '../common/types'; -//tslint:disable:callable-types -// tslint:disable-next-line:interface-name +/* eslint-disable @typescript-eslint/prefer-function-type */ +// eslint-disable-next-line @typescript-eslint/naming-convention export interface Newable { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any new (...args: any[]): T; } -//tslint:enable:callable-types +/* eslint-enable @typescript-eslint/prefer-function-type */ -// tslint:disable-next-line:interface-name +// eslint-disable-next-line @typescript-eslint/naming-convention export interface Abstract { prototype: T; } -//tslint:disable:callable-types +/* eslint-disable @typescript-eslint/prefer-function-type */ export type ClassType = { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any new (...args: any[]): T; }; -//tslint:enable:callable-types +/* eslint-enable @typescript-eslint/prefer-function-type */ export const IServiceManager = Symbol('IServiceManager'); diff --git a/src/client/language/languageConfiguration.ts b/src/client/language/languageConfiguration.ts index 9e80d3a3b70..a3701a80bd8 100644 --- a/src/client/language/languageConfiguration.ts +++ b/src/client/language/languageConfiguration.ts @@ -5,9 +5,9 @@ import { IndentAction, LanguageConfiguration } from 'vscode'; import { verboseRegExp } from '../common/utils/regexp'; -// tslint:disable:no-multiline-string +/* eslint-disable no-multi-str */ -// tslint:disable-next-line:max-func-body-length +// eslint-disable-next-line export function getLanguageConfiguration(): LanguageConfiguration { return { onEnterRules: [ diff --git a/src/client/logging/_global.ts b/src/client/logging/_global.ts index 42e194c093c..96482d13fc8 100644 --- a/src/client/logging/_global.ts +++ b/src/client/logging/_global.ts @@ -75,36 +75,36 @@ export function log(logLevel: LogLevel, ...args: Arguments) { logToAll([globalLogger], logLevel, args); } -// tslint:disable-next-line:no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any export function logVerbose(...args: any[]) { log(LogLevel.Info, ...args); } -// tslint:disable-next-line:no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any export function logError(...args: any[]) { log(LogLevel.Error, ...args); } -// tslint:disable-next-line:no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any export function logInfo(...args: any[]) { log(LogLevel.Info, ...args); } -// tslint:disable-next-line:no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any export function logInfoIf(condition: boolean, ...args: any[]) { if (condition) { log(LogLevel.Info, ...args); } } -// tslint:disable-next-line:no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any export function logErrorIf(condition: boolean, ...args: any[]) { if (condition) { log(LogLevel.Error, ...args); } } -// tslint:disable-next-line:no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any export function logWarning(...args: any[]) { log(LogLevel.Warn, ...args); } diff --git a/src/client/logging/debugLoggingManager.ts b/src/client/logging/debugLoggingManager.ts index 49d00fcdf15..7d5377bea6e 100644 --- a/src/client/logging/debugLoggingManager.ts +++ b/src/client/logging/debugLoggingManager.ts @@ -43,7 +43,7 @@ export class DebugLoggingManager implements IDebugLoggingManager { private async configureLoggingToFile() { await this.filesystem.writeLocalFile(this.logfilePath, ''); // Overwrite existing logfile if any addLogfile(this.logfilePath); - this.globalState.update(SEEN_DEBUG_LOG_LEVEL_ON_ACTIVATION_AT_LEAST_ONCE, true); + void this.globalState.update(SEEN_DEBUG_LOG_LEVEL_ON_ACTIVATION_AT_LEAST_ONCE, true); } private async warnUserAboutLoggingToFile() { @@ -52,13 +52,13 @@ export class DebugLoggingManager implements IDebugLoggingManager { const prompt = Logging.bannerYesTurnOffDebugLogging(); const no = Logging.NoResponse(); const dontAskAgain = Logging.NoAndDontAskAgain(); - this.appShell + void this.appShell .showWarningMessage(Logging.warnUserAboutDebugLoggingSetting(), ...[prompt, no, dontAskAgain]) .then((selection) => { if (selection === prompt) { - this.commandManager.executeCommand(Commands.ResetLoggingLevel); + void this.commandManager.executeCommand(Commands.ResetLoggingLevel); } else if (selection === dontAskAgain) { - this.globalState.update(ASKED_ALREADY_FOR_LOG_LEVEL, true); + void this.globalState.update(ASKED_ALREADY_FOR_LOG_LEVEL, true); } }); } diff --git a/src/client/logging/gitHubIssueCommandListener.ts b/src/client/logging/gitHubIssueCommandListener.ts index bec94307dbf..d56998ab239 100644 --- a/src/client/logging/gitHubIssueCommandListener.ts +++ b/src/client/logging/gitHubIssueCommandListener.ts @@ -91,7 +91,7 @@ ${'```'} const edit = new WorkspaceEdit(); edit.insert(this.issueFilePath, new Position(0, 0), formatted); await workspace.applyEdit(edit); - this.commandManager.executeCommand('vscode.open', this.issueFilePath); + void this.commandManager.executeCommand('vscode.open', this.issueFilePath); } catch (err) { traceError(err); } @@ -167,7 +167,7 @@ ${'```'} private closeIssueEditorOnSuccess() { if (window.activeTextEditor?.document === this.issueTextDocument) { - this.commandManager.executeCommand('workbench.action.closeActiveEditor'); + void this.commandManager.executeCommand('workbench.action.closeActiveEditor'); } } diff --git a/src/client/logging/logger.ts b/src/client/logging/logger.ts index b1b2fb7d1a6..6064c29cc1a 100644 --- a/src/client/logging/logger.ts +++ b/src/client/logging/logger.ts @@ -39,7 +39,7 @@ interface IConfigurableLogger { add(transport: Transport): void; } -// tslint:disable-next-line: no-suspicious-comment +// eslint-disable-next-line /** * TODO: We should actually have this method in `./_global.ts` as this is exported globally. * But for some reason, importing '../client/logging/_global' fails when launching the tests. diff --git a/src/client/logging/trace.ts b/src/client/logging/trace.ts index 3191df5bd9d..99cce0a7498 100644 --- a/src/client/logging/trace.ts +++ b/src/client/logging/trace.ts @@ -71,7 +71,7 @@ function logResult(loggers: ILogger[], info: LogInfo, traced: TraceInfo, call?: } } else { logToAll(loggers, LogLevel.Error, [formatted, traced.err]); - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any sendTelemetryEvent('ERROR' as any, undefined, undefined, traced.err); } } diff --git a/src/client/logging/transports.ts b/src/client/logging/transports.ts index d28c3d3c27e..f96be912b11 100644 --- a/src/client/logging/transports.ts +++ b/src/client/logging/transports.ts @@ -20,7 +20,7 @@ const EXTENSION_ROOT_DIR = const formattedMessage = Symbol.for('message'); export function isConsoleTransport(transport: unknown): boolean { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any return (transport as any).isConsole; } @@ -28,7 +28,7 @@ export function isConsoleTransport(transport: unknown): boolean { // We do not use transports.ConsoleTransport because it cannot // adapt to our custom log levels very well. class ConsoleTransport extends Transport { - // tslint:disable:no-console + /* eslint-disable no-console */ private static funcByLevel: { [K in LogLevel]: (...args: Arguments) => void } = { [LogLevel.Error]: console.error, [LogLevel.Warn]: console.warn, @@ -37,20 +37,20 @@ class ConsoleTransport extends Transport { [LogLevel.Trace]: console.trace }; private static defaultFunc = console.log; - // tslint:enable:no-console + /* eslint-enable no-console */ // This is used to identify the type. public readonly isConsole = true; constructor( - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any options?: any, private readonly levels?: winston.config.AbstractConfigSetLevels ) { super(options); } - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public log?(info: { level: string; message: string; [formattedMessage]: string }, next: () => void): any { setImmediate(() => this.emit('logged', info)); const level = resolveLevel(info.level, this.levels); @@ -79,11 +79,11 @@ export function getConsoleTransport(formatter: logform.Format): Transport { } class JupyterOutputChannelTransport extends Transport { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any constructor(private readonly channel: OutputChannel, options?: any) { super(options); } - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public log?(info: { message: string; [formattedMessage]: string }, next: () => void): any { setImmediate(() => this.emit('logged', info)); this.channel.appendLine(info[formattedMessage] || info.message); diff --git a/src/client/logging/util.ts b/src/client/logging/util.ts index 79d977136a8..bde40f850f0 100644 --- a/src/client/logging/util.ts +++ b/src/client/logging/util.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. 'use strict'; -// tslint:disable-next-line:no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any export type Arguments = any[]; function valueToLogString(value: unknown, kind: string): string { @@ -13,9 +13,9 @@ function valueToLogString(value: unknown, kind: string): string { return 'null'; } try { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any if (value && (value as any).fsPath) { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any return ``; } return JSON.stringify(value); diff --git a/src/client/startupTelemetry.ts b/src/client/startupTelemetry.ts index 824744cb10a..9e4ef4aea04 100644 --- a/src/client/startupTelemetry.ts +++ b/src/client/startupTelemetry.ts @@ -14,7 +14,7 @@ interface IStopWatch { } export async function sendStartupTelemetry( - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any activatedPromise: Promise, durations: Record, stopWatch: IStopWatch, @@ -40,7 +40,7 @@ export async function sendErrorTelemetry( serviceContainer?: IServiceContainer ) { try { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any let props: any = {}; if (serviceContainer) { try { @@ -56,9 +56,9 @@ export async function sendErrorTelemetry( } async function getActivationTelemetryProps(serviceContainer: IServiceContainer): Promise { - // tslint:disable-next-line:no-suspicious-comment + // eslint-disable-next-line // TODO: Not all of this data is showing up in the database... - // tslint:disable-next-line:no-suspicious-comment + // eslint-disable-next-line // TODO: If any one of these parts fails we send no info. We should // be able to partially populate as much as possible instead // (through granular try-catch statements). diff --git a/src/client/telemetry/importTracker.ts b/src/client/telemetry/importTracker.ts index b0fa9f9f2cb..f6f7ece4df1 100644 --- a/src/client/telemetry/importTracker.ts +++ b/src/client/telemetry/importTracker.ts @@ -48,7 +48,7 @@ const testExecution = isTestExecution(); export class ImportTracker implements IExtensionSingleActivationService, INotebookExecutionLogger { private pendingChecks = new Map(); private sentMatches: Set = new Set(); - // tslint:disable-next-line:no-require-imports + // eslint-disable-next-line @typescript-eslint/no-require-imports private hashFn = require('hash.js').sha256; constructor( @@ -143,7 +143,7 @@ export class ImportTracker implements IExtensionSingleActivationService, INotebo // If already scheduled, cancel. const currentTimeout = this.pendingChecks.get(file); if (currentTimeout) { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any clearTimeout(currentTimeout as any); this.pendingChecks.delete(file); } diff --git a/src/client/telemetry/index.ts b/src/client/telemetry/index.ts index 26df8756871..5562ffeb9bb 100644 --- a/src/client/telemetry/index.ts +++ b/src/client/telemetry/index.ts @@ -3,7 +3,7 @@ import type { JSONObject } from '@phosphor/coreutils'; import * as stackTrace from 'stack-trace'; -// tslint:disable-next-line: import-name +// eslint-disable-next-line import TelemetryReporter from 'vscode-extension-telemetry/lib/telemetryReporter'; import { IWorkspaceService } from '../common/application/types'; @@ -20,7 +20,7 @@ import { import { ExportFormat } from '../datascience/export/types'; import { EventName, PlatformErrors } from './constants'; -// tslint:disable: no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ /** * Checks whether telemetry is supported. @@ -30,9 +30,9 @@ import { EventName, PlatformErrors } from './constants'; */ function isTelemetrySupported(): boolean { try { - // tslint:disable-next-line:no-require-imports + // eslint-disable-next-line @typescript-eslint/no-require-imports const vsc = require('vscode'); - // tslint:disable-next-line:no-require-imports + // eslint-disable-next-line @typescript-eslint/no-require-imports const reporter = require('vscode-extension-telemetry'); return vsc !== undefined && reporter !== undefined; } catch { @@ -81,12 +81,12 @@ function getTelemetryReporter() { return telemetryReporter; } const extensionId = JVSC_EXTENSION_ID; - // tslint:disable-next-line:no-require-imports + // eslint-disable-next-line @typescript-eslint/no-require-imports const extensions = (require('vscode') as typeof import('vscode')).extensions; const extension = extensions.getExtension(extensionId)!; const extensionVersion = extension.packageJSON.version; - // tslint:disable-next-line:no-require-imports + // eslint-disable-next-line @typescript-eslint/no-require-imports const reporter = require('vscode-extension-telemetry').default as typeof TelemetryReporter; return (telemetryReporter = new reporter(extensionId, extensionVersion, AppinsightsKey, true)); } @@ -182,7 +182,7 @@ type TypedMethodDescriptor = ( * @param lazyProperties A static function on the decorated class which returns extra properties to add to the event. * This can be used to provide properties which are only known at runtime (after the decorator has executed). */ -// tslint:disable-next-line:no-any function-name +// eslint-disable-next-line @typescript-eslint/no-explicit-any, export function captureTelemetry( eventName: E, properties?: P[E], @@ -190,20 +190,20 @@ export function captureTelemetry P[E] ): TypedMethodDescriptor<(this: This, ...args: any[]) => any> { - // tslint:disable-next-line:no-function-expression no-any + // eslint-disable-next-line , @typescript-eslint/no-explicit-any return function ( _target: Object, _propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<(this: This, ...args: any[]) => any> ) { const originalMethod = descriptor.value!; - // tslint:disable-next-line:no-function-expression no-any + // eslint-disable-next-line , @typescript-eslint/no-explicit-any descriptor.value = function (this: This, ...args: any[]) { // Legacy case; fast path that sends event before method executes. // Does not set "failed" if the result is a Promise and throws an exception. if (!captureDuration && !lazyProperties) { sendTelemetryEvent(eventName, undefined, properties); - // tslint:disable-next-line:no-invalid-this + // eslint-disable-next-line no-invalid-this return originalMethod.apply(this, args); } @@ -216,21 +216,21 @@ export function captureTelemetry) .then((data) => { sendTelemetryEvent(eventName, stopWatch?.elapsedTime, props()); return data; }) - // tslint:disable-next-line:promise-function-async + // eslint-disable-next-line @typescript-eslint/promise-function-async .catch((ex) => { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const failedProps: P[E] = props() || ({} as any); (failedProps as any).failed = true; sendTelemetryEvent( @@ -260,16 +260,16 @@ export function sendTelemetryWhenDone

).then( (data) => { - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion sendTelemetryEvent(eventName, stopWatch!.elapsedTime, properties); return data; - // tslint:disable-next-line:promise-function-async + // eslint-disable-next-line @typescript-eslint/promise-function-async }, (ex) => { - // tslint:disable-next-line:no-non-null-assertion + // eslint-disable-next-line @typescript-eslint/no-non-null-assertion sendTelemetryEvent(eventName, stopWatch!.elapsedTime, properties, ex); return Promise.reject(ex); } diff --git a/src/datascience-ui/common/cellFactory.ts b/src/datascience-ui/common/cellFactory.ts index b65dff477de..e251ce92b0d 100644 --- a/src/datascience-ui/common/cellFactory.ts +++ b/src/datascience-ui/common/cellFactory.ts @@ -4,7 +4,7 @@ 'use strict'; import { nbformat } from '@jupyterlab/coreutils'; -// tslint:disable-next-line: no-require-imports no-var-requires +// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires const cloneDeep = require('lodash/cloneDeep'); import '../../client/common/extensions'; import { appendLineFeed, generateMarkdownFromCodeLines } from './index'; @@ -45,10 +45,10 @@ export function createErrorOutput(error: Partial): nbformat.IError { }; } export function createCodeCell(): nbformat.ICodeCell; -// tslint:disable-next-line: unified-signatures +// eslint-disable-next-line @typescript-eslint/unified-signatures export function createCodeCell(code: string): nbformat.ICodeCell; export function createCodeCell(code: string[], outputs: nbformat.IOutput[]): nbformat.ICodeCell; -// tslint:disable-next-line: unified-signatures +// eslint-disable-next-line @typescript-eslint/unified-signatures export function createCodeCell(code: string[], magicCommandsAsComments: boolean): nbformat.ICodeCell; export function createCodeCell(code?: string | string[], options?: boolean | nbformat.IOutput[]): nbformat.ICodeCell { const magicCommandsAsComments = typeof options === 'boolean' ? options : false; @@ -85,37 +85,37 @@ export function cloneCell(cell: T): T { case 'code': { const codeCell: nbformat.ICodeCell = { cell_type: 'code', - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any metadata: (clonedCell.metadata ?? {}) as any, execution_count: typeof clonedCell.execution_count === 'number' ? clonedCell.execution_count : null, outputs: Array.isArray(clonedCell.outputs) ? (clonedCell.outputs as nbformat.IOutput[]) : [], source }; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any return (codeCell as any) as T; } case 'markdown': { const markdownCell: nbformat.IMarkdownCell = { cell_type: 'markdown', - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any metadata: (clonedCell.metadata ?? {}) as any, source, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any attachments: clonedCell.attachments as any }; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any return (markdownCell as any) as T; } case 'raw': { const rawCell: nbformat.IRawCell = { cell_type: 'raw', - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any metadata: (clonedCell.metadata ?? {}) as any, source, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any attachments: clonedCell.attachments as any }; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any return (rawCell as any) as T; } default: { @@ -132,18 +132,18 @@ export function createCellFrom( // If we're creating a new cell from the same base type, then ensure we preserve the metadata. const baseCell: nbformat.IBaseCell = source.cell_type === target - ? // tslint:disable-next-line: no-any + ? // eslint-disable-next-line @typescript-eslint/no-explicit-any (cloneCell(source) as any) : { source: source.source, cell_type: target, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any metadata: cloneDeep(source.metadata) as any }; switch (target) { case 'code': { - // tslint:disable-next-line: no-unnecessary-local-variable no-any + // eslint-disable-next-line , @typescript-eslint/no-explicit-any const codeCell = (baseCell as any) as nbformat.ICodeCell; codeCell.execution_count = null; codeCell.outputs = []; diff --git a/src/datascience-ui/common/index.ts b/src/datascience-ui/common/index.ts index c744c2d5646..8f2b23788f8 100644 --- a/src/datascience-ui/common/index.ts +++ b/src/datascience-ui/common/index.ts @@ -153,7 +153,7 @@ export function generateMarkdownFromCodeLines(lines: string[]) { return appendLineFeed(extractComments(lines.slice(lines.length > 1 ? 1 : 0))); } -// tslint:disable-next-line: cyclomatic-complexity +// eslint-disable-next-line complexity export function parseForComments( lines: string[], foundCommentLine: (s: string, i: number) => void, diff --git a/src/datascience-ui/common/main.ts b/src/datascience-ui/common/main.ts index 870ae21034f..40a0d2f5b94 100644 --- a/src/datascience-ui/common/main.ts +++ b/src/datascience-ui/common/main.ts @@ -3,9 +3,9 @@ declare let __webpack_public_path__: string; -// tslint:disable-next-line: no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any if ((window as any).__PVSC_Public_Path) { // This variable tells Webpack to this as the root path used to request webpack bundles. - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any __webpack_public_path__ = (window as any).__PVSC_Public_Path; } diff --git a/src/datascience-ui/data-explorer/cellFormatter.tsx b/src/datascience-ui/data-explorer/cellFormatter.tsx index 7c29d00a126..e2a5283ad6d 100644 --- a/src/datascience-ui/data-explorer/cellFormatter.tsx +++ b/src/datascience-ui/data-explorer/cellFormatter.tsx @@ -21,7 +21,7 @@ class CellFormatter extends React.Component { public render() { // Render based on type if (this.props.value !== null && this.props.columnDef && this.props.columnDef.hasOwnProperty('type')) { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const columnType = (this.props.columnDef as any).type; switch (columnType) { case ColumnType.Bool: @@ -67,7 +67,7 @@ class CellFormatter extends React.Component { export function cellFormatterFunc( _row: number, _cell: number, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any value: any, columnDef: Slick.Column, _dataContext: Slick.SlickData diff --git a/src/datascience-ui/data-explorer/globalJQueryImports.ts b/src/datascience-ui/data-explorer/globalJQueryImports.ts index d3bfae0a054..40641bb3756 100644 --- a/src/datascience-ui/data-explorer/globalJQueryImports.ts +++ b/src/datascience-ui/data-explorer/globalJQueryImports.ts @@ -14,11 +14,11 @@ After that we need to load slickgrid, and then the jQuery plugin from slickgrid // use slickgridJQ instead of the usual $ to make it clear that we need that JQ and not // the one currently in node-modules -// tslint:disable-next-line: no-var-requires no-require-imports +// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports require('expose-loader?jQuery!slickgrid/lib/jquery-1.11.2.min'); -// tslint:disable-next-line: no-var-requires no-require-imports +// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports require('slickgrid/lib/jquery-1.11.2.min'); -// tslint:disable-next-line: no-var-requires no-require-imports +// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports require('expose-loader?jQuery.fn.drag!slickgrid/lib/jquery.event.drag-2.3.0'); diff --git a/src/datascience-ui/data-explorer/index.tsx b/src/datascience-ui/data-explorer/index.tsx index aa6136295e4..7c2a3b53cc5 100644 --- a/src/datascience-ui/data-explorer/index.tsx +++ b/src/datascience-ui/data-explorer/index.tsx @@ -6,7 +6,7 @@ import '../common/main'; // This must be on top, do not change. Required by webpack. -// tslint:disable-next-line: ordered-imports +// eslint-disable-next-line import/order import '../common/index.css'; import * as React from 'react'; @@ -21,7 +21,7 @@ export declare function acquireVsCodeApi(): IVsCodeApi; const baseTheme = detectBaseTheme(); -// tslint:disable:no-typeof-undefined +/* eslint-disable */ ReactDOM.render( , // Turn this back off when we have real variable explorer data document.getElementById('root') as HTMLElement diff --git a/src/datascience-ui/data-explorer/mainPanel.tsx b/src/datascience-ui/data-explorer/mainPanel.tsx index 0b32fd0cbda..2110e0c855c 100644 --- a/src/datascience-ui/data-explorer/mainPanel.tsx +++ b/src/datascience-ui/data-explorer/mainPanel.tsx @@ -35,7 +35,7 @@ export interface IMainPanelProps { testMode?: boolean; } -//tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ interface IMainPanelState { gridColumns: Slick.Column[]; gridRows: ISlickRow[]; @@ -59,7 +59,7 @@ export class MainPanel extends React.Component private grid: React.RefObject = React.createRef(); private updateTimeout?: NodeJS.Timer | number; - // tslint:disable-next-line:max-func-body-length + // eslint-disable-next-line constructor(props: IMainPanelProps, _state: IMainPanelState) { super(props); @@ -133,7 +133,7 @@ export class MainPanel extends React.Component ); }; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public handleMessage = (msg: string, payload?: any) => { switch (msg) { case DataViewerMessages.InitializeData: @@ -197,7 +197,7 @@ export class MainPanel extends React.Component ); } - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any private initializeData(payload: any) { // Payload should be an IJupyterVariable with the first 100 rows filled out if (payload) { diff --git a/src/datascience-ui/data-explorer/reactSlickGrid.tsx b/src/datascience-ui/data-explorer/reactSlickGrid.tsx index 12a67ede2f6..d964e55e45a 100644 --- a/src/datascience-ui/data-explorer/reactSlickGrid.tsx +++ b/src/datascience-ui/data-explorer/reactSlickGrid.tsx @@ -14,26 +14,26 @@ import { ReactSlickGridFilterBox } from './reactSlickGridFilterBox'; WARNING: Do not change the order of these imports. Slick grid MUST be imported after we load jQuery and other stuff from `./globalJQueryImports` */ -// tslint:disable-next-line: no-var-requires no-require-imports +// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports const slickgridJQ = require('slickgrid/lib/jquery-1.11.2.min'); // Adding comments to ensure order of imports does not change due to auto formatters. -// tslint:disable-next-line: ordered-imports +// eslint-disable-next-line import/order import 'slickgrid/slick.core'; // Adding comments to ensure order of imports does not change due to auto formatters. -// tslint:disable-next-line: ordered-imports +// eslint-disable-next-line import/order import 'slickgrid/slick.dataview'; // Adding comments to ensure order of imports does not change due to auto formatters. -// tslint:disable-next-line: ordered-imports +// eslint-disable-next-line import/order import 'slickgrid/slick.grid'; // Adding comments to ensure order of imports does not change due to auto formatters. -// tslint:disable-next-line: ordered-imports +// eslint-disable-next-line import/order import 'slickgrid/plugins/slick.autotooltips'; // Adding comments to ensure order of imports does not change due to auto formatters. -// tslint:disable-next-line: ordered-imports +// eslint-disable-next-line import/order import 'slickgrid/slick.grid.css'; // Make sure our css comes after the slick grid css. We override some of its styles. -// tslint:disable-next-line: ordered-imports +// eslint-disable-next-line import/order import './reactSlickGrid.css'; /* WARNING: Do not change the order of these imports. @@ -51,7 +51,7 @@ export interface ISlickGridAdd { newRows: ISlickRow[]; } -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ export interface ISlickGridProps { idProperty: string; columns: Slick.Column[]; @@ -144,7 +144,7 @@ export class ReactSlickGrid extends React.Component { window.addEventListener('resize', this.windowResized); @@ -480,7 +480,7 @@ export class ReactSlickGrid extends React.Component diff --git a/src/datascience-ui/history-react/interactiveCell.tsx b/src/datascience-ui/history-react/interactiveCell.tsx index 142be5b6c71..4236aef6af8 100644 --- a/src/datascience-ui/history-react/interactiveCell.tsx +++ b/src/datascience-ui/history-react/interactiveCell.tsx @@ -48,7 +48,7 @@ interface IInteractiveCellBaseProps { type IInteractiveCellProps = IInteractiveCellBaseProps & typeof actionCreators; -// tslint:disable: react-this-binding-issue +/* eslint-disable */ export class InteractiveCell extends React.Component { private codeRef: React.RefObject = React.createRef(); private wrapperRef: React.RefObject = React.createRef(); @@ -85,7 +85,7 @@ export class InteractiveCell extends React.Component { private scrollAndFlash() { if (this.wrapperRef && this.wrapperRef.current) { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any if ((this.wrapperRef.current as any).scrollIntoView) { this.wrapperRef.current.scrollIntoView({ behavior: 'auto', block: 'nearest', inline: 'nearest' }); } @@ -108,7 +108,7 @@ export class InteractiveCell extends React.Component { // Scroll into view (since we have focus). However this function // is not supported on enzyme - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any if ((this.wrapperRef.current as any).scrollIntoView) { this.wrapperRef.current.scrollIntoView({ behavior: 'auto', block: 'nearest', inline: 'nearest' }); } diff --git a/src/datascience-ui/history-react/interactivePanel.tsx b/src/datascience-ui/history-react/interactivePanel.tsx index 28ff25c91c8..a7dbb681a21 100644 --- a/src/datascience-ui/history-react/interactivePanel.tsx +++ b/src/datascience-ui/history-react/interactivePanel.tsx @@ -19,7 +19,7 @@ import { InteractiveCellComponent } from './interactiveCell'; import './interactivePanel.less'; import { actionCreators } from './redux/actions'; -// tslint:disable: no-suspicious-comment +/* eslint-disable */ export type IInteractivePanelProps = IMainWithVariables & typeof actionCreators; @@ -96,7 +96,7 @@ ${buildSettingsCss(this.props.settings)}`} this.props.focusInput(); }; - // tslint:disable-next-line: max-func-body-length + // eslint-disable-next-line private renderToolbarPanel() { const variableExplorerTooltip = this.props.variableState.visible ? getLocString('DataScience.collapseVariableExplorerTooltip', 'Hide variables active in jupyter kernel') diff --git a/src/datascience-ui/history-react/redux/actions.ts b/src/datascience-ui/history-react/redux/actions.ts index a0c54c7f14a..40e04f09c34 100644 --- a/src/datascience-ui/history-react/redux/actions.ts +++ b/src/datascience-ui/history-react/redux/actions.ts @@ -33,7 +33,7 @@ function createIncomingActionWithPayload< M extends IInteractiveWindowMapping & CommonActionTypeMapping, K extends keyof M >(type: K, data: M[K]): CommonAction { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any return { type, payload: { data, messageDirection: 'incoming' } as any } as any; } // This function isn't made common and not exported, to ensure it isn't used elsewhere. diff --git a/src/datascience-ui/history-react/redux/reducers/execution.ts b/src/datascience-ui/history-react/redux/reducers/execution.ts index 1605cc79f8c..d1926b874c2 100644 --- a/src/datascience-ui/history-react/redux/reducers/execution.ts +++ b/src/datascience-ui/history-react/redux/reducers/execution.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. 'use strict'; -// tslint:disable-next-line: no-require-imports no-var-requires +// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires const cloneDeep = require('lodash/cloneDeep'); import * as uuid from 'uuid/v4'; diff --git a/src/datascience-ui/interactive-common/cellInput.tsx b/src/datascience-ui/interactive-common/cellInput.tsx index 89cb3c2f164..d67384f09b8 100644 --- a/src/datascience-ui/interactive-common/cellInput.tsx +++ b/src/datascience-ui/interactive-common/cellInput.tsx @@ -15,7 +15,7 @@ import { InputHistory } from './inputHistory'; import { ICellViewModel, IFont } from './mainState'; import { Markdown } from './markdown'; -// tslint:disable-next-line: no-require-importss +// eslint-disable-next-line interface ICellInputProps { cellVM: ICellViewModel; language: string; @@ -43,7 +43,7 @@ interface ICellInputProps { unfocused?(cellId: string): void; } -// tslint:disable: react-this-binding-issue +/* eslint-disable */ export class CellInput extends React.Component { private codeRef: React.RefObject = React.createRef(); private markdownRef: React.RefObject = React.createRef(); diff --git a/src/datascience-ui/interactive-common/cellOutput.tsx b/src/datascience-ui/interactive-common/cellOutput.tsx index ef6f250eb66..f0db887a697 100644 --- a/src/datascience-ui/interactive-common/cellOutput.tsx +++ b/src/datascience-ui/interactive-common/cellOutput.tsx @@ -18,12 +18,12 @@ import { ICellViewModel } from './mainState'; import { fixMarkdown } from './markdownManipulation'; import { getRichestMimetype, getTransform, isIPyWidgetOutput, isMimeTypeSupported } from './transforms'; -// tslint:disable-next-line: no-var-requires no-require-imports +// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports const ansiToHtml = require('ansi-to-html'); -// tslint:disable-next-line: no-var-requires no-require-imports +// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports const lodashEscape = require('lodash/escape'); -// tslint:disable-next-line: no-require-imports no-var-requires +// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires const cloneDeep = require('lodash/cloneDeep'); import { Widget } from '@phosphor/widgets'; import { noop } from '../../client/common/utils/misc'; @@ -58,9 +58,9 @@ interface ICellOutput { outputSpanClassName?: string; // Wrap this output in a span with the following className, undefined to not wrap doubleClick(): void; // Double click handler for plot viewing is stored here } -// tslint:disable: react-this-binding-issue +/* eslint-disable */ export class CellOutput extends React.Component { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any private static get ansiToHtmlClass(): ClassType { if (!CellOutput.ansiToHtmlClass_ctor) { // ansiToHtml is different between the tests running and webpack. figure out which one @@ -72,12 +72,12 @@ export class CellOutput extends React.Component { } return CellOutput.ansiToHtmlClass_ctor!; } - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any private static ansiToHtmlClass_ctor: ClassType | undefined; private ipyWidgetRef: React.RefObject; private renderedViews = new Map>(); private widgetManager: WidgetManager | undefined; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any constructor(prop: ICellOutputProps) { super(prop); this.ipyWidgetRef = React.createRef(); @@ -153,7 +153,7 @@ export class CellOutput extends React.Component { return; } } - // tslint:disable-next-line: max-func-body-length + // eslint-disable-next-line public componentDidUpdate(prevProps: ICellOutputProps) { if (!this.isCodeCell() || !this.hasOutput() || !this.getCodeCell().outputs || this.props.hideOutput) { return; @@ -175,7 +175,7 @@ export class CellOutput extends React.Component { public shouldComponentUpdate( nextProps: Readonly, _nextState: Readonly, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any _nextContext: any ): boolean { if (nextProps === this.props) { @@ -258,7 +258,7 @@ export class CellOutput extends React.Component { return ( this.renderCodeOutputs() .filter((item) => !!item) - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any .map((item) => (item as any) as JSX.Element) ); } else if (this.props.cellVM.cell.id !== Identifiers.EditCellId) { @@ -276,7 +276,7 @@ export class CellOutput extends React.Component { const outputs = this.renderOutputs(this.getCodeCell().outputs, trim); // Render any UI side errors - // tslint:disable: react-no-dangerous-html + /* eslint-disable */ if (this.props.cellVM.uiSideError) { outputs.push(

@@ -478,7 +478,7 @@ export class CellOutput extends React.Component { } } - // tslint:disable-next-line: max-func-body-length + // eslint-disable-next-line private renderOutputs(outputs: nbformat.IOutput[], trim: string): JSX.Element[] { return [this.renderOutput(outputs, trim)]; } @@ -559,7 +559,7 @@ export class CellOutput extends React.Component { private renderWidget(widgetOutput: ICellOutputData) { // Create a view for this widget if we haven't already - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const widgetData: any = widgetOutput.mimeBundle[WIDGET_MIMETYPE]; if (widgetData.model_id) { if (!this.renderedViews.has(widgetData.model_id)) { diff --git a/src/datascience-ui/interactive-common/contentPanel.tsx b/src/datascience-ui/interactive-common/contentPanel.tsx index 159de8f66c2..d5d9aa3544f 100644 --- a/src/datascience-ui/interactive-common/contentPanel.tsx +++ b/src/datascience-ui/interactive-common/contentPanel.tsx @@ -9,8 +9,8 @@ import { InputHistory } from './inputHistory'; import { ICellViewModel } from './mainState'; // See the discussion here: https://github.com/Microsoft/tslint-microsoft-contrib/issues/676 -// tslint:disable: react-this-binding-issue -// tslint:disable-next-line:no-require-imports no-var-requires +/* eslint-disable */ +// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires const throttle = require('lodash/throttle') as typeof import('lodash/throttle'); export interface IContentPanelProps { diff --git a/src/datascience-ui/interactive-common/editor.tsx b/src/datascience-ui/interactive-common/editor.tsx index 7eca634b252..7549946b15b 100644 --- a/src/datascience-ui/interactive-common/editor.tsx +++ b/src/datascience-ui/interactive-common/editor.tsx @@ -24,7 +24,7 @@ const TOP_STACK_FRAME_DECORATION: monacoEditor.editor.IModelDecorationOptions = stickiness }; -// tslint:disable-next-line: import-name +// eslint-disable-next-line export interface IEditorProps { content: string; version: number; @@ -189,7 +189,7 @@ export class Editor extends React.Component { this.modelRef = model; // Disable undo/redo on the model if asked - // tslint:disable: no-any + /* eslint-disable @typescript-eslint/no-explicit-any */ if (this.props.disableUndoStack && (model as any).undo && (model as any).redo) { (model as any).undo = noop; (model as any).redo = noop; @@ -209,7 +209,7 @@ export class Editor extends React.Component { this.subscriptions.push(editor.onDidBlurEditorWidget(this.props.unfocused ? this.props.unfocused : noop)); }; - // tslint:disable-next-line: cyclomatic-complexity + // eslint-disable-next-line complexity private onKeyDown = (e: monacoEditor.IKeyboardEvent) => { if (this.monacoRef.current) { const cursor = this.monacoRef.current.getPosition(); diff --git a/src/datascience-ui/interactive-common/images.d.ts b/src/datascience-ui/interactive-common/images.d.ts index f83b33cbc71..cbf25fc92eb 100644 --- a/src/datascience-ui/interactive-common/images.d.ts +++ b/src/datascience-ui/interactive-common/images.d.ts @@ -1,4 +1,4 @@ -// tslint:disable:copyright +/* eslint-disable */ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. diff --git a/src/datascience-ui/interactive-common/informationMessages.tsx b/src/datascience-ui/interactive-common/informationMessages.tsx index 3d7a6599477..6c0a97091b2 100644 --- a/src/datascience-ui/interactive-common/informationMessages.tsx +++ b/src/datascience-ui/interactive-common/informationMessages.tsx @@ -4,7 +4,7 @@ import * as React from 'react'; -// tslint:disable-next-line:match-default-export-name import-name +// eslint-disable-next-line interface IInformationMessagesProps { messages: string[]; } diff --git a/src/datascience-ui/interactive-common/mainState.ts b/src/datascience-ui/interactive-common/mainState.ts index 3ff55cc82a3..5c4dd38a426 100644 --- a/src/datascience-ui/interactive-common/mainState.ts +++ b/src/datascience-ui/interactive-common/mainState.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. 'use strict'; import { nbformat } from '@jupyterlab/coreutils'; -// tslint:disable-next-line: no-require-imports no-var-requires +// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires const cloneDeep = require('lodash/cloneDeep'); import * as monacoEditor from 'monaco-editor/esm/vs/editor/editor.api'; import * as path from 'path'; @@ -154,7 +154,7 @@ export enum ServerStatus { Restarting = 'Restarting' } -// tslint:disable-next-line: no-multiline-string +// eslint-disable-next-line no-multi-str const darkStyle = ` :root { --code-comment-color: #6A9955; @@ -340,7 +340,7 @@ export function generateTestCells(filePath: string, repetitions: number): ICell[ ); } -//tslint:disable:max-func-body-length +/* eslint-disable */ function generateCellData(): (nbformat.ICodeCell | nbformat.IMarkdownCell | nbformat.IRawCell | IMessageCell)[] { // Hopefully new entries here can just be copied out of a jupyter notebook (ipynb) return [ @@ -355,7 +355,7 @@ function generateCellData(): (nbformat.ICodeCell | nbformat.IMarkdownCell | nbfo outputs: [ { data: { - // tslint:disable-next-line: no-multiline-string + // eslint-disable-next-line no-multi-str 'text/html': [ `
diff --git a/src/datascience-ui/react-common/errorBoundary.tsx b/src/datascience-ui/react-common/errorBoundary.tsx index a37bc55cc14..3b05bdf8fb3 100644 --- a/src/datascience-ui/react-common/errorBoundary.tsx +++ b/src/datascience-ui/react-common/errorBoundary.tsx @@ -26,7 +26,7 @@ export class ErrorBoundary extends React.Component<{}, IErrorState> { if (this.state.hasError) { // Render our error message; const style: React.CSSProperties = {}; - // tslint:disable-next-line:no-string-literal + // eslint-disable-next-line @typescript-eslint/dot-notation style['whiteSpace'] = 'pre'; return

{this.state.errorMessage}

; diff --git a/src/datascience-ui/react-common/event.ts b/src/datascience-ui/react-common/event.ts index ab2fed36955..aa11335519c 100644 --- a/src/datascience-ui/react-common/event.ts +++ b/src/datascience-ui/react-common/event.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. 'use strict'; -// tslint:disable: no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ export type Event = (listener: (e?: T) => any) => void; // Simpler version of the vscode event emitter for passing down through react components. diff --git a/src/datascience-ui/react-common/image.tsx b/src/datascience-ui/react-common/image.tsx index 8e2b2cf012f..e1cc20719ed 100644 --- a/src/datascience-ui/react-common/image.tsx +++ b/src/datascience-ui/react-common/image.tsx @@ -4,7 +4,7 @@ 'use strict'; import * as React from 'react'; -// tslint:disable-next-line:import-name match-default-export-name +// eslint-disable-next-line , import InlineSVG from 'svg-inline-react'; // This react component loads our svg files inline so that we can load them in vscode as it no longer @@ -56,7 +56,7 @@ export enum ImageName { } // All of the images must be 'require' so that webpack doesn't rewrite the import as requiring a .default. -// tslint:disable:no-require-imports +/* eslint-disable @typescript-eslint/no-require-imports */ const images: { [key: string]: { light: string; dark: string } } = { Cancel: { light: require('./images/Cancel/Cancel_16xMD_vscode.svg'), @@ -118,7 +118,7 @@ const images: { [key: string]: { light: string; dark: string } } = { light: require('./images/Prev/previous.svg'), dark: require('./images/Prev/previous-inverse.svg') }, - // tslint:disable-next-line: no-suspicious-comment + // eslint-disable-next-line // Todo: Get new images from a designer. These are all temporary. Pan: { light: require('./images/Pan/pan.svg'), diff --git a/src/datascience-ui/react-common/logger.ts b/src/datascience-ui/react-common/logger.ts index 254769d3a1f..ed0659a59e7 100644 --- a/src/datascience-ui/react-common/logger.ts +++ b/src/datascience-ui/react-common/logger.ts @@ -9,7 +9,7 @@ const enableLogger = !isTestExecution() || process.env.VSC_JUPYTER_FORCE_LOGGING export function logMessage(message: string) { // put here to prevent having to disable the console log warning if (enableLogger) { - // tslint:disable-next-line: no-console + // eslint-disable-next-line no-console console.log(message); } } diff --git a/src/datascience-ui/react-common/monacoEditor.tsx b/src/datascience-ui/react-common/monacoEditor.tsx index cc1136d77df..3bf89afa64b 100644 --- a/src/datascience-ui/react-common/monacoEditor.tsx +++ b/src/datascience-ui/react-common/monacoEditor.tsx @@ -9,12 +9,12 @@ import { isTestExecution } from '../../client/common/constants'; import { IDisposable } from '../../client/common/types'; import { logMessage } from './logger'; -// tslint:disable-next-line:no-require-imports no-var-requires +// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires const debounce = require('lodash/debounce') as typeof import('lodash/debounce'); // See the discussion here: https://github.com/Microsoft/tslint-microsoft-contrib/issues/676 -// tslint:disable: react-this-binding-issue -// tslint:disable-next-line:no-require-imports no-var-requires +/* eslint-disable */ +// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires const throttle = require('lodash/throttle') as typeof import('lodash/throttle'); import { noop } from '../../client/common/utils/misc'; @@ -110,7 +110,7 @@ export class MonacoEditor extends React.Component { if (window) { window.addEventListener('resize', this.windowResized); @@ -139,7 +139,7 @@ export class MonacoEditor extends React.Component (this.keyHasBeenPressed = true))); // Register a link opener so when a user clicks on a link we can navigate to it. - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const openerService = (editor.getContribution('editor.linkDetector') as any).openerService; if (openerService && openerService.open) { openerService.open = this.props.openLink; @@ -279,7 +279,7 @@ export class MonacoEditor extends React.Component, nextState: Readonly, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any _nextContext: any ): boolean { if (!fastDeepEqual(nextProps, this.props)) { @@ -476,7 +476,7 @@ export class MonacoEditor extends React.Component { // Have to bounce this because the leave for the cell is the // enter for the hover @@ -780,7 +780,7 @@ export class MonacoEditor extends React.Component this.outermostParentLeaveBounced(e), 0); }; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any private outermostParentLeaveBounced = (e: MouseEvent) => { if (this.state.editor && !this.enteredHover && !this.coordsInsideEditor(e.clientX, e.clientY)) { // If we haven't already entered hover, then act like it shuts down @@ -1005,7 +1005,7 @@ export class MonacoEditor extends React.Component extends Action { // Allows any extra properties to be defined in an action. - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any [extraProps: string]: any; } export type QueueAnotherFunc = (nextAction: Action) => void; diff --git a/src/datascience-ui/react-common/relativeImage.tsx b/src/datascience-ui/react-common/relativeImage.tsx index 9c67995b7c5..9f18f2ae08e 100644 --- a/src/datascience-ui/react-common/relativeImage.tsx +++ b/src/datascience-ui/react-common/relativeImage.tsx @@ -24,7 +24,7 @@ export class RelativeImage extends React.Component { } private getImageSource = () => { - // tslint:disable-next-line:no-typeof-undefined + // eslint-disable-next-line if (typeof resolvePath === 'undefined') { return this.props.path; } else { diff --git a/src/datascience-ui/react-common/settingsReactSide.ts b/src/datascience-ui/react-common/settingsReactSide.ts index f6e99d8c6a9..2d32fff0823 100644 --- a/src/datascience-ui/react-common/settingsReactSide.ts +++ b/src/datascience-ui/react-common/settingsReactSide.ts @@ -6,7 +6,7 @@ import { IJupyterExtraSettings } from '../../client/datascience/types'; export function getDefaultSettings(): IJupyterExtraSettings { // Default settings for tests - // tslint:disable-next-line: no-unnecessary-local-variable + // eslint-disable-next-line const result: Partial = { insidersChannel: 'off', experiments: { enabled: true, optInto: [], optOutFrom: [] }, @@ -18,7 +18,7 @@ export function getDefaultSettings(): IJupyterExtraSettings { jupyterLaunchTimeout: 10, jupyterLaunchRetries: 3, jupyterServerType: 'local', - // tslint:disable-next-line: no-invalid-template-strings + // eslint-disable-next-line no-template-curly-in-string notebookFileRoot: '${fileDirname}', changeDirOnImportExport: false, useDefaultConfigForJupyter: true, @@ -78,11 +78,11 @@ export function getDefaultSettings(): IJupyterExtraSettings { widgetScriptSources: [] }; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any return result as any; } -//tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ export function computeEditorOptions(settings: IJupyterExtraSettings): monacoEditor.editor.IEditorOptions { const intellisenseOptions = settings.intellisenseOptions; const extraSettings = settings.extraSettings; diff --git a/src/datascience-ui/react-common/styleInjector.tsx b/src/datascience-ui/react-common/styleInjector.tsx index 73a7643b637..c604ef0049d 100644 --- a/src/datascience-ui/react-common/styleInjector.tsx +++ b/src/datascience-ui/react-common/styleInjector.tsx @@ -56,7 +56,7 @@ export class StyleInjector extends React.Component { switch (msg) { case CssMessages.GetCssResponse: @@ -74,7 +74,7 @@ export class StyleInjector extends React.Component { aria-label={ariaLabel} aria-pressed={ariaPressed} // See the comments here: https://github.com/Microsoft/tslint-microsoft-contrib/issues/676 - // tslint:disable-next-line: react-this-binding-issue + // eslint-disable-next-line onClick={clickHandler} // See the comments here: https://github.com/Microsoft/tslint-microsoft-contrib/issues/676 - // tslint:disable-next-line: react-this-binding-issue + // eslint-disable-next-line onKeyDown={keyDownHandler} key={index} > diff --git a/src/datascience-ui/react-common/svgViewer.tsx b/src/datascience-ui/react-common/svgViewer.tsx index e477eca355f..623ebd29b35 100644 --- a/src/datascience-ui/react-common/svgViewer.tsx +++ b/src/datascience-ui/react-common/svgViewer.tsx @@ -27,7 +27,7 @@ export class SvgViewer extends React.Component private svgPanZoomRef: React.RefObject = React.createRef(); constructor(props: ISvgViewerProps) { super(props); - // tslint:disable-next-line: no-object-literal-type-assertion + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions this.state = { value: props.defaultValue ? props.defaultValue : ({} as Value), tool: props.tool }; } @@ -35,7 +35,7 @@ export class SvgViewer extends React.Component // May need to update state if props changed if (prevProps.defaultValue !== this.props.defaultValue || this.props.id !== prevProps.id) { this.setState({ - // tslint:disable-next-line: no-object-literal-type-assertion + // eslint-disable-next-line @typescript-eslint/consistent-type-assertions value: this.props.defaultValue ? this.props.defaultValue : ({} as Value), tool: this.props.tool }); diff --git a/src/datascience-ui/variable-view/index.tsx b/src/datascience-ui/variable-view/index.tsx index 86de6dca70e..cc80a95841f 100644 --- a/src/datascience-ui/variable-view/index.tsx +++ b/src/datascience-ui/variable-view/index.tsx @@ -6,7 +6,7 @@ import '../common/main'; // This must be on top, do not change. Required by webpack. -// tslint:disable-next-line: ordered-imports +// eslint-disable-next-line import/order import '../common/index.css'; import * as React from 'react'; @@ -21,9 +21,9 @@ import { getConnectedVariableViewPanel } from './variableViewPanel'; // This special function talks to vscode from a web panel export declare function acquireVsCodeApi(): IVsCodeApi; const baseTheme = detectBaseTheme(); -// tslint:disable-next-line: no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any const testMode = (window as any).inTestMode; -// tslint:disable-next-line: no-typeof-undefined +// eslint-disable-next-line const skipDefault = testMode ? false : typeof acquireVsCodeApi !== 'undefined'; // Create the redux store @@ -33,7 +33,7 @@ const store = createStore(skipDefault, baseTheme, testMode, postOffice); // Create a variable view panel connected to the redux store const ConnectedVariableViewPanel = getConnectedVariableViewPanel(); -// tslint:disable:no-typeof-undefined +/* eslint-disable */ ReactDOM.render( diff --git a/src/datascience-ui/variable-view/redux/actions.ts b/src/datascience-ui/variable-view/redux/actions.ts index 3d82bb1c499..70f6c48409f 100644 --- a/src/datascience-ui/variable-view/redux/actions.ts +++ b/src/datascience-ui/variable-view/redux/actions.ts @@ -21,7 +21,7 @@ function createIncomingActionWithPayload< M extends IInteractiveWindowMapping & CommonActionTypeMapping, K extends keyof M >(type: K, data: M[K]): CommonAction { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any return { type, payload: { data, messageDirection: 'incoming' } as any } as any; } // This function isn't made common and not exported, to ensure it isn't used elsewhere. diff --git a/src/datascience-ui/variable-view/variableViewPanel.tsx b/src/datascience-ui/variable-view/variableViewPanel.tsx index 8c20c2eb2fa..df08a5ff48b 100644 --- a/src/datascience-ui/variable-view/variableViewPanel.tsx +++ b/src/datascience-ui/variable-view/variableViewPanel.tsx @@ -7,7 +7,7 @@ import { IMainWithVariables, IStore } from '../interactive-common/redux/store'; import { IVariablePanelProps, VariablePanel } from '../interactive-common/variablePanel'; import { actionCreators } from './redux/actions'; -// tslint:disable: no-suspicious-comment +/* eslint-disable */ export type IVariableViewPanelProps = IMainWithVariables & typeof actionCreators; function mapStateToProps(state: IStore): IMainWithVariables { diff --git a/src/test/analysisEngineTest.ts b/src/test/analysisEngineTest.ts index 17412f4bf12..b3dbd27e269 100644 --- a/src/test/analysisEngineTest.ts +++ b/src/test/analysisEngineTest.ts @@ -3,7 +3,7 @@ 'use strict'; -// tslint:disable:no-console no-require-imports no-var-requires +/* eslint-disable no-console, @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires */ import * as path from 'path'; process.env.CODE_TESTS_WORKSPACE = path.join(__dirname, '..', '..', 'src', 'test'); diff --git a/src/test/common.ts b/src/test/common.ts index 26fbe240592..759116b53e8 100644 --- a/src/test/common.ts +++ b/src/test/common.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. 'use strict'; -// tslint:disable:no-console no-require-imports no-var-requires +/* eslint-disable no-console, @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires */ import * as assert from 'assert'; import * as fs from 'fs-extra'; @@ -21,7 +21,7 @@ const StreamZip = require('node-stream-zip'); export { sleep } from './core'; -// tslint:disable:no-invalid-this no-any +/* eslint-disable no-invalid-this, @typescript-eslint/no-explicit-any */ const fileInNonRootWorkspace = path.join(EXTENSION_ROOT_DIR_FOR_TESTS, 'src', 'test', 'pythonFiles', 'dummy.py'); export const rootWorkspaceUri = getWorkspaceRoot(); @@ -258,7 +258,7 @@ function getPythonPath(): string { if (process.env.CI_PYTHON_PATH && fs.existsSync(process.env.CI_PYTHON_PATH)) { return process.env.CI_PYTHON_PATH; } - // tslint:disable-next-line:no-suspicious-comment + // eslint-disable-next-line // TODO: Change this to python3. // See https://github.com/microsoft/vscode-python/issues/10910. return 'python'; @@ -511,7 +511,7 @@ export async function waitForCondition( return new Promise(async (resolve, reject) => { const timeout = setTimeout(() => { clearTimeout(timeout); - // tslint:disable-next-line: no-use-before-declare + // eslint-disable-next-line @typescript-eslint/no-use-before-define clearInterval(timer); reject(new Error(errorMessage)); }, timeoutMs); @@ -536,7 +536,7 @@ export async function retryIfFail(fn: () => Promise, timeoutMs: number = 6 const started = new Date().getTime(); while (timeoutMs > new Date().getTime() - started) { try { - // tslint:disable-next-line: no-unnecessary-local-variable + // eslint-disable-next-line const result = await fn(); // Capture result, if no exceptions return that. return result; @@ -571,7 +571,7 @@ export async function openFile(file: string): Promise { * @class FakeClock */ export class FakeClock { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any private clock?: any; /** * Creates an instance of FakeClock. @@ -580,7 +580,7 @@ export class FakeClock { */ constructor(private readonly advacenTimeMs: number = 10_000) {} public install() { - // tslint:disable-next-line:no-require-imports + // eslint-disable-next-line @typescript-eslint/no-require-imports const lolex = require('lolex'); this.clock = lolex.install(); } @@ -666,7 +666,7 @@ export class TestEventHandler implements IDisposable return this.handledEvents; } private readonly handler: IDisposable; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any private readonly handledEvents: any[] = []; constructor(event: Event, private readonly eventNameForErrorMessages: string, disposables: IDisposable[] = []) { disposables.push(this); @@ -712,7 +712,7 @@ export function createEventHandler( eventName: K, disposables: IDisposable[] = [] ): T[K] extends Event ? TestEventHandler : TestEventHandler { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any return new TestEventHandler(obj[eventName] as any, eventName as string, disposables) as any; } diff --git a/src/test/common/application/commands/reloadCommand.unit.test.ts b/src/test/common/application/commands/reloadCommand.unit.test.ts index bdd5e083022..5f5a4fe32f5 100644 --- a/src/test/common/application/commands/reloadCommand.unit.test.ts +++ b/src/test/common/application/commands/reloadCommand.unit.test.ts @@ -28,7 +28,7 @@ suite('Common Commands ReloadCommand', () => { }); test('Display prompt to reload VS Code with message passed into command', async () => { const message = 'Hello World!'; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const commandHandler = capture(cmdManager.registerCommand as any).first()[1] as Function; await commandHandler.call(reloadCommandHandler, message); @@ -37,9 +37,9 @@ suite('Common Commands ReloadCommand', () => { }); test('Do not reload VS Code if user selects `Reload` option', async () => { const message = 'Hello World!'; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const commandHandler = capture(cmdManager.registerCommand as any).first()[1] as Function; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any when(appShell.showInformationMessage(message, Common.reload())).thenResolve(Common.reload() as any); await commandHandler.call(reloadCommandHandler, message); @@ -49,7 +49,7 @@ suite('Common Commands ReloadCommand', () => { }); test('Do not reload VS Code if user does not select `Reload` option', async () => { const message = 'Hello World!'; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const commandHandler = capture(cmdManager.registerCommand as any).first()[1] as Function; when(appShell.showInformationMessage(message, Common.reload())).thenResolve(); diff --git a/src/test/common/asyncDump.ts b/src/test/common/asyncDump.ts index b92b0231ced..9f01048b8f4 100644 --- a/src/test/common/asyncDump.ts +++ b/src/test/common/asyncDump.ts @@ -1,6 +1,6 @@ 'use strict'; -//tslint:disable:no-require-imports no-var-requires +/* eslint-disable @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires */ const log = require('why-is-node-running'); // Call this function to debug async hangs. It should print out stack traces of still running promises. diff --git a/src/test/common/configuration/service.unit.test.ts b/src/test/common/configuration/service.unit.test.ts index f1f687bd607..ba2faaa0860 100644 --- a/src/test/common/configuration/service.unit.test.ts +++ b/src/test/common/configuration/service.unit.test.ts @@ -49,7 +49,7 @@ suite('Configuration Service', () => { test('Do not update global settings if global value is already equal to the new value', async () => { const workspaceConfig = setupConfigProvider(); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any workspaceConfig.setup((w) => w.inspect('setting')).returns(() => ({ globalValue: 'globalValue' } as any)); workspaceConfig .setup((w) => w.update('setting', 'globalValue', ConfigurationTarget.Global)) @@ -63,7 +63,7 @@ suite('Configuration Service', () => { test('Update global settings if global value is not equal to the new value', async () => { const workspaceConfig = setupConfigProvider(); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any workspaceConfig.setup((w) => w.inspect('setting')).returns(() => ({ globalValue: 'globalValue' } as any)); workspaceConfig .setup((w) => w.update('setting', 'newGlobalValue', ConfigurationTarget.Global)) @@ -77,7 +77,7 @@ suite('Configuration Service', () => { test('Do not update workspace settings if workspace value is already equal to the new value', async () => { const workspaceConfig = setupConfigProvider(); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any workspaceConfig.setup((w) => w.inspect('setting')).returns(() => ({ workspaceValue: 'workspaceValue' } as any)); workspaceConfig .setup((w) => w.update('setting', 'workspaceValue', ConfigurationTarget.Workspace)) @@ -91,7 +91,7 @@ suite('Configuration Service', () => { test('Update workspace settings if workspace value is not equal to the new value', async () => { const workspaceConfig = setupConfigProvider(); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any workspaceConfig.setup((w) => w.inspect('setting')).returns(() => ({ workspaceValue: 'workspaceValue' } as any)); workspaceConfig .setup((w) => w.update('setting', 'newWorkspaceValue', ConfigurationTarget.Workspace)) @@ -107,7 +107,7 @@ suite('Configuration Service', () => { const workspaceConfig = setupConfigProvider(); workspaceConfig .setup((w) => w.inspect('setting')) - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any .returns(() => ({ workspaceFolderValue: 'workspaceFolderValue' } as any)); workspaceConfig .setup((w) => w.update('setting', 'workspaceFolderValue', ConfigurationTarget.WorkspaceFolder)) @@ -128,7 +128,7 @@ suite('Configuration Service', () => { const workspaceConfig = setupConfigProvider(); workspaceConfig .setup((w) => w.inspect('setting')) - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any .returns(() => ({ workspaceFolderValue: 'workspaceFolderValue' } as any)); workspaceConfig .setup((w) => w.update('setting', 'newWorkspaceFolderValue', ConfigurationTarget.WorkspaceFolder)) diff --git a/src/test/common/configuration/service.vscode.test.ts b/src/test/common/configuration/service.vscode.test.ts index 5bbd24a9fa8..d791dce0786 100644 --- a/src/test/common/configuration/service.vscode.test.ts +++ b/src/test/common/configuration/service.vscode.test.ts @@ -7,7 +7,7 @@ import { IServiceContainer } from '../../../client/ioc/types'; import { getExtensionSettings } from '../../common'; import { initialize } from '../../initialize'; -// tslint:disable-next-line:max-func-body-length +// eslint-disable-next-line suite('Configuration Service', () => { let serviceContainer: IServiceContainer; suiteSetup(async () => { diff --git a/src/test/common/crypto.unit.test.ts b/src/test/common/crypto.unit.test.ts index 878e2b1ff0d..d8d79f54025 100644 --- a/src/test/common/crypto.unit.test.ts +++ b/src/test/common/crypto.unit.test.ts @@ -11,7 +11,7 @@ import { EXTENSION_ROOT_DIR_FOR_TESTS } from '../constants'; const RANDOM_WORDS = path.join(EXTENSION_ROOT_DIR_FOR_TESTS, 'src', 'test', 'common', 'randomWords.txt'); -// tslint:disable-next-line: max-func-body-length +// eslint-disable-next-line suite('Crypto Utils', async () => { let crypto: CryptoUtils; let wordsText: string; @@ -126,7 +126,7 @@ suite('Crypto Utils', async () => { buckets[hash % 100] += 1; hashes.push(hash % 100); } - // tslint:disable: prefer-for-of + /* eslint-disable @typescript-eslint/prefer-for-of */ for (let i = 0; i < hashes.length; i += 1) { for (let j = 0; j < hashes.length; j += 1) { if (hashes[i] > hashes[j]) { diff --git a/src/test/common/exitCIAfterTestReporter.ts b/src/test/common/exitCIAfterTestReporter.ts index 388cd712549..38f3e926472 100644 --- a/src/test/common/exitCIAfterTestReporter.ts +++ b/src/test/common/exitCIAfterTestReporter.ts @@ -7,7 +7,7 @@ // This is a hack, however for some reason the process running the tests do not exit. // The hack is to force it to die when tests are done, if this doesn't work we've got a bigger problem on our hands. -// tslint:disable:no-var-requires no-require-imports no-any no-console no-unnecessary-class no-default-export +/* eslint-disable @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports, @typescript-eslint/no-explicit-any, no-console, @typescript-eslint/no-extraneous-class, import/no-default-export */ import * as fs from 'fs-extra'; import * as net from 'net'; import * as path from 'path'; diff --git a/src/test/common/experiments/service.unit.test.ts b/src/test/common/experiments/service.unit.test.ts index a0db6fe99b3..c6164e242a4 100644 --- a/src/test/common/experiments/service.unit.test.ts +++ b/src/test/common/experiments/service.unit.test.ts @@ -46,7 +46,7 @@ suite('Experimentation service', () => { optInto, optOutFrom } - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any); } @@ -63,7 +63,7 @@ suite('Experimentation service', () => { configureSettings(true, [], []); configureApplicationEnvironment('stable', extensionVersion); - // tslint:disable-next-line: no-unused-expression + // eslint-disable-next-line @typescript-eslint/no-unused-expressions new ExperimentService( instance(configurationService), instance(appEnvironment), @@ -87,7 +87,7 @@ suite('Experimentation service', () => { configureSettings(true, [], []); configureApplicationEnvironment('insiders', extensionVersion); - // tslint:disable-next-line: no-unused-expression + // eslint-disable-next-line @typescript-eslint/no-unused-expressions new ExperimentService( instance(configurationService), instance(appEnvironment), @@ -141,10 +141,10 @@ suite('Experimentation service', () => { globalMemento = mock(MockMemento); configureSettings(true, [], []); configureApplicationEnvironment('stable', extensionVersion); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any when(globalMemento.get(anything(), anything())).thenReturn({ features: experiments } as any); - // tslint:disable-next-line: no-unused-expression + // eslint-disable-next-line @typescript-eslint/no-unused-expressions new ExperimentService( instance(configurationService), instance(appEnvironment), @@ -158,7 +158,7 @@ suite('Experimentation service', () => { }); suite('In-experiment check', () => { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const experiment: any = 'Test Experiment - experiment'; let telemetryEvents: { eventName: string; properties: object }[] = []; let isCachedFlightEnabledStub: sinon.SinonStub; @@ -175,7 +175,7 @@ suite('Experimentation service', () => { isCachedFlightEnabledStub = sinon.stub().returns(Promise.resolve(true)); sinon.stub(tasClient, 'getExperimentationService').returns({ isCachedFlightEnabled: isCachedFlightEnabledStub - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any); configureApplicationEnvironment('stable', extensionVersion); @@ -306,7 +306,7 @@ suite('Experimentation service', () => { getTreatmentVariableAsyncStub = sinon.stub().returns(Promise.resolve('value')); sinon.stub(tasClient, 'getExperimentationService').returns({ getTreatmentVariableAsync: getTreatmentVariableAsyncStub - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any); configureApplicationEnvironment('stable', extensionVersion); diff --git a/src/test/common/extensions.unit.test.ts b/src/test/common/extensions.unit.test.ts index dcd392dbd69..adbf2af873c 100644 --- a/src/test/common/extensions.unit.test.ts +++ b/src/test/common/extensions.unit.test.ts @@ -72,7 +72,7 @@ suite('String Extensions', () => { expect(formatString.format('one', 'two', 'three')).to.be.equal(expectedString); }); test('String should remove quotes', () => { - //tslint:disable:no-multiline-string + /* eslint-disable no-multi-str */ const quotedString = `'foo is "bar" is foo' is bar'`; const quotedString2 = `foo is "bar" is foo' is bar'`; const quotedString3 = `foo is "bar" is foo' is bar`; diff --git a/src/test/common/helpers.vscode.test.ts b/src/test/common/helpers.vscode.test.ts index 45e14d9146a..062c699eca9 100644 --- a/src/test/common/helpers.vscode.test.ts +++ b/src/test/common/helpers.vscode.test.ts @@ -10,11 +10,11 @@ suite('helpers', () => { const error = new Error('something is not installed'); assert.equal(isNotInstalledError(error), false, 'Standard error'); - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (error as any).code = 'ENOENT'; assert.equal(isNotInstalledError(error), true, 'ENOENT error code not detected'); - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (error as any).code = 127; assert.equal(isNotInstalledError(error), true, '127 error code not detected'); diff --git a/src/test/common/insidersBuild/downloadChannelRules.unit.test.ts b/src/test/common/insidersBuild/downloadChannelRules.unit.test.ts index 285e0df9d42..6b2db37713d 100644 --- a/src/test/common/insidersBuild/downloadChannelRules.unit.test.ts +++ b/src/test/common/insidersBuild/downloadChannelRules.unit.test.ts @@ -3,7 +3,7 @@ 'use strict'; -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ import { assert } from 'chai'; import { instance, mock, when } from 'ts-mockito'; diff --git a/src/test/common/insidersBuild/downloadChannelService.unit.test.ts b/src/test/common/insidersBuild/downloadChannelService.unit.test.ts index 2b51becaf22..8df568240f6 100644 --- a/src/test/common/insidersBuild/downloadChannelService.unit.test.ts +++ b/src/test/common/insidersBuild/downloadChannelService.unit.test.ts @@ -3,7 +3,7 @@ 'use strict'; -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ import { expect } from 'chai'; import { instance, mock, verify, when } from 'ts-mockito'; @@ -21,7 +21,7 @@ import { IConfigurationService } from '../../../client/common/types'; import { createDeferred } from '../../../client/common/utils/async'; import { sleep } from '../../../test/common'; -// tslint:disable-next-line:max-func-body-length +// eslint-disable-next-line suite('Download channel service', () => { let configService: IConfigurationService; let workspaceService: IWorkspaceService; diff --git a/src/test/common/insidersBuild/insidersExtensionPrompt.unit.test.ts b/src/test/common/insidersBuild/insidersExtensionPrompt.unit.test.ts index df7fcf45f33..77568abe165 100644 --- a/src/test/common/insidersBuild/insidersExtensionPrompt.unit.test.ts +++ b/src/test/common/insidersBuild/insidersExtensionPrompt.unit.test.ts @@ -3,7 +3,7 @@ 'use strict'; -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ import { anything, instance, mock, verify, when } from 'ts-mockito'; import * as TypeMoq from 'typemoq'; @@ -20,7 +20,7 @@ import { PersistentStateFactory } from '../../../client/common/persistentState'; import { IPersistentState, IPersistentStateFactory } from '../../../client/common/types'; import { Common, DataScienceSurveyBanner, ExtensionChannels } from '../../../client/common/utils/localize'; -// tslint:disable-next-line: max-func-body-length +// eslint-disable-next-line suite('Insiders Extension prompt', () => { let appShell: IApplicationShell; let extensionChannelService: IExtensionChannelService; diff --git a/src/test/common/insidersBuild/insidersExtensionService.unit.test.ts b/src/test/common/insidersBuild/insidersExtensionService.unit.test.ts index be2f239bf0b..25916b06ba1 100644 --- a/src/test/common/insidersBuild/insidersExtensionService.unit.test.ts +++ b/src/test/common/insidersBuild/insidersExtensionService.unit.test.ts @@ -3,7 +3,7 @@ 'use strict'; -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ import * as assert from 'assert'; import { expect } from 'chai'; @@ -109,7 +109,7 @@ suite('Insiders Extension', () => { }); }); - // tslint:disable-next-line: max-func-body-length + // eslint-disable-next-line suite('Insiders Extension Service - Activation', () => { let appEnvironment: IApplicationEnvironment; let serviceContainer: IServiceContainer; @@ -226,7 +226,7 @@ suite('Insiders Extension', () => { }); }); - // tslint:disable-next-line: max-func-body-length + // eslint-disable-next-line suite('Insiders Extension Service - Function handleEdgeCases()', () => { let appEnvironment: TypeMoq.IMock; let serviceContainer: TypeMoq.IMock; @@ -480,7 +480,7 @@ suite('Insiders Extension', () => { }); }); - // tslint:disable-next-line: max-func-body-length + // eslint-disable-next-line suite('Insiders Extension Service - Function registerCommandsAndHandlers()', () => { let appEnvironment: IApplicationEnvironment; let serviceContainer: IServiceContainer; diff --git a/src/test/common/net/fileDownloader.unit.test.ts b/src/test/common/net/fileDownloader.unit.test.ts index 6ecb38780bb..5119cb38b49 100644 --- a/src/test/common/net/fileDownloader.unit.test.ts +++ b/src/test/common/net/fileDownloader.unit.test.ts @@ -3,7 +3,7 @@ 'use strict'; -// tslint:disable: no-var-requires no-require-imports max-func-body-length no-any match-default-export-name +/* eslint-disable @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports, , @typescript-eslint/no-explicit-any, */ import * as assert from 'assert'; import { expect } from 'chai'; import * as fsExtra from 'fs-extra'; diff --git a/src/test/common/net/httpClient.unit.test.ts b/src/test/common/net/httpClient.unit.test.ts index 33f30c4a117..18b365011b5 100644 --- a/src/test/common/net/httpClient.unit.test.ts +++ b/src/test/common/net/httpClient.unit.test.ts @@ -3,11 +3,11 @@ 'use strict'; -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ import * as assert from 'assert'; import { expect } from 'chai'; -// tslint:disable-next-line: match-default-export-name +// eslint-disable-next-line import rewiremock from 'rewiremock'; import * as TypeMoq from 'typemoq'; import { WorkspaceConfiguration } from 'vscode'; @@ -15,7 +15,7 @@ import { IWorkspaceService } from '../../../client/common/application/types'; import { HttpClient } from '../../../client/common/net/httpClient'; import { IServiceContainer } from '../../../client/ioc/types'; -// tslint:disable-next-line: max-func-body-length +// eslint-disable-next-line suite('Http Client', () => { const proxy = 'https://myproxy.net:4242'; let config: TypeMoq.IMock; diff --git a/src/test/common/platform/errors.unit.test.ts b/src/test/common/platform/errors.unit.test.ts index d565bc81721..cc7cd5b2c90 100644 --- a/src/test/common/platform/errors.unit.test.ts +++ b/src/test/common/platform/errors.unit.test.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// tslint:disable:max-func-body-length +/* eslint-disable */ import { expect } from 'chai'; import * as vscode from 'vscode'; diff --git a/src/test/common/platform/filesystem.unit.test.ts b/src/test/common/platform/filesystem.unit.test.ts index 198c9a9d28c..57633cc8ba3 100644 --- a/src/test/common/platform/filesystem.unit.test.ts +++ b/src/test/common/platform/filesystem.unit.test.ts @@ -19,14 +19,14 @@ import { WriteStream } from '../../../client/common/platform/types'; -// tslint:disable:max-func-body-length chai-vague-errors +/* eslint-disable */ function Uri(filename: string): vscode.Uri { return vscode.Uri.file(filename); } function createDummyStat(filetype: FileType): FileStat { - //tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any return { type: filetype } as any; } @@ -92,7 +92,7 @@ suite('Raw FileSystem', () => { const stat = TypeMoq.Mock.ofType(undefined, TypeMoq.MockBehavior.Strict); // This is necessary because passing "mock.object" to // Promise.resolve() triggers the lookup. - //tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any stat.setup((s: any) => s.then) .returns(() => undefined) .verifiable(TypeMoq.Times.atLeast(0)); @@ -175,7 +175,7 @@ suite('Raw FileSystem', () => { size: 10, ctime: 101, mtime: 102 - //tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any; const old = createMockLegacyStat(); setupStatFileType(old, testData.filetype); @@ -688,7 +688,7 @@ suite('Raw FileSystem', () => { size: 10, ctime: 101, mtime: 102 - //tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any; const lstat = createMockLegacyStat(); setupStatFileType(lstat, FileType.Unknown); @@ -713,7 +713,7 @@ suite('Raw FileSystem', () => { size: 10, ctime: 101, mtime: 102 - //tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any; const lstat = createMockLegacyStat(); lstat @@ -743,7 +743,7 @@ suite('Raw FileSystem', () => { size: 10, ctime: 101, mtime: 102 - //tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any; const lstat = createMockLegacyStat(); lstat @@ -801,7 +801,7 @@ suite('Raw FileSystem', () => { suite('createReadStream', () => { test('wraps the low-level function', () => { const filename = 'x/y/z/spam.py'; - //tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const expected = {} as any; raw.setup((r) => r.createReadStream(filename)) // expect the specific filename .returns(() => expected); @@ -825,7 +825,7 @@ suite('Raw FileSystem', () => { suite('createWriteStream', () => { test('wraps the low-level function', () => { const filename = 'x/y/z/spam.py'; - //tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const expected = {} as any; raw.setup((r) => r.createWriteStream(filename)) // expect the specific filename .returns(() => expected); @@ -881,7 +881,7 @@ suite('FileSystemUtils', () => { const stat = TypeMoq.Mock.ofType(undefined, TypeMoq.MockBehavior.Strict); // This is necessary because passing "mock.object" to // Promise.resolve() triggers the lookup. - //tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any stat.setup((s: any) => s.then) .returns(() => undefined) .verifiable(TypeMoq.Times.atLeast(0)); @@ -1369,7 +1369,7 @@ suite('FileSystemUtils', () => { const dirname = 'x/y/z/spam'; const filename = `${dirname}/___vscpTest___`; const err = new Error('not permitted'); - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (err as any).code = 'EACCES'; // errno deps.setup((d) => d.stat(dirname)) // Success! .returns(() => Promise.resolve((undefined as unknown) as FileStat)); @@ -1385,7 +1385,7 @@ suite('FileSystemUtils', () => { test('fails if the directory does not exist', async () => { const dirname = 'x/y/z/spam'; const err = new Error('not found'); - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (err as any).code = 'ENOENT'; // errno deps.setup((d) => d.stat(dirname)) // file-not-found .returns(() => Promise.reject(err)); diff --git a/src/test/common/platform/fs-paths.functional.test.ts b/src/test/common/platform/fs-paths.functional.test.ts index 3e3925a0ea0..c2b2f0771ec 100644 --- a/src/test/common/platform/fs-paths.functional.test.ts +++ b/src/test/common/platform/fs-paths.functional.test.ts @@ -3,7 +3,7 @@ 'use strict'; -// tslint:disable:max-func-body-length chai-vague-errors +/* eslint-disable , */ import { expect } from 'chai'; import * as os from 'os'; diff --git a/src/test/common/platform/fs-paths.unit.test.ts b/src/test/common/platform/fs-paths.unit.test.ts index 951f84d3522..187db527263 100644 --- a/src/test/common/platform/fs-paths.unit.test.ts +++ b/src/test/common/platform/fs-paths.unit.test.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// tslint:disable:max-func-body-length +/* eslint-disable */ import { expect } from 'chai'; import * as path from 'path'; diff --git a/src/test/common/platform/fs-temp.functional.test.ts b/src/test/common/platform/fs-temp.functional.test.ts index e6338b60446..ef4c57a151d 100644 --- a/src/test/common/platform/fs-temp.functional.test.ts +++ b/src/test/common/platform/fs-temp.functional.test.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// tslint:disable:max-func-body-length chai-vague-errors +/* eslint-disable , */ import { expect, use } from 'chai'; import * as fs from 'fs-extra'; @@ -9,7 +9,7 @@ import { TemporaryFileSystem } from '../../../client/common/platform/fs-temp'; import { TemporaryFile } from '../../../client/common/platform/types'; import { assertDoesNotExist, assertExists, FSFixture, WINDOWS } from './utils'; -// tslint:disable:no-require-imports no-var-requires +/* eslint-disable @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires */ const assertArrays = require('chai-arrays'); use(require('chai-as-promised')); use(assertArrays); @@ -61,7 +61,7 @@ suite('FileSystem - TemporaryFileSystem', () => { test('Ensure writing to a temp file is supported via file stream', async function () { if (WINDOWS) { - // tslint:disable-next-line:no-invalid-this + // eslint-disable-next-line no-invalid-this this.skip(); } const tempfile = await createFile('.tmp'); diff --git a/src/test/common/platform/fs-temp.unit.test.ts b/src/test/common/platform/fs-temp.unit.test.ts index 62d5d893249..fd88e41bc58 100644 --- a/src/test/common/platform/fs-temp.unit.test.ts +++ b/src/test/common/platform/fs-temp.unit.test.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// tslint:disable:max-func-body-length +/* eslint-disable */ import { expect } from 'chai'; import * as TypeMoq from 'typemoq'; @@ -11,7 +11,7 @@ interface IDeps { // tmp module file( config: { postfix?: string; mode?: number }, - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any callback?: (err: any, path: string, fd: number, cleanupCallback: () => void) => void ): void; } @@ -43,7 +43,7 @@ suite('FileSystem - temp files', () => { test(`fails if the raw call "returns" an error`, async () => { const failure = new Error('oops'); deps.setup((d) => d.file({ postfix: '.tmp', mode: undefined }, TypeMoq.It.isAny())) - // tslint:disable-next-line:no-empty + // eslint-disable-next-line no-empty,@typescript-eslint/no-empty-function .callback((_cfg, cb) => cb(failure, '...', -1, () => {})); const promise = temp.createFile('.tmp'); diff --git a/src/test/common/platform/pathUtils.functional.test.ts b/src/test/common/platform/pathUtils.functional.test.ts index 7a7cc9b88e9..bcb5112b806 100644 --- a/src/test/common/platform/pathUtils.functional.test.ts +++ b/src/test/common/platform/pathUtils.functional.test.ts @@ -3,7 +3,7 @@ 'use strict'; -// tslint:disable:max-func-body-length +/* eslint-disable */ import { expect } from 'chai'; import { FileSystemPathUtils } from '../../../client/common/platform/fs-paths'; diff --git a/src/test/common/platform/platformService.vscode.test.ts b/src/test/common/platform/platformService.vscode.test.ts index 0f803e38095..c0d387ebc4f 100644 --- a/src/test/common/platform/platformService.vscode.test.ts +++ b/src/test/common/platform/platformService.vscode.test.ts @@ -12,7 +12,7 @@ import { OSType } from '../../../client/common/utils/platform'; use(chaiAsPromised); -// tslint:disable-next-line:max-func-body-length +// eslint-disable-next-line suite('PlatformService', () => { const osType = getOSType(); test('pathVariableName', async () => { @@ -64,7 +64,7 @@ suite('PlatformService', () => { }); test('is64bit', async () => { - // tslint:disable-next-line:no-require-imports + // eslint-disable-next-line @typescript-eslint/no-require-imports const arch = require('arch'); const hostReports64Bit = arch() === 'x64'; @@ -79,7 +79,7 @@ suite('PlatformService', () => { test('getVersion on Mac/Windows', async function () { if (osType === OSType.Linux) { - // tslint:disable-next-line:no-invalid-this + // eslint-disable-next-line no-invalid-this return this.skip(); } const expectedVersion = parse(os.release())!; @@ -90,7 +90,7 @@ suite('PlatformService', () => { }); test('getVersion on Linux shoud throw an exception', async function () { if (osType !== OSType.Linux) { - // tslint:disable-next-line:no-invalid-this + // eslint-disable-next-line no-invalid-this return this.skip(); } const svc = new PlatformService(); diff --git a/src/test/common/platform/utils.ts b/src/test/common/platform/utils.ts index 89d98e61274..889fcc8a0dc 100644 --- a/src/test/common/platform/utils.ts +++ b/src/test/common/platform/utils.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// tslint:disable:no-console +/* eslint-disable no-console */ import { expect } from 'chai'; import * as fsextra from 'fs-extra'; diff --git a/src/test/common/process/decoder.vscode.test.ts b/src/test/common/process/decoder.vscode.test.ts index 2bcf012fa3f..fc1a5cbc7bd 100644 --- a/src/test/common/process/decoder.vscode.test.ts +++ b/src/test/common/process/decoder.vscode.test.ts @@ -20,7 +20,7 @@ suite('Decoder', () => { test('Test decoding cp932 strings', function () { if (!encodingExists('cp866')) { - // tslint:disable-next-line:no-invalid-this + // eslint-disable-next-line no-invalid-this this.skip(); } const value = 'Sample input string Сделать это'; diff --git a/src/test/common/process/logger.unit.test.ts b/src/test/common/process/logger.unit.test.ts index d6c0706c57c..79c04a68577 100644 --- a/src/test/common/process/logger.unit.test.ts +++ b/src/test/common/process/logger.unit.test.ts @@ -6,7 +6,7 @@ import { expect } from 'chai'; import * as path from 'path'; import * as TypeMoq from 'typemoq'; -// tslint:disable-next-line:no-require-imports +// eslint-disable-next-line @typescript-eslint/no-require-imports import untildify = require('untildify'); import { PathUtils } from '../../../client/common/platform/pathUtils'; @@ -15,7 +15,7 @@ import { IOutputChannel } from '../../../client/common/types'; import { Logging } from '../../../client/common/utils/localize'; import { getOSType, OSType } from '../../common'; -// tslint:disable: max-func-body-length +/* eslint-disable */ suite('ProcessLogger suite', () => { let outputChannel: TypeMoq.IMock; let pathUtils: PathUtils; diff --git a/src/test/common/process/proc.unit.test.ts b/src/test/common/process/proc.unit.test.ts index 0f1f8fa1dc3..563eacbaff9 100644 --- a/src/test/common/process/proc.unit.test.ts +++ b/src/test/common/process/proc.unit.test.ts @@ -3,7 +3,7 @@ 'use strict'; -// tslint:disable:no-any max-func-body-length no-invalid-this max-classes-per-file +/* eslint-disable @typescript-eslint/no-explicit-any, , no-invalid-this, max-classes-per-file */ import { expect } from 'chai'; import { ChildProcess, spawn } from 'child_process'; @@ -17,7 +17,7 @@ interface IProcData { } suite('Process - Process Service', function () { - // tslint:disable-next-line:no-invalid-this + // eslint-disable-next-line no-invalid-this this.timeout(5000); const procsToKill: IProcData[] = []; teardown(() => { diff --git a/src/test/common/process/pythonDaemon.functional.test.ts b/src/test/common/process/pythonDaemon.functional.test.ts index a6af95678c0..1935b6586d3 100644 --- a/src/test/common/process/pythonDaemon.functional.test.ts +++ b/src/test/common/process/pythonDaemon.functional.test.ts @@ -29,7 +29,7 @@ import { isPythonVersion, PYTHON_PATH } from '../../common'; import { createTemporaryFile } from '../../utils/fs'; use(chaiPromised); -// tslint:disable-next-line: max-func-body-length +// eslint-disable-next-line suite('Daemon', () => { // Set PYTHONPATH to pickup our module and the jsonrpc modules. const envPythonPath = `${path.join(EXTENSION_ROOT_DIR, 'pythonFiles')}${path.delimiter}${path.join( @@ -56,7 +56,7 @@ suite('Daemon', () => { }); setup(async function () { if (isPythonVersion('2.7')) { - // tslint:disable-next-line: no-invalid-this + // eslint-disable-next-line no-invalid-this return this.skip(); } // Enable the following to log everything going on at pyton end. diff --git a/src/test/common/process/pythonDaemonPool.functional.test.ts b/src/test/common/process/pythonDaemonPool.functional.test.ts index 9df0236f7d2..99c64b509e9 100644 --- a/src/test/common/process/pythonDaemonPool.functional.test.ts +++ b/src/test/common/process/pythonDaemonPool.functional.test.ts @@ -36,7 +36,7 @@ import { isPythonVersion, PYTHON_PATH, waitForCondition } from '../../common'; import { createTemporaryFile } from '../../utils/fs'; use(chaiPromised); -// tslint:disable: max-func-body-length +/* eslint-disable */ suite('Daemon - Python Daemon Pool', () => { // Set PYTHONPATH to pickup our module and the jsonrpc modules. const envPythonPath = `${path.join(EXTENSION_ROOT_DIR, 'pythonFiles')}${path.delimiter}${path.join( @@ -54,7 +54,7 @@ suite('Daemon - Python Daemon Pool', () => { let createDaemonServicesSpy: sinon.SinonSpy<[], Promise>; let logger: IProcessLogger; class DaemonPool extends PythonDaemonExecutionServicePool { - // tslint:disable-next-line: no-unnecessary-override + // eslint-disable-next-line public createDaemonService(): Promise { return super.createDaemonService(); } @@ -69,7 +69,7 @@ suite('Daemon - Python Daemon Pool', () => { }); setup(async function () { if (isPythonVersion('2.7')) { - // tslint:disable-next-line: no-invalid-this + // eslint-disable-next-line no-invalid-this return this.skip(); } logger = mock(ProcessLogger); @@ -87,7 +87,7 @@ suite('Daemon - Python Daemon Pool', () => { connection.listen(); disposables.push({ dispose: () => pythonProc.kill() }); disposables.push({ dispose: () => connection.dispose() }); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any return { proc: pythonProc, dispose: noop, out: undefined as any }; }); const options = { @@ -334,7 +334,7 @@ suite('Daemon - Python Daemon Pool', () => { s.next({ out: 'mypid', source: 'stdout' }); s.complete(); }); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any return { proc: new EventEmitter() as any, dispose: noop, out: observable }; }); // This will use a damon. diff --git a/src/test/common/process/pythonDaemonPool.unit.test.ts b/src/test/common/process/pythonDaemonPool.unit.test.ts index faa29f07553..16c85e2cc17 100644 --- a/src/test/common/process/pythonDaemonPool.unit.test.ts +++ b/src/test/common/process/pythonDaemonPool.unit.test.ts @@ -23,17 +23,17 @@ import { noop } from '../../core'; import { asyncDump } from '../asyncDump'; use(chaiPromised); -// tslint:disable: no-any max-func-body-length +/* eslint-disable @typescript-eslint/no-explicit-any, */ suite('Daemon - Python Daemon Pool', () => { class DaemonPool extends PythonDaemonExecutionServicePool { - // tslint:disable-next-line: no-unnecessary-override + // eslint-disable-next-line public createConnection(proc: ChildProcess) { return super.createConnection(proc); } } - // tslint:disable-next-line: no-any use-default-type-parameter + // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unnecessary-type-arguments let sendRequestStub: sinon.SinonStub; - // tslint:disable-next-line: no-any use-default-type-parameter + // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unnecessary-type-arguments let listenStub: sinon.SinonStub; let pythonExecService: IPythonExecutionService; let platformService: IPlatformService; @@ -50,7 +50,7 @@ suite('Daemon - Python Daemon Pool', () => { sendRequestStub.returns({ pong: 'hello' }); }); teardown(function () { - // tslint:disable-next-line: no-invalid-this + // eslint-disable-next-line no-invalid-this if (this.currentTest && this.currentTest.state === 'failed') { asyncDump(); } diff --git a/src/test/common/process/pythonEnvironment.unit.test.ts b/src/test/common/process/pythonEnvironment.unit.test.ts index 763fbc36981..713d5be6634 100644 --- a/src/test/common/process/pythonEnvironment.unit.test.ts +++ b/src/test/common/process/pythonEnvironment.unit.test.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// tslint:disable: max-func-body-length +/* eslint-disable */ import { expect, use } from 'chai'; import * as chaiAsPromised from 'chai-as-promised'; @@ -109,7 +109,7 @@ suite('PythonEnvironment', () => { test('getInterpreterInformation should error out if interpreterInfo.py times out', async () => { processService .setup((p) => p.shellExec(TypeMoq.It.isAny(), TypeMoq.It.isAny())) - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any .returns(() => Promise.reject(new Error('timed out'))); const env = createPythonEnv(pythonPath, processService.object, fileSystem.object); diff --git a/src/test/common/process/pythonProcess.unit.test.ts b/src/test/common/process/pythonProcess.unit.test.ts index 646ad8473c0..b8e044bf795 100644 --- a/src/test/common/process/pythonProcess.unit.test.ts +++ b/src/test/common/process/pythonProcess.unit.test.ts @@ -16,7 +16,7 @@ const isolated = path.join(EXTENSION_ROOT_DIR_FOR_TESTS, 'pythonFiles', 'pyvsc-r use(chaiAsPromised); -// tslint:disable-next-line: max-func-body-length +// eslint-disable-next-line suite('PythonProcessService', () => { let processService: TypeMoq.IMock; let fileSystem: TypeMoq.IMock; @@ -32,7 +32,7 @@ suite('PythonProcessService', () => { const options = {}; const observable = { proc: undefined, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any out: {} as any, dispose: () => { noop(); @@ -55,7 +55,7 @@ suite('PythonProcessService', () => { const options = {}; const observable = { proc: undefined, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any out: {} as any, dispose: () => { noop(); diff --git a/src/test/common/socketCallbackHandler.vscode.test.ts b/src/test/common/socketCallbackHandler.vscode.test.ts index 70b5b3f04c7..91507a52a35 100644 --- a/src/test/common/socketCallbackHandler.vscode.test.ts +++ b/src/test/common/socketCallbackHandler.vscode.test.ts @@ -1,4 +1,4 @@ -// tslint:disable:no-any max-classes-per-file max-func-body-length no-stateless-class no-require-imports no-var-requires no-empty +/* eslint-disable @typescript-eslint/no-explicit-any, max-classes-per-file, , , @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires, no-empty,@typescript-eslint/no-empty-function */ import { expect } from 'chai'; import * as getFreePort from 'get-port'; @@ -10,7 +10,7 @@ import { createDeferred, Deferred } from '../../client/common/utils/async'; const uint64be = require('uint64be'); -// tslint:disable-next-line:no-unnecessary-class +// eslint-disable-next-line @typescript-eslint/no-extraneous-class class Commands { public static ExitCommandBytes: Buffer = new Buffer('exit'); public static PingBytes: Buffer = new Buffer('ping'); diff --git a/src/test/common/socketStream.vscode.test.ts b/src/test/common/socketStream.vscode.test.ts index 13d3082dcd9..0b22b221325 100644 --- a/src/test/common/socketStream.vscode.test.ts +++ b/src/test/common/socketStream.vscode.test.ts @@ -11,12 +11,12 @@ import * as assert from 'assert'; // as well as import your extension to test it import * as net from 'net'; import { SocketStream } from '../../client/common/net/socket/SocketStream'; -// tslint:disable:no-require-imports no-var-requires +/* eslint-disable @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires */ const uint64be = require('uint64be'); class MockSocket { private _data: string; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any private _rawDataWritten: any; constructor() { this._data = ''; @@ -24,24 +24,24 @@ class MockSocket { public get dataWritten(): string { return this._data; } - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public get rawDataWritten(): any { return this._rawDataWritten; } - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public write(data: any) { this._data = `${data}` + ''; this._rawDataWritten = data; } } // Defines a Mocha test suite to group tests of similar kind together -// tslint:disable-next-line:max-func-body-length +// eslint-disable-next-line suite('SocketStream', () => { test('Read Byte', (done) => { const buffer = new Buffer('X'); const byteValue = buffer[0]; const socket = new MockSocket(); - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const stream = new SocketStream((socket as any) as net.Socket, buffer); assert.equal(stream.ReadByte(), byteValue); @@ -51,7 +51,7 @@ suite('SocketStream', () => { const num = 1234; const socket = new MockSocket(); const buffer = uint64be.encode(num); - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const stream = new SocketStream((socket as any) as net.Socket, buffer); assert.equal(stream.ReadInt32(), num); @@ -61,7 +61,7 @@ suite('SocketStream', () => { const num = 9007199254740993; const socket = new MockSocket(); const buffer = uint64be.encode(num); - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const stream = new SocketStream((socket as any) as net.Socket, buffer); assert.equal(stream.ReadInt64(), num); @@ -71,7 +71,7 @@ suite('SocketStream', () => { const message = 'Hello World'; const socket = new MockSocket(); const buffer = Buffer.concat([new Buffer('A'), uint64be.encode(message.length), new Buffer(message)]); - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const stream = new SocketStream((socket as any) as net.Socket, buffer); assert.equal(stream.ReadString(), message); @@ -85,7 +85,7 @@ suite('SocketStream', () => { Buffer.concat([new Buffer('U'), uint64be.encode(stringBuffer.byteLength)]), stringBuffer ]); - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const stream = new SocketStream((socket as any) as net.Socket, buffer); assert.equal(stream.ReadString(), message); @@ -99,7 +99,7 @@ suite('SocketStream', () => { // Write part of a second message const partOfSecondMessage = Buffer.concat([new Buffer('A'), uint64be.encode(message.length)]); buffer = Buffer.concat([buffer, partOfSecondMessage]); - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const stream = new SocketStream((socket as any) as net.Socket, buffer); stream.BeginTransaction(); @@ -118,7 +118,7 @@ suite('SocketStream', () => { // Write part of a second message const partOfSecondMessage = Buffer.concat([new Buffer('A'), uint64be.encode(message.length)]); buffer = Buffer.concat([buffer, partOfSecondMessage]); - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const stream = new SocketStream((socket as any) as net.Socket, buffer); stream.BeginTransaction(); @@ -134,7 +134,7 @@ suite('SocketStream', () => { const message = 'Hello World'; const buffer = new Buffer(''); const socket = new MockSocket(); - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const stream = new SocketStream((socket as any) as net.Socket, buffer); stream.Write(new Buffer(message)); @@ -145,7 +145,7 @@ suite('SocketStream', () => { const num = 1234; const buffer = new Buffer(''); const socket = new MockSocket(); - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const stream = new SocketStream((socket as any) as net.Socket, buffer); stream.WriteInt32(num); @@ -156,7 +156,7 @@ suite('SocketStream', () => { const num = 9007199254740993; const buffer = new Buffer(''); const socket = new MockSocket(); - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const stream = new SocketStream((socket as any) as net.Socket, buffer); stream.WriteInt64(num); @@ -167,7 +167,7 @@ suite('SocketStream', () => { const message = 'Hello World'; const buffer = new Buffer(''); const socket = new MockSocket(); - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const stream = new SocketStream((socket as any) as net.Socket, buffer); stream.WriteString(message); @@ -178,7 +178,7 @@ suite('SocketStream', () => { const message = 'Hello World - Функция проверки ИНН и КПП - 说明'; const buffer = new Buffer(''); const socket = new MockSocket(); - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const stream = new SocketStream((socket as any) as net.Socket, buffer); stream.WriteString(message); diff --git a/src/test/common/utils/cacheUtils.unit.test.ts b/src/test/common/utils/cacheUtils.unit.test.ts index a1bd7dc0beb..2492921c241 100644 --- a/src/test/common/utils/cacheUtils.unit.test.ts +++ b/src/test/common/utils/cacheUtils.unit.test.ts @@ -9,7 +9,7 @@ import { clearCache, InMemoryCache } from '../../../client/common/utils/cacheUti type CacheUtilsTestScenario = { scenarioDesc: string; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any dataToStore: any; }; @@ -28,7 +28,7 @@ const scenariosToTest: CacheUtilsTestScenario[] = [ } ]; -// tslint:disable:no-any max-func-body-length +/* eslint-disable @typescript-eslint/no-explicit-any, */ suite('Common Utils - CacheUtils', () => { suite('InMemory Cache', () => { let clock: sinon.SinonFakeTimers; diff --git a/src/test/common/utils/decorators.unit.test.ts b/src/test/common/utils/decorators.unit.test.ts index 94239e1fac9..ddf63078e08 100644 --- a/src/test/common/utils/decorators.unit.test.ts +++ b/src/test/common/utils/decorators.unit.test.ts @@ -10,12 +10,12 @@ import { cache, makeDebounceAsyncDecorator, makeDebounceDecorator } from '../../ import { sleep } from '../../core'; use(chaiPromise); -// tslint:disable:no-any max-func-body-length no-unnecessary-class +/* eslint-disable @typescript-eslint/no-explicit-any, , @typescript-eslint/no-extraneous-class */ suite('Common Utils - Decorators', function () { // For some reason, sometimes we have timeouts on CI. // Note: setTimeout and similar functions are not guaranteed to execute // at the precise time prescribed. - // tslint:disable-next-line: no-invalid-this + // eslint-disable-next-line no-invalid-this this.retries(3); suite('Cache Decorator', () => { const oldValueOfVSC_JUPYTER_UNIT_TEST = process.env.VSC_JUPYTER_UNIT_TEST; @@ -106,7 +106,7 @@ suite('Common Utils - Decorators', function () { `Actual delay ${actualDelay}, expected delay ${expectedDelay}, not within 5% of accuracy` ); } - // tslint:disable-next-line: max-classes-per-file + // eslint-disable-next-line max-classes-per-file class Base { public created: number; public calls: string[]; @@ -138,7 +138,7 @@ suite('Common Utils - Decorators', function () { } test('Debounce: one sync call', async () => { const wait = 100; - // tslint:disable-next-line:max-classes-per-file + // eslint-disable-next-line max-classes-per-file class One extends Base { @makeDebounceDecorator(wait) public run(): void { @@ -158,7 +158,7 @@ suite('Common Utils - Decorators', function () { }); test('Debounce: one async call & no wait', async () => { const wait = 100; - // tslint:disable-next-line:max-classes-per-file + // eslint-disable-next-line max-classes-per-file class One extends Base { @makeDebounceAsyncDecorator(wait) public async run(): Promise { @@ -180,7 +180,7 @@ suite('Common Utils - Decorators', function () { }); test('Debounce: one async call', async () => { const wait = 100; - // tslint:disable-next-line:max-classes-per-file + // eslint-disable-next-line max-classes-per-file class One extends Base { @makeDebounceAsyncDecorator(wait) public async run(): Promise { @@ -200,7 +200,7 @@ suite('Common Utils - Decorators', function () { }); test('Debounce: one async call and ensure exceptions are re-thrown', async () => { const wait = 100; - // tslint:disable-next-line:max-classes-per-file + // eslint-disable-next-line max-classes-per-file class One extends Base { @makeDebounceAsyncDecorator(wait) public async run(): Promise { @@ -223,7 +223,7 @@ suite('Common Utils - Decorators', function () { }); test('Debounce: multiple async calls', async () => { const wait = 100; - // tslint:disable-next-line:max-classes-per-file + // eslint-disable-next-line max-classes-per-file class One extends Base { @makeDebounceAsyncDecorator(wait) public async run(): Promise { @@ -248,7 +248,7 @@ suite('Common Utils - Decorators', function () { }); test('Debounce: multiple async calls when awaiting on all', async function () { const wait = 100; - // tslint:disable-next-line:max-classes-per-file + // eslint-disable-next-line max-classes-per-file class One extends Base { @makeDebounceAsyncDecorator(wait) public async run(): Promise { @@ -268,7 +268,7 @@ suite('Common Utils - Decorators', function () { }); test('Debounce: multiple async calls & wait on some', async () => { const wait = 100; - // tslint:disable-next-line:max-classes-per-file + // eslint-disable-next-line max-classes-per-file class One extends Base { @makeDebounceAsyncDecorator(wait) public async run(): Promise { @@ -293,7 +293,7 @@ suite('Common Utils - Decorators', function () { }); test('Debounce: multiple calls grouped', async () => { const wait = 100; - // tslint:disable-next-line:max-classes-per-file + // eslint-disable-next-line max-classes-per-file class One extends Base { @makeDebounceDecorator(wait) public run(): void { @@ -315,7 +315,7 @@ suite('Common Utils - Decorators', function () { }); test('Debounce: multiple calls spread', async () => { const wait = 100; - // tslint:disable-next-line:max-classes-per-file + // eslint-disable-next-line max-classes-per-file class One extends Base { @makeDebounceDecorator(wait) public run(): void { diff --git a/src/test/common/utils/localize.functional.test.ts b/src/test/common/utils/localize.functional.test.ts index 8ebc408ab48..2c5f5c8d7e1 100644 --- a/src/test/common/utils/localize.functional.test.ts +++ b/src/test/common/utils/localize.functional.test.ts @@ -3,7 +3,7 @@ 'use strict'; -// tslint:disable:max-func-body-length +/* eslint-disable */ import * as assert from 'assert'; import * as fs from 'fs'; @@ -124,9 +124,9 @@ suite('Localization', () => { }); test('all keys used', function (done) { - // tslint:disable-next-line:no-suspicious-comment + // eslint-disable-next-line // TODO: Unused keys need to be cleaned up. - // tslint:disable-next-line:no-invalid-this + // eslint-disable-next-line no-invalid-this this.skip(); //test('all keys used', done => { const nlsCollection = getDefaultCollection(); @@ -189,7 +189,7 @@ function getDefaultCollection() { return JSON.parse(contents); } -// tslint:disable-next-line:no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any function useEveryLocalization(topns: any) { // Read all of the namespaces from the localize import. const entries = Object.keys(topns); @@ -205,7 +205,7 @@ function useEveryLocalization(topns: any) { }); } -// tslint:disable-next-line:no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any function useEveryLocalizationInNS(ns: any) { // The namespace should have functions inside of it. // @ts-ignore diff --git a/src/test/common/utils/regexp.unit.test.ts b/src/test/common/utils/regexp.unit.test.ts index 26613230d7a..995bb5dc5e8 100644 --- a/src/test/common/utils/regexp.unit.test.ts +++ b/src/test/common/utils/regexp.unit.test.ts @@ -3,7 +3,7 @@ 'use strict'; -// tslint:disable:no-multiline-string +/* eslint-disable no-multi-str */ import { expect } from 'chai'; diff --git a/src/test/common/utils/text.unit.test.ts b/src/test/common/utils/text.unit.test.ts index a26a1fbeadb..1da066376dc 100644 --- a/src/test/common/utils/text.unit.test.ts +++ b/src/test/common/utils/text.unit.test.ts @@ -3,7 +3,7 @@ 'use strict'; -// tslint:disable:max-func-body-length no-any no-require-imports no-var-requires +/* eslint-disable , @typescript-eslint/no-explicit-any, @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires */ import { expect } from 'chai'; import { Position, Range } from 'vscode'; diff --git a/src/test/common/variables/envVarsService.functional.test.ts b/src/test/common/variables/envVarsService.functional.test.ts index 6feac75ee53..ed8190e141b 100644 --- a/src/test/common/variables/envVarsService.functional.test.ts +++ b/src/test/common/variables/envVarsService.functional.test.ts @@ -3,7 +3,7 @@ 'use strict'; -// tslint:disable:max-func-body-length +/* eslint-disable */ import { expect, use } from 'chai'; import * as chaiAsPromised from 'chai-as-promised'; diff --git a/src/test/common/variables/envVarsService.unit.test.ts b/src/test/common/variables/envVarsService.unit.test.ts index ed0ead1204e..b8db8a5d89a 100644 --- a/src/test/common/variables/envVarsService.unit.test.ts +++ b/src/test/common/variables/envVarsService.unit.test.ts @@ -3,7 +3,7 @@ 'use strict'; -// tslint:disable:max-func-body-length +/* eslint-disable */ import { expect, use } from 'chai'; import * as chaiAsPromised from 'chai-as-promised'; @@ -134,13 +134,13 @@ Path=/usr/x:/usr/y // src/testMultiRootWkspc/workspace4/.env setFile( filename, - // tslint:disable:no-invalid-template-strings + /* eslint-disable no-template-curly-in-string */ '\ REPO=/home/user/git/foobar\n\ PYTHONPATH=${REPO}/foo:${REPO}/bar\n\ PYTHON=${BINDIR}/python3\n\ ' - // tslint:enable:no-invalid-template-strings + /* eslint-enable no-template-curly-in-string */ ); const vars = await variablesService.parseFile(filename, { BINDIR: '/usr/bin' }); @@ -182,7 +182,7 @@ PYTHON=${BINDIR}/python3\n\ test('Ensure path variables variables are not merged into target', async () => { const vars1 = { ONE: '1', TWO: 'TWO', PYTHONPATH: 'PYTHONPATH' }; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (vars1 as any)[pathVariable] = 'PATH'; const vars2 = { ONE: 'ONE', THREE: '3' }; @@ -199,7 +199,7 @@ PYTHON=${BINDIR}/python3\n\ test('Ensure path variables variables in target are left untouched', async () => { const vars1 = { ONE: '1', TWO: 'TWO' }; const vars2 = { ONE: 'ONE', THREE: '3', PYTHONPATH: 'PYTHONPATH' }; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (vars2 as any)[pathVariable] = 'PATH'; variablesService.mergeVariables(vars1, vars2); @@ -244,7 +244,7 @@ PYTHON=${BINDIR}/python3\n\ test(`Ensure appending PATH has no effect if an empty string is provided and path does not exist in vars object (${pathVariable})`, async () => { const vars = { ONE: '1' }; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (vars as any)[pathVariable] = 'PATH'; variablesService.appendPath(vars); @@ -267,7 +267,7 @@ PYTHON=${BINDIR}/python3\n\ test(`Ensure PATH is appeneded (${pathVariable})`, async () => { const vars = { ONE: '1' }; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (vars as any)[pathVariable] = 'PATH'; const pathToAppend = `/usr/one${path.delimiter}/usr/three`; @@ -342,7 +342,7 @@ PYTHON=${BINDIR}/python3\n\ suite('Parsing Environment Variables Files', () => { suite('parseEnvFile()', () => { test('Custom variables should be parsed from env file', () => { - // tslint:disable-next-line:no-multiline-string + // eslint-disable-next-line no-multi-str const vars = parseEnvFile(` X1234PYEXTUNITTESTVAR=1234 PYTHONPATH=../workspace5 @@ -355,7 +355,7 @@ PYTHONPATH=../workspace5 }); test('PATH and PYTHONPATH from env file should be returned as is', () => { - // tslint:disable-next-line:no-multiline-string + // eslint-disable-next-line no-multi-str const vars = parseEnvFile(` X=1 Y=2 @@ -377,7 +377,7 @@ Path=/usr/x:/usr/y }); test('Variable names must be alpha + alnum/underscore', () => { - // tslint:disable-next-line:no-multiline-string + // eslint-disable-next-line no-multi-str const vars = parseEnvFile(` SPAM=1234 ham=5678 @@ -402,7 +402,7 @@ VAR_2=7890 }); test('Empty values become empty string', () => { - // tslint:disable-next-line:no-multiline-string + // eslint-disable-next-line no-multi-str const vars = parseEnvFile(` SPAM= `); @@ -413,7 +413,7 @@ SPAM= }); test('Outer quotation marks are removed', () => { - // tslint:disable-next-line:no-multiline-string + // eslint-disable-next-line no-multi-str const vars = parseEnvFile(` SPAM=1234 HAM='5678' @@ -437,15 +437,15 @@ VAR4="QR"ST" expect(vars).to.have.property('BAZ', '"ABCD', 'value is invalid'); expect(vars).to.have.property('VAR1', '"EFGH', 'value is invalid'); expect(vars).to.have.property('VAR2', 'IJKL"', 'value is invalid'); - // tslint:disable-next-line:no-suspicious-comment + // eslint-disable-next-line // TODO: Should the outer marks be left? expect(vars).to.have.property('VAR3', "MN'OP", 'value is invalid'); expect(vars).to.have.property('VAR4', 'QR"ST', 'value is invalid'); }); test('Whitespace is ignored', () => { - // tslint:disable:no-trailing-whitespace - // tslint:disable-next-line:no-multiline-string + /* eslint-disable no-trailing-spaces */ + // eslint-disable-next-line no-multi-str const vars = parseEnvFile(` SPAM=1234 HAM =5678 @@ -457,7 +457,7 @@ VAR1=EFGH ... VAR2=IJKL VAR3=' MNOP ' `); - // tslint:enable:no-trailing-whitespace + /* eslint-enable no-trailing-spaces */ expect(vars).to.not.equal(undefined, 'Variables is undefiend'); expect(Object.keys(vars!)).lengthOf(9, 'Incorrect number of variables'); @@ -473,8 +473,8 @@ VAR3=' MNOP ' }); test('Blank lines are ignored', () => { - // tslint:disable:no-trailing-whitespace - // tslint:disable-next-line:no-multiline-string + /* eslint-disable no-trailing-spaces */ + // eslint-disable-next-line no-multi-str const vars = parseEnvFile(` SPAM=1234 @@ -483,7 +483,7 @@ HAM=5678 `); - // tslint:enable:no-trailing-whitespace + /* eslint-enable no-trailing-spaces */ expect(vars).to.not.equal(undefined, 'Variables is undefiend'); expect(Object.keys(vars!)).lengthOf(2, 'Incorrect number of variables'); @@ -492,7 +492,7 @@ HAM=5678 }); test('Comments are ignored', () => { - // tslint:disable-next-line:no-multiline-string + // eslint-disable-next-line no-multi-str const vars = parseEnvFile(` # step 1 SPAM=1234 @@ -511,10 +511,10 @@ EGGS=9012 # ... }); suite('variable substitution', () => { - // tslint:disable:no-invalid-template-strings + /* eslint-disable no-template-curly-in-string */ test('Basic substitution syntax', () => { - // tslint:disable-next-line:no-multiline-string + // eslint-disable-next-line no-multi-str const vars = parseEnvFile( '\ REPO=/home/user/git/foobar \n\ @@ -533,7 +533,7 @@ PYTHONPATH=${REPO}/foo:${REPO}/bar \n\ }); test('Curly braces are required for substitution', () => { - // tslint:disable-next-line:no-multiline-string + // eslint-disable-next-line no-multi-str const vars = parseEnvFile('\ SPAM=1234 \n\ EGGS=$SPAM \n\ @@ -546,7 +546,7 @@ EGGS=$SPAM \n\ }); test('Nested substitution is not supported', () => { - // tslint:disable-next-line:no-multiline-string + // eslint-disable-next-line no-multi-str const vars = parseEnvFile( '\ SPAM=EGGS \n\ @@ -571,7 +571,7 @@ HAM4="-- ${${SPAM}} ${EGGS} --"\n\ }); test('Other bad substitution syntax', () => { - // tslint:disable-next-line:no-multiline-string + // eslint-disable-next-line no-multi-str const vars = parseEnvFile( '\ SPAM=EGGS \n\ @@ -594,7 +594,7 @@ HAM4=$SPAM \n\ }); test('Recursive substitution is allowed', () => { - // tslint:disable-next-line:no-multiline-string + // eslint-disable-next-line no-multi-str const vars = parseEnvFile( '\ REPO=/home/user/git/foobar \n\ @@ -614,7 +614,7 @@ PYTHONPATH=${PYTHONPATH}:${REPO}/bar \n\ }); test('Substitution may be escaped', () => { - // tslint:disable-next-line:no-multiline-string + // eslint-disable-next-line no-multi-str const vars = parseEnvFile( '\ SPAM=1234 \n\ @@ -631,7 +631,7 @@ HAM=$ ... $$ \n\ }); test('base substitution variables', () => { - // tslint:disable-next-line:no-multiline-string + // eslint-disable-next-line no-multi-str const vars = parseEnvFile('\ PYTHONPATH=${REPO}/foo:${REPO}/bar \n\ ', { @@ -647,7 +647,7 @@ PYTHONPATH=${REPO}/foo:${REPO}/bar \n\ ); }); - // tslint:enable:no-invalid-template-strings + /* eslint-enable no-template-curly-in-string */ }); }); }); diff --git a/src/test/common/variables/envVarsService.vscode.test.ts b/src/test/common/variables/envVarsService.vscode.test.ts index dbacdb4887f..8e531825efe 100644 --- a/src/test/common/variables/envVarsService.vscode.test.ts +++ b/src/test/common/variables/envVarsService.vscode.test.ts @@ -3,7 +3,7 @@ 'use strict'; -// tslint:disable:max-func-body-length +/* eslint-disable */ import { expect, use } from 'chai'; import * as chaiAsPromised from 'chai-as-promised'; diff --git a/src/test/constants.ts b/src/test/constants.ts index b68af88217b..af1a248db49 100644 --- a/src/test/constants.ts +++ b/src/test/constants.ts @@ -21,7 +21,7 @@ function isMultitrootTest() { return false; } try { - // tslint:disable-next-line:no-require-imports + // eslint-disable-next-line @typescript-eslint/no-require-imports const vscode = require('vscode'); const workspace = vscode.workspace; return Array.isArray(workspace.workspaceFolders) && workspace.workspaceFolders.length > 1; diff --git a/src/test/core.ts b/src/test/core.ts index 8db9d06665e..1ef7e3c0e06 100644 --- a/src/test/core.ts +++ b/src/test/core.ts @@ -9,7 +9,7 @@ export async function sleep(milliseconds: number) { return new Promise((resolve) => setTimeout(resolve, milliseconds)); } -// tslint:disable-next-line:no-empty +// eslint-disable-next-line no-empty,@typescript-eslint/no-empty-function export function noop() {} export const isWindows = /^win/.test(process.platform); diff --git a/src/test/datascience/cellFactory.unit.test.ts b/src/test/datascience/cellFactory.unit.test.ts index 46dff8b23e2..ab6dfbb5605 100644 --- a/src/test/datascience/cellFactory.unit.test.ts +++ b/src/test/datascience/cellFactory.unit.test.ts @@ -5,7 +5,7 @@ import { assert } from 'chai'; import { generateCells } from '../../client/datascience/cellFactory'; import { removeLinesFromFrontAndBack, stripComments } from '../../datascience-ui/common'; -// tslint:disable: max-func-body-length +/* eslint-disable */ suite('DataScience CellFactory', () => { test('parsing cells', () => { let cells = generateCells(undefined, '#%%\na=1\na', 'foo', 0, true, '1'); @@ -32,7 +32,7 @@ suite('DataScience CellFactory', () => { assert.equal(cells[0].data.cell_type, 'markdown', 'Markdown cell not generated'); assert.equal(cells[0].data.source.length, 2, 'Lines for cell not emitted'); - // tslint:disable-next-line: no-multiline-string + // eslint-disable-next-line no-multi-str const multilineCode = `#%% myvar = """ # Lorem Ipsum Lorem ipsum dolor sit amet, consectetur adipiscing elit. @@ -43,7 +43,7 @@ Sed mattis dui diam, et blandit augue mattis vestibulum. Suspendisse ornare interdum velit. Suspendisse potenti. Morbi molestie lacinia sapien nec porttitor. Nam at vestibulum nisi. """`; - // tslint:disable-next-line: no-multiline-string + // eslint-disable-next-line no-multi-str const multilineTwo = `#%% """ # Lorem Ipsum Lorem ipsum dolor sit amet, consectetur adipiscing elit. @@ -63,9 +63,9 @@ Morbi molestie lacinia sapien nec porttitor. Nam at vestibulum nisi. assert.equal(cells.length, 1, 'code cell multline failed'); assert.equal(cells[0].data.cell_type, 'code', 'Code cell not generated'); assert.equal(cells[0].data.source.length, 10, 'Lines for cell not emitted'); - // tslint:disable-next-line: no-multiline-string + // eslint-disable-next-line no-multi-str assert.equal(cells[0].data.source[9], `""" print('bob')`, 'Lines for cell not emitted'); - // tslint:disable-next-line: no-multiline-string + // eslint-disable-next-line no-multi-str const multilineMarkdown = `#%% [markdown] # ## Block of Interest # @@ -93,7 +93,7 @@ Morbi molestie lacinia sapien nec porttitor. Nam at vestibulum nisi. assert.equal(cells[0].data.source.length, 20, 'Lines for cell not emitted'); assert.equal(cells[0].data.source[17], ' - Item 1-a-3-c\n', 'Lines for markdown not emitted'); - // tslint:disable-next-line: no-multiline-string + // eslint-disable-next-line no-multi-str const multilineQuoteWithOtherDelimiter = `#%% [markdown] ''' ### Take a look @@ -107,7 +107,7 @@ Morbi molestie lacinia sapien nec porttitor. Nam at vestibulum nisi. assert.equal(cells[0].data.source.length, 3, 'Lines for cell not emitted'); assert.equal(cells[0].data.source[2], '""" Not a comment delimiter', 'Lines for markdown not emitted'); - // tslint:disable-next-line: no-multiline-string + // eslint-disable-next-line no-multi-str const multilineQuoteInFunc = `#%% import requests def download(url, filename): @@ -127,7 +127,7 @@ def download(url, filename): 'Lines for cell not emitted' ); - // tslint:disable-next-line: no-multiline-string + // eslint-disable-next-line no-multi-str const multilineMarkdownWithCell = `#%% [markdown] # # Define a simple class class Pizza(object): diff --git a/src/test/datascience/cellMatcher.unit.test.ts b/src/test/datascience/cellMatcher.unit.test.ts index 90ee1da3c09..64b822e1c7a 100644 --- a/src/test/datascience/cellMatcher.unit.test.ts +++ b/src/test/datascience/cellMatcher.unit.test.ts @@ -14,7 +14,7 @@ suite('DataScience CellMatcher', () => { assert.ok(matcher1.isMarkdown('# %% [markdown]'), 'Base markdown is wrong'); assert.equal(matcher1.exec('# %% TITLE'), 'TITLE', 'Title not found'); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (settings).defaultCellMarker = '# %% CODE HERE'; const matcher2 = new CellMatcher(settings); assert.ok(matcher2.isCode('# %%'), 'Code not found'); diff --git a/src/test/datascience/color.vscode.test.ts b/src/test/datascience/color.vscode.test.ts index 12f1613c090..105124aa705 100644 --- a/src/test/datascience/color.vscode.test.ts +++ b/src/test/datascience/color.vscode.test.ts @@ -14,7 +14,7 @@ import { ThemeFinder } from '../../client/datascience/themeFinder'; import { IThemeFinder } from '../../client/datascience/types'; import { MockJupyterSettings } from './mockJupyterSettings'; -// tslint:disable:max-func-body-length +/* eslint-disable */ suite('Theme colors', () => { let themeFinder: ThemeFinder; let extensions: Extensions; @@ -123,7 +123,7 @@ suite('Theme colors', () => { // Make sure we have a string value that is not set to a variable // (that would be the default and all themes have a string color) assert.ok(theme.rules, 'No rules found in monaco theme'); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const commentPunctuation = (theme.rules as any[]).findIndex( (r) => r.token === 'punctuation.definition.comment' ); diff --git a/src/test/datascience/commands/commandRegistry.unit.test.ts b/src/test/datascience/commands/commandRegistry.unit.test.ts index 6bcf64fa531..aada96de85f 100644 --- a/src/test/datascience/commands/commandRegistry.unit.test.ts +++ b/src/test/datascience/commands/commandRegistry.unit.test.ts @@ -21,7 +21,7 @@ import { JupyterServerUriStorage } from '../../../client/datascience/jupyter/ser import { NativeEditorProvider } from '../../../client/datascience/notebookStorage/nativeEditorProvider'; import { MockOutputChannel } from '../../mockClasses'; -// tslint:disable: max-func-body-length +/* eslint-disable */ suite('DataScience - Commands', () => { let kernelSwitcherCommand: NotebookCommands; let serverSelectorCommand: JupyterServerSelectorCommand; @@ -103,7 +103,7 @@ suite('DataScience - Commands', () => { Commands.ViewJupyterOutput ].forEach((command) => { test(`Should register Command ${command}`, () => { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any verify(commandManager.registerCommand(command as any, anything(), commandRegistry)).once(); }); }); diff --git a/src/test/datascience/commands/notebookCommands.functional.test.ts b/src/test/datascience/commands/notebookCommands.functional.test.ts index 52a3cf9eab3..8f81e794185 100644 --- a/src/test/datascience/commands/notebookCommands.functional.test.ts +++ b/src/test/datascience/commands/notebookCommands.functional.test.ts @@ -32,7 +32,7 @@ import { PreferredRemoteKernelIdProvider } from '../../../client/datascience/not import { IInteractiveWindowProvider, INotebookEditorProvider } from '../../../client/datascience/types'; import { IInterpreterService } from '../../../client/interpreter/contracts'; -// tslint:disable: max-func-body-length no-any +/* eslint-disable , @typescript-eslint/no-explicit-any */ suite('DataScience - Notebook Commands', () => { let notebookCommands: NotebookCommands; let commandManager: ICommandManager; @@ -45,7 +45,7 @@ suite('DataScience - Notebook Commands', () => { name: 'CurrentKernel', numberOfConnections: 0, id: '2232', - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any session: {} as any }; const localKernel = { @@ -92,7 +92,7 @@ suite('DataScience - Notebook Commands', () => { ]; [true, false].forEach((isLocalConnection) => { - // tslint:disable-next-line: max-func-body-length + // eslint-disable-next-line suite(isLocalConnection ? 'Local Connection' : 'Remote Connection', () => { setup(() => { interactiveWindowProvider = mock(InteractiveWindowProvider); @@ -134,7 +134,7 @@ suite('DataScience - Notebook Commands', () => { ); const configService = mock(ConfigurationService); - // tslint:disable-next-line: no-http-string + // eslint-disable-next-line const settings = { jupyterServerType: isLocalConnection ? 'local' : 'remote' }; when(configService.getSettings(anything())).thenReturn(settings as any); const extensionChecker = mock(PythonExtensionChecker); @@ -202,11 +202,11 @@ suite('DataScience - Notebook Commands', () => { ).once(); }); suite('Command Handler', () => { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any let commandHandler: Function; setup(() => { notebookCommands.register(); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any commandHandler = capture(commandManager.registerCommand as any).first()[1] as Function; commandHandler = commandHandler.bind(notebookCommands); }); @@ -236,7 +236,7 @@ suite('DataScience - Notebook Commands', () => { test('Should switch kernel using the active Native Editor', async () => { const nativeEditor = createNotebookMock(); const uri = Uri.file('test.ipynb'); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any when(notebookEditorProvider.activeEditor).thenReturn({ file: uri, model: { metadata: undefined } @@ -250,7 +250,7 @@ suite('DataScience - Notebook Commands', () => { test('Should switch kernel using the active Interactive Window', async () => { const interactiveWindow = createNotebookMock(); const uri = Uri.parse('history://foobar'); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any when(interactiveWindowProvider.activeWindow).thenReturn({ identity: uri } as any); diff --git a/src/test/datascience/commands/serverSelector.unit.test.ts b/src/test/datascience/commands/serverSelector.unit.test.ts index 4cec791a08a..238451cf98b 100644 --- a/src/test/datascience/commands/serverSelector.unit.test.ts +++ b/src/test/datascience/commands/serverSelector.unit.test.ts @@ -7,7 +7,7 @@ import { JupyterServerSelectorCommand } from '../../../client/datascience/comman import { Commands } from '../../../client/datascience/constants'; import { JupyterServerSelector } from '../../../client/datascience/jupyter/serverSelector'; -// tslint:disable: max-func-body-length +/* eslint-disable */ suite('DataScience - Server Selector Command', () => { let serverSelectorCommand: JupyterServerSelectorCommand; let commandManager: ICommandManager; @@ -28,7 +28,7 @@ suite('DataScience - Server Selector Command', () => { test('Command Handler should invoke ServerSelector', () => { serverSelectorCommand.register(); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const handler = (capture(commandManager.registerCommand as any).first()[1] as Function).bind( serverSelectorCommand ); diff --git a/src/test/datascience/data-viewing/dataViewerDependencyService.unit.test.ts b/src/test/datascience/data-viewing/dataViewerDependencyService.unit.test.ts index 27bc95edc71..988ce625f63 100644 --- a/src/test/datascience/data-viewing/dataViewerDependencyService.unit.test.ts +++ b/src/test/datascience/data-viewing/dataViewerDependencyService.unit.test.ts @@ -50,9 +50,9 @@ suite('DataScience - DataViewerDependencyService', () => { when(interpreterService.getActiveInterpreter()).thenResolve(interpreter); when(interpreterService.getActiveInterpreter(anything())).thenResolve(interpreter); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (instance(pythonExecService) as any).then = undefined; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (pythonExecService as any).then = undefined; when(pythonExecFactory.createActivatedEnvironment(anything())).thenResolve(instance(pythonExecService)); }); @@ -84,7 +84,7 @@ suite('DataScience - DataViewerDependencyService', () => { when( pythonExecService.exec(deepEqual(['-c', 'import pandas;print(pandas.__version__)']), anything()) ).thenReject(new Error('Not Found')); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any when(appShell.showErrorMessage(anything(), anything())).thenResolve(Common.install() as any); when(installer.install(Product.pandas, interpreter, anything())).thenResolve(); @@ -97,7 +97,7 @@ suite('DataScience - DataViewerDependencyService', () => { when( pythonExecService.exec(deepEqual(['-c', 'import pandas;print(pandas.__version__)']), anything()) ).thenReject(new Error('Not Found')); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any when(appShell.showErrorMessage(anything(), anything())).thenResolve(); const promise = dependencyService.checkAndInstallMissingDependencies(interpreter); diff --git a/src/test/datascience/dataScienceIocContainer.ts b/src/test/datascience/dataScienceIocContainer.ts index c11cdc28b1a..49a8e4343ff 100644 --- a/src/test/datascience/dataScienceIocContainer.ts +++ b/src/test/datascience/dataScienceIocContainer.ts @@ -1,6 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -//tslint:disable:trailing-comma no-any +/* eslint-disable comma-dangle, @typescript-eslint/no-explicit-any */ import { ReactWrapper } from 'enzyme'; import { interfaces } from 'inversify'; import * as os from 'os'; @@ -338,7 +338,7 @@ export class DataScienceIocContainer extends UnitTestIocContainer { } private static jupyterInterpreters: PythonEnvironment[] = []; public applicationShell!: ApplicationShell; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public datascience!: TypeMoq.IMock; public shouldMockJupyter: boolean; public attemptedPythonExtension: boolean = false; @@ -398,7 +398,7 @@ export class DataScienceIocContainer extends UnitTestIocContainer { if (!this.uiTest) { // Blur window focus so we don't have editors polling - // tslint:disable-next-line: no-require-imports + // eslint-disable-next-line @typescript-eslint/no-require-imports const reactHelpers = require('./reactHelpers') as typeof import('./reactHelpers'); reactHelpers.blurWindow(); } @@ -408,7 +408,7 @@ export class DataScienceIocContainer extends UnitTestIocContainer { if (!this.uiTest) { // Clear out the monaco global services. Some of these services are preventing shutdown. - // tslint:disable: no-require-imports + /* eslint-disable @typescript-eslint/no-require-imports */ const services = require('monaco-editor/esm/vs/editor/standalone/browser/standaloneServices') as any; if (services.StaticServices) { const keys = Object.keys(services.StaticServices); @@ -436,7 +436,7 @@ export class DataScienceIocContainer extends UnitTestIocContainer { reset(this.webPanelProvider); } - //tslint:disable:max-func-body-length + /* eslint-disable */ public registerDataScienceTypes(useCustomEditor: boolean = false) { this.serviceManager.addSingletonInstance(DataScienceStartupTime, Date.now()); this.serviceManager.addSingletonInstance(DataScienceIocContainer, this); @@ -966,7 +966,7 @@ export class DataScienceIocContainer extends UnitTestIocContainer { // Log this all the time. Useful in determining why a test may not pass. const message = `Setting interpreter to ${list[0].displayName || list[0].path} -> ${list[0].path}`; traceInfo(message); - // tslint:disable-next-line: no-console + // eslint-disable-next-line no-console console.log(message); // Also set this as the interpreter to use for jupyter @@ -982,7 +982,7 @@ export class DataScienceIocContainer extends UnitTestIocContainer { } } - // tslint:disable:any + /* eslint-disable */ public createWebView( mount: () => ReactWrapper, React.Component>, id: string, @@ -1145,7 +1145,7 @@ export class DataScienceIocContainer extends UnitTestIocContainer { partial: Partial, notifyEvent: boolean = true ) { - // tslint:disable-next-line: no-suspicious-comment + // eslint-disable-next-line // TODO: Python path will not be updated by this code so tests are unlikely to pass const settings = this.getSettings(resource) as MockJupyterSettings; if (partial) { @@ -1182,7 +1182,7 @@ export class DataScienceIocContainer extends UnitTestIocContainer { jupyterLaunchTimeout: 120000, jupyterLaunchRetries: 3, jupyterServerType: 'local', - // tslint:disable-next-line: no-invalid-template-strings + // eslint-disable-next-line no-template-curly-in-string notebookFileRoot: '${fileDirname}', changeDirOnImportExport: false, useDefaultConfigForJupyter: true, @@ -1227,15 +1227,15 @@ export class DataScienceIocContainer extends UnitTestIocContainer { public ignoreCreateEvents: boolean = false; public ignoreChangeEvents: boolean = false; public ignoreDeleteEvents: boolean = false; - //tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public onDidChange(_listener: (e: Uri) => any, _thisArgs?: any, _disposables?: Disposable[]): Disposable { return { dispose: noop }; } - //tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public onDidDelete(_listener: (e: Uri) => any, _thisArgs?: any, _disposables?: Disposable[]): Disposable { return { dispose: noop }; } - //tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public onDidCreate(_listener: (e: Uri) => any, _thisArgs?: any, _disposables?: Disposable[]): Disposable { return { dispose: noop }; } diff --git a/src/test/datascience/datascience.unit.test.ts b/src/test/datascience/datascience.unit.test.ts index d3e390353b5..6c3d5db6204 100644 --- a/src/test/datascience/datascience.unit.test.ts +++ b/src/test/datascience/datascience.unit.test.ts @@ -19,7 +19,7 @@ import { DataScience } from '../../client/datascience/datascience'; import { DataScienceCodeLensProvider } from '../../client/datascience/editor-integration/codelensprovider'; import { IDataScienceCodeLensProvider } from '../../client/datascience/types'; -// tslint:disable: max-func-body-length +/* eslint-disable */ suite('DataScience Tests', () => { let dataScience: DataScience; let cmdManager: CommandManager; @@ -42,9 +42,9 @@ suite('DataScience Tests', () => { dataScience = new DataScience( instance(cmdManager), - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any [] as any, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any { subscriptions: [] } as any, instance(dataScienceCodeLensProvider), instance(configService), @@ -57,7 +57,7 @@ suite('DataScience Tests', () => { onDidChangeActiveTextEditor = sinon.stub(); when(configService.getSettings(anything())).thenReturn(instance(settings)); when(settings.onDidChange).thenReturn(onDidChangeSettings); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any when(docManager.onDidChangeActiveTextEditor).thenReturn(onDidChangeActiveTextEditor); }); @@ -104,7 +104,7 @@ suite('DataScience Tests', () => { metadata: {} }; const result = pruneCell(cell); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any assert.equal((result.outputs as any).length, 1, 'Outputs were removed'); assert.equal(result.execution_count, '23', 'Output execution count removed'); const output = (result.outputs as nbformat.IOutput[])[0]; @@ -134,7 +134,7 @@ suite('DataScience Tests', () => { }; const result = pruneCell(cell); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any assert.equal((result.outputs as any).length, 1, 'Outputs were removed'); assert.equal(result.execution_count, 2, 'Output execution count removed'); assert.deepEqual(result.outputs, cell.outputs, 'Outputs were modified'); @@ -155,7 +155,7 @@ suite('DataScience Tests', () => { }; const result = pruneCell(cell); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any assert.equal((result.outputs as any).length, 1, 'Outputs were removed'); assert.equal(result.execution_count, 2, 'Output execution count removed'); assert.deepEqual(result.outputs, cell.outputs, 'Outputs were modified'); @@ -177,7 +177,7 @@ suite('DataScience Tests', () => { }; const result = pruneCell(cell); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any assert.equal((result.outputs as any).length, 1, 'Outputs were removed'); assert.equal(result.execution_count, 2, 'Output execution count removed'); assert.deepEqual(result.outputs, cell.outputs, 'Outputs were modified'); @@ -206,7 +206,7 @@ suite('DataScience Tests', () => { }; const result = pruneCell(cell); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any assert.equal((result.outputs as any).length, 1, 'Outputs were removed'); assert.equal(result.execution_count, 2, 'Output execution count removed'); assert.deepEqual(result.outputs, cell.outputs, 'Outputs were modified'); @@ -235,7 +235,7 @@ suite('DataScience Tests', () => { }; const result = pruneCell(cell); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any assert.equal((result.outputs as any).length, 1, 'Outputs were removed'); assert.equal(result.execution_count, 2, 'Output execution count removed'); assert.deepEqual(result.outputs, cell.outputs, 'Outputs were modified'); diff --git a/src/test/datascience/datascienceSurveyBanner.vscode.test.ts b/src/test/datascience/datascienceSurveyBanner.vscode.test.ts index 6f315e486c1..12460e7fade 100644 --- a/src/test/datascience/datascienceSurveyBanner.vscode.test.ts +++ b/src/test/datascience/datascienceSurveyBanner.vscode.test.ts @@ -3,7 +3,7 @@ 'use strict'; -// tslint:disable:no-any max-func-body-length +/* eslint-disable @typescript-eslint/no-explicit-any, */ import * as fakeTimers from '@sinonjs/fake-timers'; import * as sinon from 'sinon'; diff --git a/src/test/datascience/dataviewer.functional.test.tsx b/src/test/datascience/dataviewer.functional.test.tsx index 232634031cb..cab52f32099 100644 --- a/src/test/datascience/dataviewer.functional.test.tsx +++ b/src/test/datascience/dataviewer.functional.test.tsx @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. 'use strict'; -// tslint:disable:max-func-body-length trailing-comma no-any no-multiline-string +/* eslint-disable , comma-dangle, @typescript-eslint/no-explicit-any, no-multi-str */ import '../../client/common/extensions'; import { nbformat } from '@jupyterlab/coreutils'; @@ -47,9 +47,9 @@ suite('DataScience DataViewer tests', () => { // run any of our variable execution code const isRollingBuild = process.env ? process.env.VSC_FORCE_REAL_JUPYTER !== undefined : false; if (!isRollingBuild) { - // tslint:disable-next-line:no-console + // eslint-disable-next-line no-console console.log('Skipping DataViewer tests. Requires python environment'); - // tslint:disable-next-line:no-invalid-this + // eslint-disable-next-line no-invalid-this this.skip(); } }); @@ -85,7 +85,7 @@ suite('DataScience DataViewer tests', () => { if (!disposable) { continue; } - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const promise = disposable.dispose() as Promise; if (promise) { await promise; @@ -149,7 +149,7 @@ suite('DataScience DataViewer tests', () => { return mountedWebView.waitForMessage(DataViewerMessages.CompletedData); } - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any function runMountedTest(name: string, testFunc: (mount: IMountedWebView) => Promise) { test(name, async () => { const wrapper = mountWebView(); diff --git a/src/test/datascience/debugLocationTracker.unit.test.ts b/src/test/datascience/debugLocationTracker.unit.test.ts index aa3b52a3a8d..055205a5bb3 100644 --- a/src/test/datascience/debugLocationTracker.unit.test.ts +++ b/src/test/datascience/debugLocationTracker.unit.test.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. 'use strict'; -//tslint:disable:max-func-body-length match-default-export-name no-any no-multiline-string no-trailing-whitespace +/* eslint-disable , , @typescript-eslint/no-explicit-any, no-multi-str, no-trailing-spaces */ import { expect } from 'chai'; import { DebugProtocol } from 'vscode-debugprotocol'; diff --git a/src/test/datascience/debugger.functional.test.tsx b/src/test/datascience/debugger.functional.test.tsx index b969d7a1c0f..429932932db 100644 --- a/src/test/datascience/debugger.functional.test.tsx +++ b/src/test/datascience/debugger.functional.test.tsx @@ -36,14 +36,14 @@ import { traceInfoIf } from '../../client/common/logger'; //import { verifyVariables } from './variableTestHelpers'; //import { asyncDump } from '../common/asyncDump'; -// tslint:disable-next-line:max-func-body-length no-any +// eslint-disable-next-line , @typescript-eslint/no-explicit-any suite('DataScience Debugger tests', () => { const disposables: Disposable[] = []; const postDisposables: Disposable[] = []; let ioc: DataScienceIocContainer; let lastErrorMessage: string | undefined; let jupyterDebuggerService: IJupyterDebugService | undefined; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any let snapshot: any; suiteSetup(function () { @@ -53,9 +53,9 @@ suite('DataScience Debugger tests', () => { const isRollingBuild = process.env ? process.env.VSC_FORCE_REAL_JUPYTER !== undefined : false; if (!isRollingBuild) { - // tslint:disable-next-line:no-console + // eslint-disable-next-line no-console console.log('Skipping Debugger tests. Requires python environment'); - // tslint:disable-next-line:no-invalid-this + // eslint-disable-next-line no-invalid-this this.skip(); } }); @@ -111,7 +111,7 @@ suite('DataScience Debugger tests', () => { if (!disposable) { continue; } - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const promise = disposable.dispose() as Promise; if (promise) { await promise; @@ -123,7 +123,7 @@ suite('DataScience Debugger tests', () => { if (!disposable) { continue; } - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const promise = disposable.dispose() as Promise; if (promise) { await promise; @@ -288,7 +288,7 @@ suite('DataScience Debugger tests', () => { const codeLensProvider = ioc.serviceManager.get(IDataScienceCodeLensProvider); const doc = documentManager.textDocuments[0]; const result = codeLensProvider.provideCodeLenses(doc, CancellationToken.None); - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any if ((result as any).length) { return result as CodeLens[]; } @@ -385,7 +385,7 @@ suite('DataScience Debugger tests', () => { let ImageButtons = cell.find(ImageButton); assert.equal(ImageButtons.length, 6, 'Cell buttons not found'); const runByLineButton = ImageButtons.at(3); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any assert.equal((runByLineButton.instance().props as any).tooltip, 'Run by line'); const promise = ne.mount.waitForMessage(InteractiveWindowMessages.ShowingIp); @@ -416,7 +416,7 @@ suite('DataScience Debugger tests', () => { let ImageButtons = cell.find(ImageButton); assert.equal(ImageButtons.length, 6, 'Cell buttons not found'); const runByLineButton = ImageButtons.at(3); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any assert.equal((runByLineButton.instance().props as any).tooltip, 'Run by line'); const promise = ne.mount.waitForMessage(InteractiveWindowMessages.DebugStateChange, { @@ -430,7 +430,7 @@ suite('DataScience Debugger tests', () => { // We should be running, is the run by line button disabled? cell = getLastOutputCell(wrapper, 'NativeCell'); ImageButtons = cell.find(ImageButton); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any let runByLineButtonProps = ImageButtons.at(3).instance().props as any; expect(runByLineButtonProps.disabled).to.equal(true, 'Run by line button not disabled when running'); @@ -444,7 +444,7 @@ suite('DataScience Debugger tests', () => { cell = getLastOutputCell(wrapper, 'NativeCell'); ImageButtons = cell.find(ImageButton); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any runByLineButtonProps = ImageButtons.at(3).instance().props as any; expect(runByLineButtonProps.disabled).to.equal(false, 'Run by line button not active in break mode'); }, diff --git a/src/test/datascience/dsTestSetup.ts b/src/test/datascience/dsTestSetup.ts index 23448ce02ad..aaea1052379 100644 --- a/src/test/datascience/dsTestSetup.ts +++ b/src/test/datascience/dsTestSetup.ts @@ -67,11 +67,11 @@ function updateTestsForOldNotebooks() { updatePackageJsonForTests(); if (process.env.VSC_JUPYTER_CI_TEST_VSC_CHANNEL === 'insiders' && process.env.VSC_JUPYTER_RUN_NB_TEST) { - // tslint:disable-next-line: no-console + // eslint-disable-next-line no-console console.info('Updated settings for Native Notebook tests'); updateTestsForNativeNotebooks(); } else { - // tslint:disable-next-line: no-console + // eslint-disable-next-line no-console console.info('Updated settings for Standard Notebook tests'); updateTestsForOldNotebooks(); } diff --git a/src/test/datascience/editor-integration/cellhashprovider.unit.test.ts b/src/test/datascience/editor-integration/cellhashprovider.unit.test.ts index 6417b86c12e..f29fb9a0d8b 100644 --- a/src/test/datascience/editor-integration/cellhashprovider.unit.test.ts +++ b/src/test/datascience/editor-integration/cellhashprovider.unit.test.ts @@ -20,7 +20,7 @@ class HashListener implements ICellHashListener { } } -// tslint:disable-next-line: max-func-body-length +// eslint-disable-next-line suite('CellHashProvider Unit Tests', () => { let hashProvider: CellHashProvider; let documentManager: MockDocumentManager; diff --git a/src/test/datascience/editor-integration/codelensprovider.unit.test.ts b/src/test/datascience/editor-integration/codelensprovider.unit.test.ts index c7ce0a8d39a..d8031885f33 100644 --- a/src/test/datascience/editor-integration/codelensprovider.unit.test.ts +++ b/src/test/datascience/editor-integration/codelensprovider.unit.test.ts @@ -16,7 +16,7 @@ import { DataScienceCodeLensProvider } from '../../../client/datascience/editor- import { ICodeWatcher, IDataScienceCodeLensProvider, IDebugLocationTracker } from '../../../client/datascience/types'; import { IServiceContainer } from '../../../client/ioc/types'; -// tslint:disable-next-line: max-func-body-length +// eslint-disable-next-line suite('DataScienceCodeLensProvider Unit Tests', () => { let serviceContainer: TypeMoq.IMock; let configurationService: TypeMoq.IMock; @@ -124,7 +124,7 @@ suite('DataScienceCodeLensProvider Unit Tests', () => { document.setup((d) => d.fileName).returns(() => 'test.py'); document.setup((d) => d.version).returns(() => 1); vscodeNotebook.reset(); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any vscodeNotebook.setup((c) => c.activeNotebookEditor).returns(() => ({} as any)); const targetCodeWatcher = TypeMoq.Mock.ofType(); diff --git a/src/test/datascience/editor-integration/codewatcher.unit.test.ts b/src/test/datascience/editor-integration/codewatcher.unit.test.ts index 1967038575b..3c761c7e314 100644 --- a/src/test/datascience/editor-integration/codewatcher.unit.test.ts +++ b/src/test/datascience/editor-integration/codewatcher.unit.test.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. 'use strict'; -// tslint:disable:max-func-body-length no-trailing-whitespace no-multiline-string chai-vague-errors no-unused-expression +/* eslint-disable , no-trailing-spaces, no-multi-str, , @typescript-eslint/no-unused-expressions */ // Disable whitespace / multiline as we use that to pass in our fake file strings import { expect } from 'chai'; import * as TypeMoq from 'typemoq'; @@ -36,7 +36,7 @@ import { MockJupyterSettings } from '../mockJupyterSettings'; import { MockEditor } from '../mockTextEditor'; import { createDocument } from './helpers'; -//tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ function initializeMockTextEditor( codeWatcher: CodeWatcher, diff --git a/src/test/datascience/editor-integration/gotocell.functional.test.ts b/src/test/datascience/editor-integration/gotocell.functional.test.ts index e1396333625..d657aa2c633 100644 --- a/src/test/datascience/editor-integration/gotocell.functional.test.ts +++ b/src/test/datascience/editor-integration/gotocell.functional.test.ts @@ -28,7 +28,7 @@ import { import { DataScienceIocContainer } from '../dataScienceIocContainer'; import { MockDocumentManager } from '../mockDocumentManager'; -// tslint:disable:no-any no-multiline-string max-func-body-length no-console max-classes-per-file trailing-comma +/* eslint-disable @typescript-eslint/no-explicit-any, no-multi-str, , no-console, max-classes-per-file, comma-dangle */ suite('DataScience gotocell tests', () => { const disposables: Disposable[] = []; let codeLensProvider: IDataScienceCodeLensProvider; @@ -50,7 +50,7 @@ suite('DataScience gotocell tests', () => { teardown(async () => { try { - // tslint:disable-next-line:prefer-for-of + // eslint-disable-next-line @typescript-eslint/prefer-for-of for (let i = 0; i < disposables.length; i += 1) { const disposable = disposables[i]; if (disposable) { diff --git a/src/test/datascience/editor-integration/helpers.ts b/src/test/datascience/editor-integration/helpers.ts index b84c0a07f96..ca385f0a299 100644 --- a/src/test/datascience/editor-integration/helpers.ts +++ b/src/test/datascience/editor-integration/helpers.ts @@ -4,7 +4,7 @@ import * as TypeMoq from 'typemoq'; import { Range, TextDocument, TextLine, Uri } from 'vscode'; -// tslint:disable:max-func-body-length no-trailing-whitespace no-multiline-string +/* eslint-disable , no-trailing-spaces, no-multi-str */ // Disable whitespace / multiline as we use that to pass in our fake file strings // Helper function to create a document and get line count and lines diff --git a/src/test/datascience/execution.unit.test.ts b/src/test/datascience/execution.unit.test.ts index d8585a221df..8a974c1e721 100644 --- a/src/test/datascience/execution.unit.test.ts +++ b/src/test/datascience/execution.unit.test.ts @@ -63,7 +63,7 @@ import { MockOutputChannel } from '../mockClasses'; import { MockJupyterServer } from './mockJupyterServer'; import { MockJupyterSettings } from './mockJupyterSettings'; -// tslint:disable:no-any no-http-string no-multiline-string max-func-body-length +/* eslint-disable @typescript-eslint/no-explicit-any, , no-multi-str, */ class DisposableRegistry implements IAsyncDisposableRegistry { private disposables: Disposable[] = []; @@ -144,7 +144,7 @@ suite('Jupyter Execution', async () => { setup(() => { workingKernelSpec = createTempSpec(workingPython.path); ipykernelInstallCount = 0; - // tslint:disable-next-line:no-invalid-this + // eslint-disable-next-line no-invalid-this }); teardown(() => { @@ -156,7 +156,7 @@ suite('Jupyter Execution', async () => { return disposableRegistry.dispose(); } - // tslint:disable-next-line: max-classes-per-file + // eslint-disable-next-line max-classes-per-file class FunctionMatcher extends Matcher { private func: (obj: any) => boolean; constructor(func: (obj: any) => boolean) { @@ -869,7 +869,7 @@ suite('Jupyter Execution', async () => { jupyterLaunchTimeout: 10, jupyterLaunchRetries: 3, jupyterServerType: 'local', - // tslint:disable-next-line: no-invalid-template-strings + // eslint-disable-next-line no-template-curly-in-string notebookFileRoot: '${fileDirname}', changeDirOnImportExport: true, useDefaultConfigForJupyter: true, diff --git a/src/test/datascience/export/exportFileOpener.unit.test.ts b/src/test/datascience/export/exportFileOpener.unit.test.ts index 84dea52f02c..af94b96d8bc 100644 --- a/src/test/datascience/export/exportFileOpener.unit.test.ts +++ b/src/test/datascience/export/exportFileOpener.unit.test.ts @@ -26,9 +26,9 @@ suite('DataScience - Export File Opener', () => { browserService = mock(); const reporter = mock(ProgressReporter); const editor = mock(); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (instance(editor) as any).then = undefined; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any when(reporter.createProgressIndicator(anything())).thenReturn(instance(mock()) as any); when(documentManager.openTextDocument(anything())).thenResolve(); when(documentManager.showTextDocument(anything())).thenReturn(Promise.resolve(instance(editor))); diff --git a/src/test/datascience/export/exportManager.vscode.test.ts b/src/test/datascience/export/exportManager.vscode.test.ts index 0a0a2ac6b14..28e7ea0d2bb 100644 --- a/src/test/datascience/export/exportManager.vscode.test.ts +++ b/src/test/datascience/export/exportManager.vscode.test.ts @@ -37,22 +37,22 @@ suite('DataScience - Export Manager', () => { appShell = mock(); exportFileOpener = mock(); exportInterpreterFinder = mock(); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any when(filePicker.showDialog(anything(), anything(), anything())).thenReturn( Promise.resolve(Uri.file('test.pdf')) ); - // tslint:disable-next-line: no-empty + // eslint-disable-next-line no-empty,@typescript-eslint/no-empty-function when(appShell.showErrorMessage(anything())).thenResolve(); - // tslint:disable-next-line: no-empty + // eslint-disable-next-line no-empty,@typescript-eslint/no-empty-function when(exportUtil.generateTempDir()).thenResolve({ path: 'test', dispose: () => {} }); when(exportUtil.makeFileInDirectory(anything(), anything(), anything())).thenResolve('foo'); - // tslint:disable-next-line: no-empty + // eslint-disable-next-line no-empty,@typescript-eslint/no-empty-function when(fileSystem.createTemporaryLocalFile(anything())).thenResolve({ filePath: 'test', dispose: () => {} }); when(exportPdf.export(anything(), anything(), anything(), anything())).thenResolve(); when(filePicker.showDialog(anything(), anything())).thenResolve(Uri.file('foo')); when(exportInterpreterFinder.getExportInterpreter(anything())).thenResolve(); when(exportFileOpener.openFile(anything(), anything())).thenResolve(); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any when(reporter.createProgressIndicator(anything(), anything())).thenReturn(instance(mock()) as any); exporter = new ExportManager( instance(exportPdf), diff --git a/src/test/datascience/export/exportToHTML.vscode.test.ts b/src/test/datascience/export/exportToHTML.vscode.test.ts index 2d2b33e654e..d65ee5552be 100644 --- a/src/test/datascience/export/exportToHTML.vscode.test.ts +++ b/src/test/datascience/export/exportToHTML.vscode.test.ts @@ -1,7 +1,7 @@ // Licensed under the MIT License. // Copyright (c) Microsoft Corporation. All rights reserved. -// tslint:disable: no-var-requires no-require-imports no-invalid-this no-any +/* eslint-disable @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports, no-invalid-this, @typescript-eslint/no-explicit-any */ import { assert } from 'chai'; import * as path from 'path'; import { CancellationTokenSource, Uri } from 'vscode'; @@ -21,12 +21,12 @@ suite('DataScience - Export HTML', function () { // run any of our variable execution code const isRollingBuild = process.env ? process.env.VSC_FORCE_REAL_JUPYTER !== undefined : false; if (!isRollingBuild) { - // tslint:disable-next-line:no-console + // eslint-disable-next-line no-console console.log('Skipping Export to HTML tests. Requires python environment'); - // tslint:disable-next-line:no-invalid-this + // eslint-disable-next-line no-invalid-this this.skip(); } - // tslint:disable-next-line:no-invalid-this + // eslint-disable-next-line no-invalid-this this.skip(); }); teardown(closeActiveWindows); diff --git a/src/test/datascience/export/exportToPython.vscode.test.ts b/src/test/datascience/export/exportToPython.vscode.test.ts index 90290a6cbd8..db581b85e41 100644 --- a/src/test/datascience/export/exportToPython.vscode.test.ts +++ b/src/test/datascience/export/exportToPython.vscode.test.ts @@ -1,7 +1,7 @@ // Licensed under the MIT License. // Copyright (c) Microsoft Corporation. All rights reserved. -// tslint:disable: no-var-requires no-require-imports no-invalid-this no-any +/* eslint-disable @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports, no-invalid-this, @typescript-eslint/no-explicit-any */ import { assert } from 'chai'; import * as path from 'path'; import { CancellationTokenSource, Uri } from 'vscode'; @@ -22,12 +22,12 @@ suite('DataScience - Export Python', function () { // run any of our variable execution code const isRollingBuild = process.env ? process.env.VSC_FORCE_REAL_JUPYTER !== undefined : false; if (!isRollingBuild) { - // tslint:disable-next-line:no-console + // eslint-disable-next-line no-console console.log('Skipping Export to Python tests. Requires python environment'); - // tslint:disable-next-line:no-invalid-this + // eslint-disable-next-line no-invalid-this this.skip(); } - // tslint:disable-next-line:no-invalid-this + // eslint-disable-next-line no-invalid-this this.skip(); }); teardown(closeActiveWindows); diff --git a/src/test/datascience/export/exportUtil.vscode.test.ts b/src/test/datascience/export/exportUtil.vscode.test.ts index 73c33406461..b7dbf7f363a 100644 --- a/src/test/datascience/export/exportUtil.vscode.test.ts +++ b/src/test/datascience/export/exportUtil.vscode.test.ts @@ -1,7 +1,7 @@ // Licensed under the MIT License. // Copyright (c) Microsoft Corporation. All rights reserved. -// tslint:disable: no-var-requires no-require-imports no-invalid-this no-any +/* eslint-disable @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports, no-invalid-this, @typescript-eslint/no-explicit-any */ import { nbformat } from '@jupyterlab/coreutils'; import { assert } from 'chai'; import * as fs from 'fs-extra'; @@ -23,7 +23,7 @@ suite('DataScience - Export Util', () => { // Export Util tests require jupyter to run. Otherwise can't // run any of our variable execution code if (!process.env.VSC_FORCE_REAL_JUPYTER) { - // tslint:disable-next-line:no-invalid-this + // eslint-disable-next-line no-invalid-this this.skip(); } }); diff --git a/src/test/datascience/group1.nonConda.functional.test.tsx b/src/test/datascience/group1.nonConda.functional.test.tsx index b5927657d5c..61538169bc3 100644 --- a/src/test/datascience/group1.nonConda.functional.test.tsx +++ b/src/test/datascience/group1.nonConda.functional.test.tsx @@ -9,9 +9,9 @@ import { DataScienceIocContainer } from './dataScienceIocContainer'; import { takeSnapshot, writeDiffSnapshot } from './helpers'; import { addCode, getOrCreateInteractiveWindow, runTest } from './interactiveWindowTestHelpers'; import { CellPosition, verifyHtmlOnCell } from './testHelpers'; -// tslint:disable-next-line: no-require-imports no-var-requires +// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires -// tslint:disable:max-func-body-length trailing-comma no-any no-multiline-string +/* eslint-disable , comma-dangle, @typescript-eslint/no-explicit-any, no-multi-str */ suite('DataScience Interactive Window output tests', () => { const disposables: Disposable[] = []; let ioc: DataScienceIocContainer; @@ -39,7 +39,7 @@ suite('DataScience Interactive Window output tests', () => { if (!disposable) { continue; } - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const promise = disposable.dispose() as Promise; if (promise) { await promise; diff --git a/src/test/datascience/helpers.ts b/src/test/datascience/helpers.ts index e915030f2a0..b3ee3ab9e81 100644 --- a/src/test/datascience/helpers.ts +++ b/src/test/datascience/helpers.ts @@ -36,7 +36,7 @@ export function defaultDataScienceSettings(): IJupyterSettings { jupyterLaunchTimeout: 10, jupyterLaunchRetries: 3, jupyterServerType: 'local', - // tslint:disable-next-line: no-invalid-template-strings + // eslint-disable-next-line no-template-curly-in-string notebookFileRoot: '${fileDirname}', changeDirOnImportExport: false, useDefaultConfigForJupyter: true, @@ -59,7 +59,7 @@ export function defaultDataScienceSettings(): IJupyterSettings { jupyterCommandLineArguments: [], widgetScriptSources: [], interactiveWindowMode: 'single' - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any; } @@ -69,13 +69,13 @@ export function takeSnapshot() { // memory. // Alternatively, using the test:functional:memleak task and sticking breakpoints here and in // writeDiffSnapshot can be used as convenient locations to create heap snapshots and diff them. - // tslint:disable-next-line: no-require-imports + // eslint-disable-next-line @typescript-eslint/no-require-imports //const memwatch = require('@raghb1/node-memwatch'); return {}; //new memwatch.HeapDiff(); } //let snapshotCounter = 1; -// tslint:disable-next-line: no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any export function writeDiffSnapshot(_snapshot: any, _prefix: string) { noop(); // Stick breakpoint here when generating heap snapshots // const diff = snapshot.end(); @@ -113,7 +113,7 @@ export async function openNotebook( editorProvider.activeEditor instanceof NativeEditorOldWebView ) { // We don't care about changes, no need to save them. - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (editorProvider.activeEditor as any).askForSave = () => Promise.resolve(AskForSaveResult.No); } traceInfo(`Opened notebook ${ipynbFile}`); diff --git a/src/test/datascience/insidersNativeNotebookSurveyBanner.vscode.test.ts b/src/test/datascience/insidersNativeNotebookSurveyBanner.vscode.test.ts index 14e6977443f..884af0cff8d 100644 --- a/src/test/datascience/insidersNativeNotebookSurveyBanner.vscode.test.ts +++ b/src/test/datascience/insidersNativeNotebookSurveyBanner.vscode.test.ts @@ -3,7 +3,7 @@ 'use strict'; -// tslint:disable:no-any max-func-body-length +/* eslint-disable @typescript-eslint/no-explicit-any, */ import * as fakeTimers from '@sinonjs/fake-timers'; import * as sinon from 'sinon'; diff --git a/src/test/datascience/intellisense.functional.test.tsx b/src/test/datascience/intellisense.functional.test.tsx index 2e6ca163502..2657a8998cb 100644 --- a/src/test/datascience/intellisense.functional.test.tsx +++ b/src/test/datascience/intellisense.functional.test.tsx @@ -23,7 +23,7 @@ import * as NativeHelpers from './nativeEditorTestHelpers'; import { addMockData, enterEditorKey, getInteractiveEditor, getNativeEditor, typeCode } from './testHelpers'; import { ITestNativeEditorProvider } from './testNativeEditorProvider'; -// tslint:disable:max-func-body-length trailing-comma no-any no-multiline-string +/* eslint-disable , comma-dangle, @typescript-eslint/no-explicit-any, no-multi-str */ suite(`DataScience Intellisense tests with LanguageServer mocked`, () => { const disposables: Disposable[] = []; let ioc: DataScienceIocContainer; @@ -52,7 +52,7 @@ suite(`DataScience Intellisense tests with LanguageServer mocked`, () => { if (!disposable) { continue; } - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const promise = disposable.dispose() as Promise; if (promise) { await promise; diff --git a/src/test/datascience/interactive-common/notebookProvider.unit.test.ts b/src/test/datascience/interactive-common/notebookProvider.unit.test.ts index da6e9500695..b6f93725c93 100644 --- a/src/test/datascience/interactive-common/notebookProvider.unit.test.ts +++ b/src/test/datascience/interactive-common/notebookProvider.unit.test.ts @@ -15,7 +15,7 @@ function Uri(filename: string): vscode.Uri { return vscode.Uri.file(filename); } -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ function createTypeMoq(tag: string): typemoq.IMock { // Use typemoqs for those things that are resolved as promises. mockito doesn't allow nesting of mocks. ES6 Proxy class // is the problem. We still need to make it thenable though. See this issue: https://github.com/florinn/typemoq/issues/67 @@ -25,7 +25,7 @@ function createTypeMoq(tag: string): typemoq.IMock { return result; } -// tslint:disable: max-func-body-length +/* eslint-disable */ suite('DataScience - NotebookProvider', () => { let notebookProvider: NotebookProvider; let disposableRegistry: IDisposableRegistry; diff --git a/src/test/datascience/interactive-common/notebookServerProvider.unit.test.ts b/src/test/datascience/interactive-common/notebookServerProvider.unit.test.ts index 996f1640710..ff6a3a628dc 100644 --- a/src/test/datascience/interactive-common/notebookServerProvider.unit.test.ts +++ b/src/test/datascience/interactive-common/notebookServerProvider.unit.test.ts @@ -14,7 +14,7 @@ import { IJupyterExecution, INotebookServer } from '../../../client/datascience/ import { IInterpreterService } from '../../../client/interpreter/contracts'; import { PythonEnvironment } from '../../../client/pythonEnvironments/info'; -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ function createTypeMoq(tag: string): typemoq.IMock { // Use typemoqs for those things that are resolved as promises. mockito doesn't allow nesting of mocks. ES6 Proxy class // is the problem. We still need to make it thenable though. See this issue: https://github.com/florinn/typemoq/issues/67 @@ -24,7 +24,7 @@ function createTypeMoq(tag: string): typemoq.IMock { return result; } -// tslint:disable: max-func-body-length +/* eslint-disable */ suite('DataScience - NotebookServerProvider', () => { let serverProvider: NotebookServerProvider; let progressReporter: ProgressReporter; diff --git a/src/test/datascience/interactive-common/trustService.unit.test.ts b/src/test/datascience/interactive-common/trustService.unit.test.ts index a2cadbcd793..93a50eec11e 100644 --- a/src/test/datascience/interactive-common/trustService.unit.test.ts +++ b/src/test/datascience/interactive-common/trustService.unit.test.ts @@ -30,7 +30,7 @@ suite('DataScience - TrustService', () => { const globalState = new MockMemento(); context.setup((c) => c.globalState).returns(() => globalState); when(configService.getSettings()).thenCall(() => { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any return { alwaysTrustNotebooks } as any; }); when(fileSystem.appendLocalFile(anything(), anything())).thenCall((f, c) => fs.appendFile(f, c)); diff --git a/src/test/datascience/interactive-ipynb/nativeEditorProvider.functional.test.ts b/src/test/datascience/interactive-ipynb/nativeEditorProvider.functional.test.ts index 86eed28b816..d1ac7012ace 100644 --- a/src/test/datascience/interactive-ipynb/nativeEditorProvider.functional.test.ts +++ b/src/test/datascience/interactive-ipynb/nativeEditorProvider.functional.test.ts @@ -3,7 +3,7 @@ 'use strict'; -// tslint:disable: no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ import { expect } from 'chai'; import { Uri } from 'vscode'; @@ -16,7 +16,7 @@ import { createEmptyCell } from '../../../datascience-ui/interactive-common/main import { DataScienceIocContainer } from '../dataScienceIocContainer'; import { TestNativeEditorProvider } from '../testNativeEditorProvider'; -// tslint:disable: max-func-body-length +/* eslint-disable */ suite('DataScience - Native Editor Provider', () => { let ioc: DataScienceIocContainer; setup(async () => { diff --git a/src/test/datascience/interactive-ipynb/nativeEditorStorage.unit.test.ts b/src/test/datascience/interactive-ipynb/nativeEditorStorage.unit.test.ts index b0bca789a7d..73250aee35a 100644 --- a/src/test/datascience/interactive-ipynb/nativeEditorStorage.unit.test.ts +++ b/src/test/datascience/interactive-ipynb/nativeEditorStorage.unit.test.ts @@ -48,9 +48,9 @@ import { createEmptyCell } from '../../../datascience-ui/interactive-common/main import { MockMemento } from '../../mocks/mementos'; import { MockWorkspaceConfiguration } from '../mockWorkspaceConfig'; -// tslint:disable: no-any chai-vague-errors no-unused-expression +/* eslint-disable @typescript-eslint/no-explicit-any, , @typescript-eslint/no-unused-expressions */ -// tslint:disable: max-func-body-length +/* eslint-disable */ suite('DataScience - Native Editor Storage', () => { let workspace: IWorkspaceService; let configService: IConfigurationService; diff --git a/src/test/datascience/interactiveWindow.functional.test.tsx b/src/test/datascience/interactiveWindow.functional.test.tsx index c2b08804c10..14ddfd66175 100644 --- a/src/test/datascience/interactiveWindow.functional.test.tsx +++ b/src/test/datascience/interactiveWindow.functional.test.tsx @@ -69,10 +69,10 @@ import { import { ITestInteractiveWindowProvider } from './testInteractiveWindowProvider'; import { InteractiveWindowMessageListener } from '../../client/datascience/interactive-common/interactiveWindowMessageListener'; import { IExportDialog } from '../../client/datascience/export/types'; -// tslint:disable-next-line: no-require-imports no-var-requires +// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires const _escape = require('lodash/escape') as typeof import('lodash/escape'); // NOSONAR -// tslint:disable:max-func-body-length trailing-comma no-any no-multiline-string +/* eslint-disable , comma-dangle, @typescript-eslint/no-explicit-any, no-multi-str */ suite('DataScience Interactive Window output tests', () => { const disposables: Disposable[] = []; let ioc: DataScienceIocContainer; @@ -97,7 +97,7 @@ suite('DataScience Interactive Window output tests', () => { if (!disposable) { continue; } - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const promise = disposable.dispose() as Promise; if (promise) { await promise; @@ -691,7 +691,7 @@ for i in range(100): const interpreterService = ioc.get(IInterpreterService); const interpreters = await ioc.getFunctionalTestInterpreters(); if (interpreters.length < 2) { - // tslint:disable-next-line: no-console + // eslint-disable-next-line no-console console.log( 'Multiple interpreters skipped because local machine does not have more than one jupyter environment' ); @@ -713,7 +713,7 @@ for i in range(100): const secondUri = Uri.file('bar.py'); ioc.addResourceToFolder(secondUri, path.join(EXTENSION_ROOT_DIR, 'src', 'test', 'datascience2')); - // tslint:disable-next-line: no-suspicious-comment + // eslint-disable-next-line ioc.get(IInterpreterService).updateInterpreter( secondUri, interpreters.filter((i) => i.path !== activeInterpreter?.path)[0].path @@ -742,10 +742,10 @@ for i in range(100): runTest( 'Dispose test', async () => { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const { window } = await getOrCreateInteractiveWindow(ioc); await window.dispose(); - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const h2 = await getOrCreateInteractiveWindow(ioc); // Check equal and then dispose so the test goes away const equal = Object.is(window, h2.window); @@ -1253,9 +1253,9 @@ for i in range(100): const { mount, window } = await getOrCreateInteractiveWindow(ioc); // We need to update the view state to get the external buttons - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const listener = (window as any).messageListener as InteractiveWindowMessageListener; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any listener.onChangeViewState((window as any).webPanel); // Then enter some code. diff --git a/src/test/datascience/interactiveWindowCommandListener.unit.test.ts b/src/test/datascience/interactiveWindowCommandListener.unit.test.ts index 68851b03a4c..726a489857c 100644 --- a/src/test/datascience/interactiveWindowCommandListener.unit.test.ts +++ b/src/test/datascience/interactiveWindowCommandListener.unit.test.ts @@ -40,7 +40,7 @@ import { MockDocumentManager } from './mockDocumentManager'; import { MockJupyterSettings } from './mockJupyterSettings'; import { MockStatusProvider } from './mockStatusProvider'; -// tslint:disable:no-any no-http-string no-multiline-string max-func-body-length +/* eslint-disable @typescript-eslint/no-explicit-any, , no-multi-str, */ function createTypeMoq(tag: string): TypeMoq.IMock { // Use typemoqs for those things that are resolved as promises. mockito doesn't allow nesting of mocks. ES6 Proxy class @@ -51,7 +51,7 @@ function createTypeMoq(tag: string): TypeMoq.IMock { return result; } -// tslint:disable:no-any no-http-string no-multiline-string max-func-body-length +/* eslint-disable @typescript-eslint/no-explicit-any, , no-multi-str, */ suite('Interactive window command listener', async () => { const interpreterService = mock(); const configService = mock(ConfigurationService); @@ -125,7 +125,7 @@ suite('Interactive window command listener', async () => { jupyterLaunchRetries: 3, jupyterServerType: 'local', changeDirOnImportExport: false, - // tslint:disable-next-line: no-invalid-template-strings + // eslint-disable-next-line no-template-curly-in-string notebookFileRoot: '${fileDirname}', useDefaultConfigForJupyter: true, jupyterInterruptTimeout: 10000, diff --git a/src/test/datascience/interactiveWindowTestHelpers.tsx b/src/test/datascience/interactiveWindowTestHelpers.tsx index cb472248a07..de28fbbf15f 100644 --- a/src/test/datascience/interactiveWindowTestHelpers.tsx +++ b/src/test/datascience/interactiveWindowTestHelpers.tsx @@ -61,7 +61,7 @@ export async function runCodeLens( await documentManager.showTextDocument(uri); const commandManager = ioc.get(ICommandManager); if (codeLens && codeLens.command) { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any await commandManager.executeCommand(codeLens.command.command as any, ...codeLens.command.arguments); } } @@ -74,7 +74,7 @@ export function closeInteractiveWindow(ioc: DataScienceIocContainer, window: IIn export function runTest( name: string, - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any testFunc: (context: Mocha.Context) => Promise, getIOC: () => DataScienceIocContainer ) { @@ -83,10 +83,10 @@ export function runTest( const jupyterExecution = ioc.get(IJupyterExecution); if (await jupyterExecution.isNotebookSupported()) { addMockData(ioc, 'a=1\na', 1); - // tslint:disable-next-line: no-invalid-this + // eslint-disable-next-line no-invalid-this await testFunc(this); } else { - // tslint:disable-next-line:no-invalid-this + // eslint-disable-next-line no-invalid-this this.skip(); } }); @@ -97,7 +97,7 @@ export async function addCode( code: string, expectError: boolean = false, uri: Uri = Uri.file('foo.py') - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any ): Promise, React.Component>> { const { window } = await getOrCreateInteractiveWindow(ioc); return getInteractiveCellResults(ioc, async () => { diff --git a/src/test/datascience/ipywidgets/cdnWidgetScriptSourceProvider.unit.test.ts b/src/test/datascience/ipywidgets/cdnWidgetScriptSourceProvider.unit.test.ts index e5066d5e9de..f61142381be 100644 --- a/src/test/datascience/ipywidgets/cdnWidgetScriptSourceProvider.unit.test.ts +++ b/src/test/datascience/ipywidgets/cdnWidgetScriptSourceProvider.unit.test.ts @@ -23,14 +23,14 @@ import { IWidgetScriptSourceProvider } from '../../../client/datascience/ipywidg import { JupyterNotebookBase } from '../../../client/datascience/jupyter/jupyterNotebook'; import { IJupyterConnection, ILocalResourceUriConverter, INotebook } from '../../../client/datascience/types'; -// tslint:disable: no-var-requires no-require-imports max-func-body-length no-any match-default-export-name no-console +/* eslint-disable @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports, , @typescript-eslint/no-explicit-any, , no-console */ const request = require('request'); const sanitize = require('sanitize-filename'); const unpgkUrl = 'https://unpkg.com/'; const jsdelivrUrl = 'https://cdn.jsdelivr.net/npm/'; -// tslint:disable: max-func-body-length no-any +/* eslint-disable , @typescript-eslint/no-explicit-any */ suite('DataScience - ipywidget - CDN', () => { let scriptSourceProvider: IWidgetScriptSourceProvider; let notebook: INotebook; @@ -43,7 +43,7 @@ suite('DataScience - ipywidget - CDN', () => { suiteSetup(function () { // Nock seems to fail randomly on CI builds. See bug // https://github.com/microsoft/vscode-python/issues/11442 - // tslint:disable-next-line: no-invalid-this + // eslint-disable-next-line no-invalid-this return this.skip(); }); setup(() => { diff --git a/src/test/datascience/ipywidgets/incompatibleWidgetHandler.unit.test.ts b/src/test/datascience/ipywidgets/incompatibleWidgetHandler.unit.test.ts index eeb10e20f74..af8fde48b3f 100644 --- a/src/test/datascience/ipywidgets/incompatibleWidgetHandler.unit.test.ts +++ b/src/test/datascience/ipywidgets/incompatibleWidgetHandler.unit.test.ts @@ -3,7 +3,7 @@ import { assert } from 'chai'; import { warnAboutWidgetVersionsThatAreNotSupported } from '../../../datascience-ui/ipywidgets/common/incompatibleWidgetHandler'; -// tslint:disable: max-func-body-length no-any +/* eslint-disable , @typescript-eslint/no-explicit-any */ suite('DataScience - Incompatible Widgets', () => { suite('Using qgrid widget with CDN turned on', () => { async function testLoadingQgrid(versionToLoad: string, warningExpectedToBeDisplayed: boolean) { diff --git a/src/test/datascience/ipywidgets/ipyWidgetScriptSourceProvider.unit.test.ts b/src/test/datascience/ipywidgets/ipyWidgetScriptSourceProvider.unit.test.ts index 7d0833132f0..013f00eac82 100644 --- a/src/test/datascience/ipywidgets/ipyWidgetScriptSourceProvider.unit.test.ts +++ b/src/test/datascience/ipywidgets/ipyWidgetScriptSourceProvider.unit.test.ts @@ -23,7 +23,7 @@ import { JupyterNotebookBase } from '../../../client/datascience/jupyter/jupyter import { IJupyterConnection, ILocalResourceUriConverter, INotebook } from '../../../client/datascience/types'; import { IInterpreterService } from '../../../client/interpreter/contracts'; -// tslint:disable: no-any no-invalid-this +/* eslint-disable @typescript-eslint/no-explicit-any, no-invalid-this */ suite('DataScience - ipywidget - Widget Script Source Provider', () => { let scriptSourceProvider: IPyWidgetScriptSourceProvider; diff --git a/src/test/datascience/ipywidgets/localWidgetScriptSourceProvider.unit.test.ts b/src/test/datascience/ipywidgets/localWidgetScriptSourceProvider.unit.test.ts index 88227890274..a1050f21c0d 100644 --- a/src/test/datascience/ipywidgets/localWidgetScriptSourceProvider.unit.test.ts +++ b/src/test/datascience/ipywidgets/localWidgetScriptSourceProvider.unit.test.ts @@ -13,7 +13,7 @@ import { JupyterNotebookBase } from '../../../client/datascience/jupyter/jupyter import { ILocalResourceUriConverter, INotebook } from '../../../client/datascience/types'; import { IInterpreterService } from '../../../client/interpreter/contracts'; -// tslint:disable: max-func-body-length no-any +/* eslint-disable , @typescript-eslint/no-explicit-any */ suite('DataScience - ipywidget - Local Widget Script Source', () => { let scriptSourceProvider: IWidgetScriptSourceProvider; let notebook: INotebook; diff --git a/src/test/datascience/jupyter/interpreter/jupyterInterpreterDependencyService.unit.test.ts b/src/test/datascience/jupyter/interpreter/jupyterInterpreterDependencyService.unit.test.ts index cfbf38d78b4..1d905b184e5 100644 --- a/src/test/datascience/jupyter/interpreter/jupyterInterpreterDependencyService.unit.test.ts +++ b/src/test/datascience/jupyter/interpreter/jupyterInterpreterDependencyService.unit.test.ts @@ -21,7 +21,7 @@ import { import { IJupyterCommand, IJupyterCommandFactory } from '../../../../client/datascience/types'; import { PythonEnvironment } from '../../../../client/pythonEnvironments/info'; -// tslint:disable: max-func-body-length no-any +/* eslint-disable , @typescript-eslint/no-explicit-any */ suite('DataScience - Jupyter Interpreter Configuration', () => { let configuration: JupyterInterpreterDependencyService; @@ -88,7 +88,7 @@ suite('DataScience - Jupyter Interpreter Configuration', () => { when(installer.isInstalled(Product.jupyter, pythonInterpreter)).thenResolve(true); when(installer.isInstalled(Product.notebook, pythonInterpreter)).thenResolve(true); when(appShell.showErrorMessage(anything(), anything(), anything(), anything())).thenResolve( - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any DataScience.jupyterInstall() as any ); when(command.exec(anything(), anything())).thenReject(new Error('Not found')); @@ -117,7 +117,7 @@ suite('DataScience - Jupyter Interpreter Configuration', () => { when(installer.isInstalled(Product.jupyter, pythonInterpreter)).thenResolve(false); when(installer.isInstalled(Product.notebook, pythonInterpreter)).thenResolve(true); when(appShell.showErrorMessage(anything(), anything(), anything(), anything())).thenResolve( - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any DataScience.jupyterInstall() as any ); when(installer.install(anything(), anything(), anything())).thenResolve(installerResponse); @@ -135,7 +135,7 @@ suite('DataScience - Jupyter Interpreter Configuration', () => { when(installer.isInstalled(Product.jupyter, pythonInterpreter)).thenResolve(false); when(installer.isInstalled(Product.notebook, pythonInterpreter)).thenResolve(false); when(appShell.showErrorMessage(anything(), anything(), anything(), anything())).thenResolve( - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any DataScience.jupyterInstall() as any ); when(installer.install(Product.jupyter, anything(), anything())).thenResolve(jupyterInstallerResponse); diff --git a/src/test/datascience/jupyter/interpreter/jupyterInterpreterSelector.unit.test.ts b/src/test/datascience/jupyter/interpreter/jupyterInterpreterSelector.unit.test.ts index ad096735319..ad8ea4562fa 100644 --- a/src/test/datascience/jupyter/interpreter/jupyterInterpreterSelector.unit.test.ts +++ b/src/test/datascience/jupyter/interpreter/jupyterInterpreterSelector.unit.test.ts @@ -28,7 +28,7 @@ suite('DataScience - Jupyter Interpreter Picker', () => { appShell = mock(ApplicationShell); workspace = mock(WorkspaceService); pathUtils = mock(PathUtils); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any picker = new JupyterInterpreterSelector( instance(interpreterSelector), instance(appShell), @@ -39,7 +39,7 @@ suite('DataScience - Jupyter Interpreter Picker', () => { }); test('Should display the list of interpreters', async () => { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const interpreters = ['something'] as any[]; when(interpreterSelector.getSuggestions(undefined)).thenResolve(interpreters); when(appShell.showQuickPick(anything(), anything())).thenResolve(); @@ -50,12 +50,12 @@ suite('DataScience - Jupyter Interpreter Picker', () => { verify(appShell.showQuickPick(anything(), anything())).once(); }); test('Selected interpreter must be returned', async () => { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const interpreters = ['something'] as any[]; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const interpreter = {} as any; when(interpreterSelector.getSuggestions(undefined)).thenResolve(interpreters); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any when(appShell.showQuickPick(anything(), anything())).thenResolve({ interpreter } as any); const selected = await picker.selectInterpreter(); @@ -63,7 +63,7 @@ suite('DataScience - Jupyter Interpreter Picker', () => { assert.isOk(selected === interpreter, 'Not the same instance'); }); test('Should display current interpreter path in the picker', async () => { - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const interpreters = ['something'] as any[]; const displayPath = 'Display Path'; when(interpreterSelectionState.selectedPythonPath).thenReturn('jupyter.exe'); diff --git a/src/test/datascience/jupyter/interpreter/jupyterInterpreterService.unit.test.ts b/src/test/datascience/jupyter/interpreter/jupyterInterpreterService.unit.test.ts index 974376cca9b..058e9fd8f4a 100644 --- a/src/test/datascience/jupyter/interpreter/jupyterInterpreterService.unit.test.ts +++ b/src/test/datascience/jupyter/interpreter/jupyterInterpreterService.unit.test.ts @@ -19,7 +19,7 @@ import { PythonEnvironment } from '../../../../client/pythonEnvironments/info'; import { MockMemento } from '../../../mocks/mementos'; import { createPythonInterpreter } from '../../../utils/interpreters'; -// tslint:disable: max-func-body-length +/* eslint-disable */ suite('DataScience - Jupyter Interpreter Service', () => { let jupyterInterpreterService: JupyterInterpreterService; diff --git a/src/test/datascience/jupyter/interpreter/jupyterInterpreterSubCommandExecutionService.unit.test.ts b/src/test/datascience/jupyter/interpreter/jupyterInterpreterSubCommandExecutionService.unit.test.ts index d36e44618f9..56a49d3ee23 100644 --- a/src/test/datascience/jupyter/interpreter/jupyterInterpreterSubCommandExecutionService.unit.test.ts +++ b/src/test/datascience/jupyter/interpreter/jupyterInterpreterSubCommandExecutionService.unit.test.ts @@ -33,7 +33,7 @@ import { MockOutputChannel } from '../../../mockClasses'; import { createPythonInterpreter } from '../../../utils/interpreters'; use(chaiPromise); -// tslint:disable: max-func-body-length +/* eslint-disable */ suite('DataScience - Jupyter InterpreterSubCommandExecutionService', () => { let jupyterInterpreter: JupyterInterpreterService; @@ -58,7 +58,7 @@ suite('DataScience - Jupyter InterpreterSubCommandExecutionService', () => { ) ).thenResolve(instance(execService)); when(execFactory.createActivatedEnvironment(anything())).thenResolve(instance(execService)); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (instance(execService) as any).then = undefined; const output = new MockOutputChannel(''); const pathUtils = mock(PathUtils); @@ -78,13 +78,13 @@ suite('DataScience - Jupyter InterpreterSubCommandExecutionService', () => { ); when(execService.execModuleObservable('jupyter', anything(), anything())).thenResolve( - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any notebookStartResult as any ); when(interperterService.getActiveInterpreter()).thenResolve(activePythonInterpreter); when(interperterService.getActiveInterpreter(undefined)).thenResolve(activePythonInterpreter); }); - // tslint:disable-next-line: max-func-body-length + // eslint-disable-next-line suite('Interpreter is not selected', () => { setup(() => { when(jupyterInterpreter.getSelectedInterpreter()).thenResolve(undefined); @@ -184,7 +184,7 @@ suite('DataScience - Jupyter InterpreterSubCommandExecutionService', () => { ); }); }); - // tslint:disable-next-line: max-func-body-length + // eslint-disable-next-line suite('Interpreter is selected', () => { setup(() => { when(jupyterInterpreter.getSelectedInterpreter()).thenResolve(selectedJupyterInterpreter); diff --git a/src/test/datascience/jupyter/jupyterCellOutputMimeTypeTracker.unit.test.ts b/src/test/datascience/jupyter/jupyterCellOutputMimeTypeTracker.unit.test.ts index b52fdd0c2d1..aad9683bb90 100644 --- a/src/test/datascience/jupyter/jupyterCellOutputMimeTypeTracker.unit.test.ts +++ b/src/test/datascience/jupyter/jupyterCellOutputMimeTypeTracker.unit.test.ts @@ -5,7 +5,7 @@ import { nbformat } from '@jupyterlab/coreutils'; import * as fakeTimers from '@sinonjs/fake-timers'; import { expect } from 'chai'; import { sha256 } from 'hash.js'; -// tslint:disable-next-line: match-default-export-name +// eslint-disable-next-line import rewiremock from 'rewiremock'; import { instance, mock, when } from 'ts-mockito'; import { EventEmitter, Uri } from 'vscode'; diff --git a/src/test/datascience/jupyter/jupyterConnection.unit.test.ts b/src/test/datascience/jupyter/jupyterConnection.unit.test.ts index 220b0ea6ca5..56205d5c156 100644 --- a/src/test/datascience/jupyter/jupyterConnection.unit.test.ts +++ b/src/test/datascience/jupyter/jupyterConnection.unit.test.ts @@ -19,7 +19,7 @@ import { JupyterConnectionWaiter, JupyterServerInfo } from '../../../client/data import { ServiceContainer } from '../../../client/ioc/container'; import { IServiceContainer } from '../../../client/ioc/types'; -// tslint:disable: max-func-body-length no-any +/* eslint-disable , @typescript-eslint/no-explicit-any */ suite('DataScience - JupyterConnection', () => { let observableOutput: Subject>; let launchResult: ObservableExecutionResult; @@ -27,7 +27,7 @@ suite('DataScience - JupyterConnection', () => { let configService: IConfigurationService; let fs: IFileSystem; let serviceContainer: IServiceContainer; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const dsSettings: IJupyterSettings = { jupyterLaunchTimeout: 10_000 } as any; const childProc = new events.EventEmitter(); const notebookDir = 'someDir'; @@ -73,7 +73,7 @@ suite('DataScience - JupyterConnection', () => { launchResult = { dispose: noop, out: observableOutput, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any proc: childProc as any }; getServerInfoStub = sinon.stub<[CancellationToken | undefined], JupyterServerInfo[] | undefined>(); @@ -93,7 +93,7 @@ suite('DataScience - JupyterConnection', () => { launchResult, notebookDir, EXTENSION_ROOT_DIR, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any getServerInfoStub as any, instance(serviceContainer), cancelToken diff --git a/src/test/datascience/jupyter/jupyterSession.unit.test.ts b/src/test/datascience/jupyter/jupyterSession.unit.test.ts index b7de8ecce9d..4eb906a630b 100644 --- a/src/test/datascience/jupyter/jupyterSession.unit.test.ts +++ b/src/test/datascience/jupyter/jupyterSession.unit.test.ts @@ -25,7 +25,7 @@ import { KernelConnectionMetadata, LiveKernelModel } from '../../../client/datas import { IJupyterConnection, IJupyterKernelSpec } from '../../../client/datascience/types'; import { MockOutputChannel } from '../../mockClasses'; -// tslint:disable: max-func-body-length no-any +/* eslint-disable , @typescript-eslint/no-explicit-any */ suite('DataScience - JupyterSession', () => { type ISession = Session.ISession & { /** @@ -78,7 +78,7 @@ suite('DataScience - JupyterSession', () => { when(kernel.status).thenReturn('idle'); when(connection.rootDirectory).thenReturn(''); const channel = new MockOutputChannel('JUPYTER'); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (instance(session) as any).then = undefined; sessionManager = mock(SessionManager); contentsManager = mock(ContentsManager); @@ -102,9 +102,9 @@ suite('DataScience - JupyterSession', () => { async function connect() { const nbFile = 'file path'; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any when(contentsManager.newUntitled(anything())).thenResolve({ path: nbFile } as any); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any when(contentsManager.rename(anything(), anything())).thenResolve({ path: nbFile } as any); when(contentsManager.delete(anything())).thenResolve(); when(sessionManager.startNew(anything())).thenResolve(instance(session)); @@ -220,7 +220,7 @@ suite('DataScience - JupyterSession', () => { }, shutdown: () => Promise.resolve(), isRemoteSession: false - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any, id: 'liveKernel' }; @@ -244,7 +244,7 @@ suite('DataScience - JupyterSession', () => { when(remoteSession.statusChanged).thenReturn(instance(signal)); verify(sessionManager.startNew(anything())).once(); when(sessionManager.connectTo(newActiveRemoteKernel.session)).thenReturn( - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any newActiveRemoteKernel.session as any ); @@ -296,7 +296,7 @@ suite('DataScience - JupyterSession', () => { when(newSession.statusChanged).thenReturn(instance(newStatusChangedSignal)); when(newSession.kernelChanged).thenReturn(instance(newKernelChangedSignal)); when(newSession.iopubMessage).thenReturn(instance(newIoPubSignal)); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (instance(newSession) as any).then = undefined; newSessionCreated = createDeferred(); when(session.isRemoteSession).thenReturn(false); @@ -339,9 +339,9 @@ suite('DataScience - JupyterSession', () => { const future = mock< Kernel.IFuture >(); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any when(future.done).thenReturn(Promise.resolve(undefined as any)); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any when(kernel.requestExecute(anything(), anything(), anything())).thenReturn(instance(future) as any); const result = jupyterSession.requestExecute({ code: '', allow_stdin: false, silent: false }); diff --git a/src/test/datascience/jupyter/kernels/installationPrompts.vscode.test.ts b/src/test/datascience/jupyter/kernels/installationPrompts.vscode.test.ts index a4bb043223f..d2aa57756ba 100644 --- a/src/test/datascience/jupyter/kernels/installationPrompts.vscode.test.ts +++ b/src/test/datascience/jupyter/kernels/installationPrompts.vscode.test.ts @@ -26,7 +26,7 @@ import { waitForKernelToGetAutoSelected } from '../../notebook/helper'; -// tslint:disable: no-invalid-this max-func-body-length no-function-expression no-any +/* eslint-disable no-invalid-this, , , @typescript-eslint/no-explicit-any */ suite('DataScience Install IPyKernel (slow) (install)', function () { const disposables: IDisposable[] = []; let nbFile: string; diff --git a/src/test/datascience/jupyter/kernels/kernelDependencyService.unit.test.ts b/src/test/datascience/jupyter/kernels/kernelDependencyService.unit.test.ts index 6002f48bcaa..c89f8b4a370 100644 --- a/src/test/datascience/jupyter/kernels/kernelDependencyService.unit.test.ts +++ b/src/test/datascience/jupyter/kernels/kernelDependencyService.unit.test.ts @@ -12,9 +12,9 @@ import { KernelDependencyService } from '../../../../client/datascience/jupyter/ import { KernelInterpreterDependencyResponse } from '../../../../client/datascience/types'; import { createPythonInterpreter } from '../../../utils/interpreters'; -// tslint:disable: no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ -// tslint:disable-next-line: max-func-body-length +// eslint-disable-next-line suite('DataScience - Kernel Dependency Service', () => { let dependencyService: KernelDependencyService; let appShell: IApplicationShell; diff --git a/src/test/datascience/jupyter/kernels/kernelSelections.unit.test.ts b/src/test/datascience/jupyter/kernels/kernelSelections.unit.test.ts index f7f6702c13a..c5516331952 100644 --- a/src/test/datascience/jupyter/kernels/kernelSelections.unit.test.ts +++ b/src/test/datascience/jupyter/kernels/kernelSelections.unit.test.ts @@ -21,7 +21,7 @@ import { IJupyterKernel, IJupyterKernelSpec, IJupyterSessionManager } from '../. import { IInterpreterQuickPickItem, IInterpreterSelector } from '../../../../client/interpreter/configuration/types'; import { IInterpreterService } from '../../../../client/interpreter/contracts'; -// tslint:disable-next-line: max-func-body-length +// eslint-disable-next-line suite('DataScience - KernelSelections', () => { let kernelSelectionProvider: KernelSelectionProvider; let kernelService: KernelService; @@ -165,7 +165,7 @@ suite('DataScience - KernelSelections', () => { return { id: `sessionId${index}`, name: 'someSession', - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any kernel: { id: `sessionId${index}`, ...(item as any) }, type: '', path: '' @@ -183,7 +183,7 @@ suite('DataScience - KernelSelections', () => { const expectedItems: IKernelSpecQuickPickItem[] = [ { label: python1KernelSpecModel.display_name, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any selection: { interpreter: undefined, kernelModel: { @@ -193,11 +193,11 @@ suite('DataScience - KernelSelections', () => { session: { id: 'sessionId0', name: 'someSession', - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any kernel: { id: 'sessionId0', ...(activeKernels[0] as any) }, type: '', path: '' - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any }, kind: 'connectToLiveKernel' @@ -210,7 +210,7 @@ suite('DataScience - KernelSelections', () => { }, { label: juliaKernelSpecModel.display_name, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any selection: { interpreter: undefined, kernelModel: { @@ -220,11 +220,11 @@ suite('DataScience - KernelSelections', () => { session: { id: 'sessionId1', name: 'someSession', - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any kernel: { id: 'sessionId1', ...(activeKernels[1] as any) }, type: '', path: '' - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any }, kind: 'connectToLiveKernel' diff --git a/src/test/datascience/jupyter/kernels/kernelSelector.unit.test.ts b/src/test/datascience/jupyter/kernels/kernelSelector.unit.test.ts index 488360d8011..5b231073052 100644 --- a/src/test/datascience/jupyter/kernels/kernelSelector.unit.test.ts +++ b/src/test/datascience/jupyter/kernels/kernelSelector.unit.test.ts @@ -35,7 +35,7 @@ import { IInterpreterService } from '../../../../client/interpreter/contracts'; import { PythonEnvironment } from '../../../../client/pythonEnvironments/info'; import { PreferredRemoteKernelIdProvider } from '../../../../client/datascience/notebookStorage/preferredRemoteKernelIdProvider'; -// tslint:disable: max-func-body-length no-unused-expression no-any +/* eslint-disable , @typescript-eslint/no-unused-expressions, @typescript-eslint/no-explicit-any */ suite('DataScience - KernelSelector', () => { let kernelSelectionProvider: KernelSelectionProvider; @@ -472,7 +472,7 @@ suite('DataScience - KernelSelector', () => { assert.deepEqual(kernel?.interpreter, interpreter); }); }); - // tslint:disable-next-line: max-func-body-length + // eslint-disable-next-line suite('Get a kernel for local sessions', () => { let nbMetadataKernelSpec: nbformat.IKernelspecMetadata = {} as any; let nbMetadata: nbformat.INotebookMetadata = {} as any; diff --git a/src/test/datascience/jupyter/kernels/kernelService.unit.test.ts b/src/test/datascience/jupyter/kernels/kernelService.unit.test.ts index 76df0a51dda..8f81c69b3b1 100644 --- a/src/test/datascience/jupyter/kernels/kernelService.unit.test.ts +++ b/src/test/datascience/jupyter/kernels/kernelService.unit.test.ts @@ -32,7 +32,7 @@ import { IInterpreterService } from '../../../../client/interpreter/contracts'; import { PythonEnvironment } from '../../../../client/pythonEnvironments/info'; import { FakeClock } from '../../../common'; -// tslint:disable-next-line: max-func-body-length +// eslint-disable-next-line suite('DataScience - KernelService', () => { let kernelService: KernelService; let interperterService: IInterpreterService; @@ -56,7 +56,7 @@ suite('DataScience - KernelService', () => { when(extensionChecker.isPythonExtensionInstalled).thenReturn(true); jupyterInterpreterExecutionService = mock(); when(execFactory.createActivatedEnvironment(anything())).thenResolve(instance(execService)); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (instance(execService) as any).then = undefined; kernelService = new KernelService( @@ -129,7 +129,7 @@ suite('DataScience - KernelService', () => { path: 'some Path', displayName: 'Hello World', envName: 'Hello' - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any; const matchingKernel = await kernelService.findMatchingKernelSpec(interpreter, instance(sessionManager)); @@ -151,7 +151,7 @@ suite('DataScience - KernelService', () => { path: 'some Path', displayName: 'Hello World', envName: 'Hello' - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any; const matchingKernel = await kernelService.findMatchingKernelSpec(interpreter, undefined); @@ -323,7 +323,7 @@ suite('DataScience - KernelService', () => { assert.equal(matchingKernel?.language, PYTHON_LANGUAGE); assert.deepEqual(matchingKernel?.metadata, kernelSpecs[1].metadata); }); - // tslint:disable-next-line: max-func-body-length + // eslint-disable-next-line suite('Registering Interpreters as Kernels', () => { let findMatchingKernelSpecStub: sinon.SinonStub< [PythonEnvironment, IJupyterSessionManager?, (CancellationToken | undefined)?], @@ -456,7 +456,7 @@ suite('DataScience - KernelService', () => { test('Fail if installed kernel is not an instance of JupyterKernelSpec', async () => { when(execService.execModule('ipykernel', anything(), anything())).thenResolve({ stdout: '' }); when(dependencyService.areDependenciesInstalled(interpreter, anything())).thenResolve(true); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any findMatchingKernelSpecStub.resolves({} as any); const promise = kernelService.registerKernel(interpreter); @@ -473,7 +473,7 @@ suite('DataScience - KernelService', () => { test('Fail if installed kernel spec does not have a specFile setup', async () => { when(execService.execModule('ipykernel', anything(), anything())).thenResolve({ stdout: '' }); when(dependencyService.areDependenciesInstalled(interpreter, anything())).thenResolve(true); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const kernel = new JupyterKernelSpec({} as any); findMatchingKernelSpecStub.resolves(kernel); @@ -501,12 +501,12 @@ suite('DataScience - KernelService', () => { const expectedKernelJsonContent: ReadWrite = cloneDeep(kernelSpecModel); // Fully qualified path must be injected into `argv`. expectedKernelJsonContent.argv = [interpreter.path, '-m', 'ipykernel']; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any expectedKernelJsonContent.metadata!.interpreter = interpreter as any; const installedKernel = await kernelService.registerKernel(interpreter); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any assert.deepEqual(kernel, installedKernel as any); verify(fs.writeLocalFile(kernelJsonFile, anything())).once(); // Verify the contents of JSON written to the file match as expected. @@ -526,14 +526,14 @@ suite('DataScience - KernelService', () => { const expectedKernelJsonContent: ReadWrite = cloneDeep(kernelSpecModel); // Fully qualified path must be injected into `argv`. expectedKernelJsonContent.argv = [interpreter.path, '-m', 'ipykernel']; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any expectedKernelJsonContent.metadata!.interpreter = interpreter as any; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any expectedKernelJsonContent.env = envVariables as any; const installedKernel = await kernelService.registerKernel(interpreter); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any assert.deepEqual(kernel, installedKernel as any); verify(fs.writeLocalFile(kernelJsonFile, anything())).once(); // Verify the contents of JSON written to the file match as expected. @@ -554,14 +554,14 @@ suite('DataScience - KernelService', () => { const expectedKernelJsonContent: ReadWrite = cloneDeep(kernelSpecModel); // Fully qualified path must be injected into `argv`. expectedKernelJsonContent.argv = [interpreter.path, '-m', 'ipykernel']; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any expectedKernelJsonContent.metadata!.interpreter = interpreter as any; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any expectedKernelJsonContent.env = envVariables as any; const installedKernel = await kernelService.searchAndRegisterKernel(interpreter, true); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any assert.deepEqual(kernel, installedKernel as any); verify(fs.writeLocalFile(kernelJsonFile, anything())).once(); // Verify the contents of JSON written to the file match as expected. @@ -586,7 +586,7 @@ suite('DataScience - KernelService', () => { const installedKernel = await kernelService.searchAndRegisterKernel(interpreter, true); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any assert.deepEqual(kernel, installedKernel as any); assert.ok(contents, 'Env not updated'); const obj = JSON.parse(contents!); diff --git a/src/test/datascience/jupyter/kernels/kernelSwitcher.unit.test.ts b/src/test/datascience/jupyter/kernels/kernelSwitcher.unit.test.ts index ab1f26aa8a8..c4f0ed87bb9 100644 --- a/src/test/datascience/jupyter/kernels/kernelSwitcher.unit.test.ts +++ b/src/test/datascience/jupyter/kernels/kernelSwitcher.unit.test.ts @@ -24,7 +24,7 @@ import { IJupyterConnection, IJupyterKernelSpec, INotebook } from '../../../../c import { PythonEnvironment } from '../../../../client/pythonEnvironments/info'; import { noop } from '../../../core'; -// tslint:disable: max-func-body-length no-any +/* eslint-disable , @typescript-eslint/no-explicit-any */ suite('DataScience - Kernel Switcher', () => { let kernelSwitcher: KernelSwitcher; let configService: IConfigurationService; @@ -43,7 +43,7 @@ suite('DataScience - Kernel Switcher', () => { lastActivityTime: new Date(), name: 'CurrentKernel', numberOfConnections: 0, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any session: {} as any }; selectedInterpreter = { @@ -63,7 +63,7 @@ suite('DataScience - Kernel Switcher', () => { const notebookProvider = mock(NotebookProvider); when(notebookProvider.type).thenReturn('jupyter'); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any when(notebook.connection).thenReturn(instance(connection)); when(configService.getSettings(anything())).thenReturn(instance(settings)); kernelSwitcher = new KernelSwitcher( @@ -78,7 +78,7 @@ suite('DataScience - Kernel Switcher', () => { }); [true, false].forEach((isLocalConnection) => { - // tslint:disable-next-line: max-func-body-length + // eslint-disable-next-line suite(isLocalConnection ? 'Local Connection' : 'Remote Connection', () => { setup(() => { const jupyterConnection: IJupyterConnection = { @@ -97,7 +97,7 @@ suite('DataScience - Kernel Switcher', () => { when(notebook.connection).thenReturn(jupyterConnection); }); teardown(function () { - // tslint:disable-next-line: no-invalid-this + // eslint-disable-next-line no-invalid-this if (this.runnable().state) { // We should have checked if it was a local connection. verify(notebook.connection).atLeast(1); @@ -124,7 +124,7 @@ suite('DataScience - Kernel Switcher', () => { const ex = new JupyterSessionStartError(new Error('Kaboom')); when(notebook.setKernelConnection(anything(), anything())).thenReject(ex); when(appShell.showErrorMessage(anything(), anything(), anything())).thenResolve( - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any Common.cancel() as any ); diff --git a/src/test/datascience/jupyter/serverSelector.unit.test.ts b/src/test/datascience/jupyter/serverSelector.unit.test.ts index 12da6a0861c..a736214675e 100644 --- a/src/test/datascience/jupyter/serverSelector.unit.test.ts +++ b/src/test/datascience/jupyter/serverSelector.unit.test.ts @@ -26,7 +26,7 @@ import { CryptoUtils } from '../../../client/common/crypto'; import { ApplicationEnvironment } from '../../../client/common/application/applicationEnvironment'; import { MockEncryptedStorage } from '../mockEncryptedStorage'; -// tslint:disable: max-func-body-length no-any +/* eslint-disable , @typescript-eslint/no-explicit-any */ suite('DataScience - Jupyter Server URI Selector', () => { let quickPick: MockQuickPick | undefined; let cmdManager: ICommandManager; @@ -41,7 +41,7 @@ suite('DataScience - Jupyter Server URI Selector', () => { ): { selector: JupyterServerSelector; storage: JupyterServerUriStorage } { dsSettings = { jupyterServerType: Settings.JupyterServerLocalLaunch - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any; clipboard = mock(ClipboardService); const configService = mock(ConfigurationService); @@ -59,7 +59,7 @@ suite('DataScience - Jupyter Server URI Selector', () => { when(applicationShell.createInputBox()).thenReturn(input); when(applicationEnv.machineId).thenReturn(os.hostname()); const multiStepFactory = new MultiStepInputFactory(instance(applicationShell)); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any when(configService.getSettings(anything())).thenReturn(dsSettings as any); when(configService.updateSetting(anything(), anything(), anything(), anything())).thenCall((_s, v) => { setting = v; diff --git a/src/test/datascience/jupyterPasswordConnect.unit.test.ts b/src/test/datascience/jupyterPasswordConnect.unit.test.ts index 1cc2c289a04..048eecfe8f3 100644 --- a/src/test/datascience/jupyterPasswordConnect.unit.test.ts +++ b/src/test/datascience/jupyterPasswordConnect.unit.test.ts @@ -15,7 +15,7 @@ import { JupyterPasswordConnect } from '../../client/datascience/jupyter/jupyter import { MockInputBox } from './mockInputBox'; import { MockQuickPick } from './mockQuickPick'; -// tslint:disable:no-any max-func-body-length no-http-string +/* eslint-disable @typescript-eslint/no-explicit-any, , */ suite('JupyterPasswordConnect', () => { let jupyterPasswordConnect: JupyterPasswordConnect; let appShell: ApplicationShell; @@ -43,7 +43,7 @@ suite('JupyterPasswordConnect', () => { function createMockSetup(secure: boolean, ok: boolean) { const dsSettings = { allowUnauthorizedRemoteConnection: secure - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any; when(configService.getSettings(anything())).thenReturn(dsSettings as any); when(configService.updateSetting('jupyterServerType', anything(), anything(), anything())).thenCall( @@ -148,7 +148,7 @@ suite('JupyterPasswordConnect', () => { ); assert(result, 'Failed to get password'); if (result) { - // tslint:disable-next-line: no-cookies + // eslint-disable-next-line assert.ok((result.requestHeaders as any).Cookie, 'No cookie'); } @@ -199,7 +199,7 @@ suite('JupyterPasswordConnect', () => { ); assert(result, 'Failed to get password'); if (result) { - // tslint:disable-next-line: no-cookies + // eslint-disable-next-line assert.ok((result.requestHeaders as any).Cookie, 'No cookie'); } @@ -229,7 +229,7 @@ suite('JupyterPasswordConnect', () => { function createJupyterHubSetup() { const dsSettings = { allowUnauthorizedRemoteConnection: false - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any; when(configService.getSettings(anything())).thenReturn(dsSettings as any); when(configService.updateSetting('jupyterServerType', anything(), anything(), anything())).thenCall( diff --git a/src/test/datascience/jupyterUriProviderRegistration.functional.test.ts b/src/test/datascience/jupyterUriProviderRegistration.functional.test.ts index 39c1727dc6c..b83f26ac16e 100644 --- a/src/test/datascience/jupyterUriProviderRegistration.functional.test.ts +++ b/src/test/datascience/jupyterUriProviderRegistration.functional.test.ts @@ -31,7 +31,7 @@ class TestUriProvider implements IJupyterUriProvider { if (handle === TestUriHandle) { this.currentBearer += 1; return { - // tslint:disable-next-line: no-http-string + // eslint-disable-next-line baseUrl: 'http://foobar:3000', displayName: 'test', token: '', @@ -44,7 +44,7 @@ class TestUriProvider implements IJupyterUriProvider { } } -// tslint:disable: no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ class TestUriProviderExtension implements Extension { public id: string = '1'; public extensionUri: Uri = Uri.parse('foo'); @@ -82,7 +82,7 @@ class UriMockExtensions implements IExtensions { } } -// tslint:disable:max-func-body-length trailing-comma no-any no-multiline-string +/* eslint-disable , comma-dangle, @typescript-eslint/no-explicit-any, no-multi-str */ suite(`DataScience JupyterServerUriProvider tests`, () => { let ioc: DataScienceIocContainer; @@ -102,7 +102,7 @@ suite(`DataScience JupyterServerUriProvider tests`, () => { test('Expiration', async function () { // Only run with mock so we don't try to really start a remote server if (!ioc.mockJupyter) { - // tslint:disable-next-line: no-invalid-this + // eslint-disable-next-line no-invalid-this return this.skip(); } @@ -119,7 +119,7 @@ suite(`DataScience JupyterServerUriProvider tests`, () => { }); // Verify URI is our expected one - // tslint:disable-next-line: no-http-string + // eslint-disable-next-line assert.equal(server?.getConnectionInfo()?.baseUrl, `http://foobar:3000`, 'Base URI is invalid'); let authHeader = server?.getConnectionInfo()?.getAuthHeader?.call(undefined); assert.deepEqual(authHeader, { Bearer: '1' }, 'Bearer token invalid'); diff --git a/src/test/datascience/jupyterUriProviderRegistration.unit.test.ts b/src/test/datascience/jupyterUriProviderRegistration.unit.test.ts index 9415468cbb1..c9680daf816 100644 --- a/src/test/datascience/jupyterUriProviderRegistration.unit.test.ts +++ b/src/test/datascience/jupyterUriProviderRegistration.unit.test.ts @@ -33,7 +33,7 @@ class MockProvider implements IJupyterUriProvider { if (handle === '1') { const currentDate = new Date(); return { - // tslint:disable-next-line: no-http-string + // eslint-disable-next-line baseUrl: 'http://foobar:3000', token: '', displayName: 'dummy', @@ -52,7 +52,7 @@ class MockProvider implements IJupyterUriProvider { } } -// tslint:disable: max-func-body-length no-any +/* eslint-disable , @typescript-eslint/no-explicit-any */ suite('DataScience URI Picker', () => { function createRegistration(providerIds: string[]) { let registration: JupyterUriProviderRegistration | undefined; @@ -90,7 +90,7 @@ suite('DataScience URI Picker', () => { const handle = await pickers[0].handleQuickPick(quickPick[0], false); assert.ok(handle, 'Handle not set'); const uri = await registration.getJupyterServerUri('1', handle!); - // tslint:disable-next-line: no-http-string + // eslint-disable-next-line assert.equal(uri.baseUrl, 'http://foobar:3000', 'Base URL not found'); assert.equal(uri.displayName, 'dummy', 'Display name not found'); }); @@ -111,7 +111,7 @@ suite('DataScience URI Picker', () => { assert.equal(quickPick.length, 1, 'No quick pick items added'); try { await registration.getJupyterServerUri('1', 'foobar'); - // tslint:disable-next-line: no-http-string + // eslint-disable-next-line assert.fail('Should not get here'); } catch { // This means test passed. @@ -120,23 +120,23 @@ suite('DataScience URI Picker', () => { test('No picker call', async () => { const registration = createRegistration(['1']); const uri = await registration.getJupyterServerUri('1', '1'); - // tslint:disable-next-line: no-http-string + // eslint-disable-next-line assert.equal(uri.baseUrl, 'http://foobar:3000', 'Base URL not found'); }); test('Two pickers', async () => { const registration = createRegistration(['1', '2']); let uri = await registration.getJupyterServerUri('1', '1'); - // tslint:disable-next-line: no-http-string + // eslint-disable-next-line assert.equal(uri.baseUrl, 'http://foobar:3000', 'Base URL not found'); uri = await registration.getJupyterServerUri('2', '1'); - // tslint:disable-next-line: no-http-string + // eslint-disable-next-line assert.equal(uri.baseUrl, 'http://foobar:3000', 'Base URL not found'); }); test('Two pickers with same id', async () => { const registration = createRegistration(['1', '1']); try { await registration.getJupyterServerUri('1', '1'); - // tslint:disable-next-line: no-http-string + // eslint-disable-next-line assert.fail('Should have failed if calling with same picker'); } catch { // This means it passed diff --git a/src/test/datascience/jupyterUtils.unit.test.ts b/src/test/datascience/jupyterUtils.unit.test.ts index 0761802db7b..f2cce360ea8 100644 --- a/src/test/datascience/jupyterUtils.unit.test.ts +++ b/src/test/datascience/jupyterUtils.unit.test.ts @@ -37,9 +37,9 @@ suite('DataScience JupyterUtils', () => { [] ); - // tslint:disable: no-invalid-template-strings + /* eslint-disable no-template-curly-in-string */ test('expanding file variables', async function () { - // tslint:disable-next-line: no-invalid-this + // eslint-disable-next-line no-invalid-this this.timeout(10000); const uri = Uri.file('test/bar'); const folder = { index: 0, name: '', uri }; @@ -85,7 +85,7 @@ suite('DataScience JupyterUtils', () => { metadata: {} }; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any return (hashProvider.preHandleIOPub(dummyMessage).content as any).transient; } diff --git a/src/test/datascience/kernel-launcher/kernelDaemonPool.unit.test.ts b/src/test/datascience/kernel-launcher/kernelDaemonPool.unit.test.ts index 46acd35e153..7e02b2394ac 100644 --- a/src/test/datascience/kernel-launcher/kernelDaemonPool.unit.test.ts +++ b/src/test/datascience/kernel-launcher/kernelDaemonPool.unit.test.ts @@ -17,7 +17,7 @@ import { PythonEnvironment } from '../../../client/pythonEnvironments/info'; import { sleep } from '../../core'; import { createPythonInterpreter } from '../../utils/interpreters'; -// tslint:disable: max-func-body-length no-any +/* eslint-disable , @typescript-eslint/no-explicit-any */ suite('DataScience - Kernel Daemon Pool', () => { const interpreter1 = createPythonInterpreter({ path: 'interpreter1' }); const interpreter2 = createPythonInterpreter({ path: 'interpreter2' }); diff --git a/src/test/datascience/kernel-launcher/kernelDaemonPoolPreWarmer.unit.test.ts b/src/test/datascience/kernel-launcher/kernelDaemonPoolPreWarmer.unit.test.ts index bdc4ab274c6..3095a5172ec 100644 --- a/src/test/datascience/kernel-launcher/kernelDaemonPoolPreWarmer.unit.test.ts +++ b/src/test/datascience/kernel-launcher/kernelDaemonPoolPreWarmer.unit.test.ts @@ -15,7 +15,7 @@ import { IRawNotebookSupportedService } from '../../../client/datascience/types'; -// tslint:disable: max-func-body-length no-any +/* eslint-disable , @typescript-eslint/no-explicit-any */ suite('DataScience - Kernel Daemon Pool PreWarmer', () => { let prewarmer: KernelDaemonPreWarmer; let notebookEditorProvider: INotebookEditorProvider; @@ -43,7 +43,7 @@ suite('DataScience - Kernel Daemon Pool PreWarmer', () => { // Set up our config settings settings = mock(JupyterSettings); when(configService.getSettings()).thenReturn(instance(settings)); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any prewarmer = new KernelDaemonPreWarmer( instance(notebookEditorProvider), diff --git a/src/test/datascience/kernel-launcher/kernelFinder.vscode.test.ts b/src/test/datascience/kernel-launcher/kernelFinder.vscode.test.ts index ecc31d58933..4554a02d47a 100644 --- a/src/test/datascience/kernel-launcher/kernelFinder.vscode.test.ts +++ b/src/test/datascience/kernel-launcher/kernelFinder.vscode.test.ts @@ -10,7 +10,7 @@ import { IKernelFinder } from '../../../client/datascience/kernel-launcher/types import { IExtensionTestApi } from '../../common'; import { initialize } from '../../initialize'; -// tslint:disable: no-any no-invalid-this +/* eslint-disable @typescript-eslint/no-explicit-any, no-invalid-this */ suite('DataScience - Kernels Finder', () => { let api: IExtensionTestApi; let kernelFinder: IKernelFinder; diff --git a/src/test/datascience/kernel-launcher/kernelLauncherDaemon.unit.test.ts b/src/test/datascience/kernel-launcher/kernelLauncherDaemon.unit.test.ts index 5afd785af4f..addbe4ead6c 100644 --- a/src/test/datascience/kernel-launcher/kernelLauncherDaemon.unit.test.ts +++ b/src/test/datascience/kernel-launcher/kernelLauncherDaemon.unit.test.ts @@ -13,7 +13,7 @@ import { IJupyterKernelSpec } from '../../../client/datascience/types'; import { PythonEnvironment } from '../../../client/pythonEnvironments/info'; import { createPythonInterpreter } from '../../utils/interpreters'; -// tslint:disable: max-func-body-length no-any +/* eslint-disable , @typescript-eslint/no-explicit-any */ suite('DataScience - Kernel Launcher Daemon', () => { let launcher: PythonKernelLauncherDaemon; let daemonPool: KernelDaemonPool; diff --git a/src/test/datascience/kernelLauncher.functional.test.ts b/src/test/datascience/kernelLauncher.functional.test.ts index 83e78d783df..b26349fa47a 100644 --- a/src/test/datascience/kernelLauncher.functional.test.ts +++ b/src/test/datascience/kernelLauncher.functional.test.ts @@ -34,7 +34,7 @@ suite('DataScience - Kernel Launcher', () => { let pythonInterpreter: PythonEnvironment | undefined; let kernelSpec: IJupyterKernelSpec; let kernelFinder: MockKernelFinder; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any let snapshot: any; suiteSetup(() => { @@ -76,7 +76,7 @@ suite('DataScience - Kernel Launcher', () => { test('Launch from kernelspec', async function () { if (!process.env.VSC_FORCE_REAL_JUPYTER) { - // tslint:disable-next-line: no-invalid-this + // eslint-disable-next-line no-invalid-this this.skip(); } else { let exitExpected = false; @@ -112,7 +112,7 @@ suite('DataScience - Kernel Launcher', () => { test('Launch with environment', async function () { if (!process.env.VSC_FORCE_REAL_JUPYTER || !pythonInterpreter) { - // tslint:disable-next-line: no-invalid-this + // eslint-disable-next-line no-invalid-this this.skip(); } else { const spec: IJupyterKernelSpec = { @@ -158,7 +158,7 @@ suite('DataScience - Kernel Launcher', () => { test('Bind with ZMQ', async function () { if (!process.env.VSC_FORCE_REAL_JUPYTER) { - // tslint:disable-next-line: no-invalid-this + // eslint-disable-next-line no-invalid-this this.skip(); } else { const kernel = await kernelLauncher.launch( diff --git a/src/test/datascience/liveshare.functional.test.tsx b/src/test/datascience/liveshare.functional.test.tsx index 7699e982a8f..a5a23e4f52f 100644 --- a/src/test/datascience/liveshare.functional.test.tsx +++ b/src/test/datascience/liveshare.functional.test.tsx @@ -32,9 +32,9 @@ import { MockFileSystem } from './mockFileSystem'; import { addMockData, CellPosition, mountConnectedMainPanel, verifyHtmlOnCell } from './testHelpers'; import { TestInteractiveWindowProvider } from './testInteractiveWindowProvider'; //import { asyncDump } from '../common/asyncDump'; -//tslint:disable:trailing-comma no-any no-multiline-string +/* eslint-disable comma-dangle, @typescript-eslint/no-explicit-any, no-multi-str */ -// tslint:disable-next-line:max-func-body-length no-any +// eslint-disable-next-line , @typescript-eslint/no-explicit-any suite('DataScience LiveShare tests', () => { const disposables: Disposable[] = []; let hostContainer: DataScienceIocContainer; @@ -52,7 +52,7 @@ suite('DataScience LiveShare tests', () => { if (!disposable) { continue; } - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const promise = disposable.dispose() as Promise; if (promise) { await promise; @@ -216,7 +216,7 @@ suite('DataScience LiveShare tests', () => { }); test('Host & Guest Simple', async function () { - // tslint:disable-next-line: no-invalid-this + // eslint-disable-next-line no-invalid-this return this.skip(); // Should only need mock data in host addMockData(hostContainer!, 'a=1\na', 1); @@ -242,7 +242,7 @@ suite('DataScience LiveShare tests', () => { }); test('Host starts LiveShare after starting Jupyter', async function () { - // tslint:disable-next-line: no-invalid-this + // eslint-disable-next-line no-invalid-this return this.skip(); addMockData(hostContainer!, 'a=1\na', 1); addMockData(hostContainer!, 'b=2\nb', 2); @@ -286,7 +286,7 @@ suite('DataScience LiveShare tests', () => { }); test('Host startup and guest restart', async function () { - // tslint:disable-next-line: no-invalid-this + // eslint-disable-next-line no-invalid-this return this.skip(); // Should only need mock data in host addMockData(hostContainer!, 'a=1\na', 1); diff --git a/src/test/datascience/mainState.unit.test.ts b/src/test/datascience/mainState.unit.test.ts index 74accae79f9..f75b0cd2a03 100644 --- a/src/test/datascience/mainState.unit.test.ts +++ b/src/test/datascience/mainState.unit.test.ts @@ -12,7 +12,7 @@ import { } from '../../datascience-ui/interactive-common/mainState'; import { defaultDataScienceSettings } from './helpers'; -// tslint:disable: max-func-body-length no-any +/* eslint-disable , @typescript-eslint/no-explicit-any */ suite('DataScience MainState', () => { function cloneVM(cvm: ICellViewModel, newCode: string, debugging?: boolean): ICellViewModel { const result = { @@ -29,7 +29,7 @@ suite('DataScience MainState', () => { }; // Typecast so that the build works. ICell.MetaData doesn't like reassigning - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any return (result as any) as ICellViewModel; } diff --git a/src/test/datascience/markdownManipulation.unit.test.ts b/src/test/datascience/markdownManipulation.unit.test.ts index 385165d5561..f2af18e426b 100644 --- a/src/test/datascience/markdownManipulation.unit.test.ts +++ b/src/test/datascience/markdownManipulation.unit.test.ts @@ -4,7 +4,7 @@ import { expect } from 'chai'; import { fixMarkdown } from '../../datascience-ui/interactive-common/markdownManipulation'; -// tslint:disable: max-func-body-length +/* eslint-disable */ suite('DataScience - Markdown Manipulation', () => { const markdown1 = `\\begin{align} \\nabla \\cdot \\vec{\\mathbf{E}} & = 4 \\pi \\rho \\\\ diff --git a/src/test/datascience/mockCode2ProtocolConverter.ts b/src/test/datascience/mockCode2ProtocolConverter.ts index cff4a5f647d..e4414a2aec1 100644 --- a/src/test/datascience/mockCode2ProtocolConverter.ts +++ b/src/test/datascience/mockCode2ProtocolConverter.ts @@ -5,7 +5,7 @@ import * as code from 'vscode'; import { Code2ProtocolConverter } from 'vscode-languageclient/node'; import * as proto from 'vscode-languageserver-protocol'; -// tslint:disable:no-any unified-signatures +/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/unified-signatures */ export class MockCode2ProtocolConverter implements Code2ProtocolConverter { public asTextDocumentIdentifier(textDocument: code.TextDocument): proto.TextDocumentIdentifier { return { uri: textDocument.uri.toString() }; diff --git a/src/test/datascience/mockCommandManager.ts b/src/test/datascience/mockCommandManager.ts index 91cd18311c8..ca10849c6ff 100644 --- a/src/test/datascience/mockCommandManager.ts +++ b/src/test/datascience/mockCommandManager.ts @@ -7,7 +7,7 @@ import { Disposable, TextEditor, TextEditorEdit } from 'vscode'; import { ICommandNameArgumentTypeMapping } from '../../client/common/application/commands'; import { ICommandManager } from '../../client/common/application/types'; -// tslint:disable:no-any no-http-string no-multiline-string max-func-body-length +/* eslint-disable @typescript-eslint/no-explicit-any, , no-multi-str, */ export class MockCommandManager implements ICommandManager { private commands: Map any> = new Map any>(); diff --git a/src/test/datascience/mockCustomEditorService.ts b/src/test/datascience/mockCustomEditorService.ts index fa59c744d1b..0ea8b8b1a51 100644 --- a/src/test/datascience/mockCustomEditorService.ts +++ b/src/test/datascience/mockCustomEditorService.ts @@ -64,9 +64,9 @@ export class MockCustomEditorService implements ICustomEditorService { this.provider = provider; // Sign up for close so we can clear our resolved map - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any ((this.provider as any) as INotebookEditorProvider).onDidCloseNotebookEditor(this.closedEditor.bind(this)); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any ((this.provider as any) as INotebookEditorProvider).onDidOpenNotebookEditor(this.openedEditor.bind(this)); return { dispose: noop }; @@ -82,7 +82,7 @@ export class MockCustomEditorService implements ICustomEditorService { // Pass undefined as the webview panel. This will make the editor create a new one resolved = this.provider.resolveCustomEditor( this.createDocument(file), - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any (undefined as any) as WebviewPanel, CancellationToken.None ); diff --git a/src/test/datascience/mockDocumentManager.ts b/src/test/datascience/mockDocumentManager.ts index 20e711c1d9d..8f43de284ab 100644 --- a/src/test/datascience/mockDocumentManager.ts +++ b/src/test/datascience/mockDocumentManager.ts @@ -25,7 +25,7 @@ import { EXTENSION_ROOT_DIR } from '../../client/constants'; import { MockDocument } from './mockDocument'; import { MockEditor } from './mockTextEditor'; -// tslint:disable:no-any no-http-string no-multiline-string max-func-body-length +/* eslint-disable @typescript-eslint/no-explicit-any, , no-multi-str, */ export class MockDocumentManager implements IDocumentManager { public textDocuments: TextDocument[] = []; diff --git a/src/test/datascience/mockExtensions.ts b/src/test/datascience/mockExtensions.ts index 9b25c811fd7..703a08ae50b 100644 --- a/src/test/datascience/mockExtensions.ts +++ b/src/test/datascience/mockExtensions.ts @@ -6,7 +6,7 @@ import { Event, Extension, extensions } from 'vscode'; import { IExtensions } from '../../client/common/types'; -// tslint:disable:no-any unified-signatures +/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/unified-signatures */ @injectable() export class MockExtensions implements IExtensions { diff --git a/src/test/datascience/mockJupyterManager.ts b/src/test/datascience/mockJupyterManager.ts index 5b600947850..0c881bf6aca 100644 --- a/src/test/datascience/mockJupyterManager.ts +++ b/src/test/datascience/mockJupyterManager.ts @@ -48,7 +48,7 @@ import { MockJupyterSession } from './mockJupyterSession'; import { MockProcessService } from './mockProcessService'; import { MockPythonService } from './mockPythonService'; -// tslint:disable:no-any no-http-string no-multiline-string max-func-body-length +/* eslint-disable @typescript-eslint/no-explicit-any, , no-multi-str, */ const MockJupyterTimeDelay = 10; const LineFeedRegEx = /(\r\n|\n)/g; @@ -145,7 +145,7 @@ export class MockJupyterManager implements IJupyterSessionManager { serviceManager.addSingletonInstance(IInstaller, instance(this.productInstaller)); // Setup our default kernel spec (this is just a dummy value) - // tslint:disable-next-line:no-octal-literal + // eslint-disable-next-line no-octal, no-octal-escape this.kernelSpecs.push({ name: '0e8519db-0895-416c-96df-fa80131ecea0', dir: 'C:\\Users\\rchiodo\\AppData\\Roaming\\jupyter\\kernels\\0e8519db-0895-416c-96df-fa80131ecea0' diff --git a/src/test/datascience/mockJupyterManagerFactory.ts b/src/test/datascience/mockJupyterManagerFactory.ts index fec36809d20..0474a1c2004 100644 --- a/src/test/datascience/mockJupyterManagerFactory.ts +++ b/src/test/datascience/mockJupyterManagerFactory.ts @@ -9,7 +9,7 @@ import { import { IServiceManager } from '../../client/ioc/types'; import { MockJupyterManager } from './mockJupyterManager'; -// tslint:disable:no-any no-http-string no-multiline-string max-func-body-length +/* eslint-disable @typescript-eslint/no-explicit-any, , no-multi-str, */ // This class is used to mock talking to jupyter. It mocks // the process services, the interpreter services, the python services, and the jupyter session diff --git a/src/test/datascience/mockJupyterNotebook.ts b/src/test/datascience/mockJupyterNotebook.ts index 4731807e072..4994bd3e53a 100644 --- a/src/test/datascience/mockJupyterNotebook.ts +++ b/src/test/datascience/mockJupyterNotebook.ts @@ -23,7 +23,7 @@ import { PythonEnvironment } from '../../client/pythonEnvironments/info'; import { ServerStatus } from '../../datascience-ui/interactive-common/mainState'; import { noop } from '../core'; -// tslint:disable: no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ export class MockJupyterNotebook implements INotebook { public get connection(): INotebookProviderConnection | undefined { @@ -177,16 +177,16 @@ export class MockJupyterNotebook implements INotebook { public sendCommMessage( buffers: (ArrayBuffer | ArrayBufferView)[], content: { comm_id: string; data: JSONObject; target_name: string | undefined }, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any metadata: any, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any msgId: any ): Kernel.IShellFuture< KernelMessage.IShellMessage<'comm_msg'>, KernelMessage.IShellMessage > { const shellMessage = KernelMessage.createMessage>({ - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any msgType: 'comm_msg', channel: 'shell', buffers, @@ -219,7 +219,7 @@ export class MockJupyterNotebook implements INotebook { channel: 'shell', content: { status: 'ok' - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any, metadata: {}, session: '1', diff --git a/src/test/datascience/mockJupyterRequest.ts b/src/test/datascience/mockJupyterRequest.ts index 392a6fa6799..39bb9640098 100644 --- a/src/test/datascience/mockJupyterRequest.ts +++ b/src/test/datascience/mockJupyterRequest.ts @@ -10,7 +10,7 @@ import { noop } from '../../client/common/utils/misc'; import { ICell } from '../../client/datascience/types'; import { concatMultilineString } from '../../datascience-ui/common'; -//tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ interface IMessageResult { message: KernelMessage.IIOPubMessage | KernelMessage.IInputRequestMsg | KernelMessage.IMessage; haveMore: boolean; @@ -202,7 +202,7 @@ class OutputMessageProducer extends SimpleMessageProducer { } } -// tslint:disable:no-any no-http-string no-multiline-string max-func-body-length +/* eslint-disable @typescript-eslint/no-explicit-any, , no-multi-str, */ export class MockJupyterRequest implements Kernel.IFuture { public msg: KernelMessage.IShellMessage; public onReply: (msg: KernelMessage.IShellMessage) => void | PromiseLike; diff --git a/src/test/datascience/mockJupyterSession.ts b/src/test/datascience/mockJupyterSession.ts index d39fca783d4..e64b9baf9b3 100644 --- a/src/test/datascience/mockJupyterSession.ts +++ b/src/test/datascience/mockJupyterSession.ts @@ -18,7 +18,7 @@ import { MockJupyterRequest } from './mockJupyterRequest'; const LineFeedRegEx = /(\r\n|\n)/g; -// tslint:disable:no-any no-http-string no-multiline-string max-func-body-length +/* eslint-disable @typescript-eslint/no-explicit-any, , no-multi-str, */ export class MockJupyterSession implements IJupyterSession { public readonly workingDirectory = ''; public readonly kernelSocket = new Observable(); @@ -228,16 +228,16 @@ export class MockJupyterSession implements IJupyterSession { public sendCommMessage( buffers: (ArrayBuffer | ArrayBufferView)[], content: { comm_id: string; data: JSONObject; target_name: string | undefined }, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any metadata: any, - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any msgId: any ): Kernel.IShellFuture< KernelMessage.IShellMessage<'comm_msg'>, KernelMessage.IShellMessage > { const shellMessage = KernelMessage.createMessage>({ - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any msgType: 'comm_msg', channel: 'shell', buffers, @@ -270,7 +270,7 @@ export class MockJupyterSession implements IJupyterSession { channel: 'shell', content: { status: 'ok' - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any, metadata: {}, session: '1', @@ -304,9 +304,9 @@ export class MockJupyterSession implements IJupyterSession { if (this.dict.hasOwnProperty(withoutLines)) { return this.dict[withoutLines] as ICell; } - // tslint:disable-next-line:no-console + // eslint-disable-next-line no-console console.log(`Cell '${code}' not found in mock`); - // tslint:disable-next-line:no-console + // eslint-disable-next-line no-console console.log(`Dict has these keys ${Object.keys(this.dict).join('","')}`); throw new Error(`Cell '${code}' not found in mock`); }; diff --git a/src/test/datascience/mockJupyterSettings.ts b/src/test/datascience/mockJupyterSettings.ts index 6767c8792d6..f3b04e40589 100644 --- a/src/test/datascience/mockJupyterSettings.ts +++ b/src/test/datascience/mockJupyterSettings.ts @@ -1,12 +1,7 @@ -import { IWorkspaceService } from '../../client/common/application/types'; import { JupyterSettings } from '../../client/common/configSettings'; -import { IJupyterSettings, Resource } from '../../client/common/types'; +import { IJupyterSettings } from '../../client/common/types'; export class MockJupyterSettings extends JupyterSettings { - constructor(workspaceFolder: Resource, workspace?: IWorkspaceService) { - super(workspaceFolder, workspace); - } - public fireChangeEvent() { this.fireChangeNotification(); } diff --git a/src/test/datascience/mockLanguageServer.ts b/src/test/datascience/mockLanguageServer.ts index 80597077504..094efb4f042 100644 --- a/src/test/datascience/mockLanguageServer.ts +++ b/src/test/datascience/mockLanguageServer.ts @@ -28,7 +28,7 @@ import { ILanguageServer } from '../../client/api/types'; import { createDeferred, Deferred, sleep } from '../../client/common/utils/async'; import { noop } from '../../client/common/utils/misc'; -// tslint:disable:no-any unified-signatures +/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/unified-signatures */ export class MockLanguageServer implements ILanguageServer { private notificationPromise: Deferred | undefined; private contents = ''; diff --git a/src/test/datascience/mockLanguageServerProvider.ts b/src/test/datascience/mockLanguageServerProvider.ts index f1e13037825..5802432a814 100644 --- a/src/test/datascience/mockLanguageServerProvider.ts +++ b/src/test/datascience/mockLanguageServerProvider.ts @@ -6,7 +6,7 @@ import { ILanguageServer, ILanguageServerProvider } from '../../client/api/types import { InterpreterUri } from '../../client/common/installer/types'; import { MockLanguageServer } from './mockLanguageServer'; -// tslint:disable:no-any unified-signatures +/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/unified-signatures */ @injectable() export class MockLanguageServerProvider implements ILanguageServerProvider { private mockLanguageServer = new MockLanguageServer(); diff --git a/src/test/datascience/mockLiveShare.ts b/src/test/datascience/mockLiveShare.ts index dca5a2239e1..c9a0b946fa2 100644 --- a/src/test/datascience/mockLiveShare.ts +++ b/src/test/datascience/mockLiveShare.ts @@ -20,7 +20,7 @@ import { noop } from '../../client/common/utils/misc'; import { LiveShare } from '../../client/datascience/constants'; import { LiveShareProxy } from '../../client/datascience/liveshare/liveshareProxy'; -// tslint:disable:no-any unified-signatures max-classes-per-file +/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/unified-signatures, max-classes-per-file */ class MockLiveService implements vsls.SharedService, vsls.SharedServiceProxy { public isServiceAvailable: boolean = true; diff --git a/src/test/datascience/mockProtocol2CodeConverter.ts b/src/test/datascience/mockProtocol2CodeConverter.ts index d6dab6b6645..21f39832e54 100644 --- a/src/test/datascience/mockProtocol2CodeConverter.ts +++ b/src/test/datascience/mockProtocol2CodeConverter.ts @@ -2,12 +2,12 @@ // Licensed under the MIT License. 'use strict'; import * as code from 'vscode'; -// tslint:disable-next-line: import-name +// eslint-disable-next-line import ProtocolCompletionItem from 'vscode-languageclient/lib/common/protocolCompletionItem'; import { Protocol2CodeConverter } from 'vscode-languageclient/node'; import * as proto from 'vscode-languageserver-protocol'; -// tslint:disable:no-any unified-signatures +/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/unified-signatures */ export class MockProtocol2CodeConverter implements Protocol2CodeConverter { public asUri(_value: string): code.Uri { throw new Error('Method not implemented.'); diff --git a/src/test/datascience/mockWorkspaceConfig.ts b/src/test/datascience/mockWorkspaceConfig.ts index b449b864df6..4bb088962e2 100644 --- a/src/test/datascience/mockWorkspaceConfig.ts +++ b/src/test/datascience/mockWorkspaceConfig.ts @@ -6,7 +6,7 @@ import { ConfigurationTarget, WorkspaceConfiguration } from 'vscode'; export class MockWorkspaceConfiguration implements WorkspaceConfiguration { - // tslint:disable: no-any + /* eslint-disable @typescript-eslint/no-explicit-any */ private values = new Map(); constructor(defaultSettings?: any) { @@ -22,7 +22,7 @@ export class MockWorkspaceConfiguration implements WorkspaceConfiguration { } public get(key: string, defaultValue?: T): T | undefined { - // tslint:disable-next-line: use-named-parameter + // eslint-disable-next-line if (this.values.has(key)) { return this.values.get(key); } diff --git a/src/test/datascience/mockWorkspaceConfiguration.ts b/src/test/datascience/mockWorkspaceConfiguration.ts index 2237c9c2b02..f7e7effe976 100644 --- a/src/test/datascience/mockWorkspaceConfiguration.ts +++ b/src/test/datascience/mockWorkspaceConfiguration.ts @@ -2,11 +2,11 @@ // Licensed under the MIT License. import { ConfigurationTarget, WorkspaceConfiguration } from 'vscode'; -// tslint:disable: no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ export class MockWorkspaceConfiguration implements WorkspaceConfiguration { private map: Map = new Map(); - // tslint:disable: no-any + /* eslint-disable @typescript-eslint/no-explicit-any */ public get(key: string): any; public get(section: string): T | undefined; public get(section: string, defaultValue: T): T; diff --git a/src/test/datascience/mountedWebView.ts b/src/test/datascience/mountedWebView.ts index 009b4f57901..3216fdb1c0e 100644 --- a/src/test/datascience/mountedWebView.ts +++ b/src/test/datascience/mountedWebView.ts @@ -31,11 +31,11 @@ export type WaitForMessageOptions = { // Optional check for the payload of the message // will only return (or count) message if this returns true - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any withPayload?(payload: any): boolean; }; -// tslint:disable: no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ export interface IMountedWebView extends IWebviewPanel, IDisposable { readonly id: string; readonly wrapper: ReactWrapper, React.Component>; @@ -64,19 +64,19 @@ export class MountedWebView implements IMountedWebView, IDisposable { // Setup the acquireVsCodeApi. The react control will cache this value when it's mounted. const globalAcquireVsCodeApi = (): IVsCodeApi => { return { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any postMessage: (msg: any) => { this.postMessageToWebPanel(msg); }, - // tslint:disable-next-line:no-any no-empty + // eslint-disable-next-line @typescript-eslint/no-explicit-any, no-empty,@typescript-eslint/no-empty-function setState: (_msg: any) => {}, - // tslint:disable-next-line:no-any no-empty + // eslint-disable-next-line @typescript-eslint/no-explicit-any, no-empty,@typescript-eslint/no-empty-function getState: () => { return {}; } }; }; - // tslint:disable-next-line:no-string-literal + // eslint-disable-next-line @typescript-eslint/dot-notation (global as any)['acquireVsCodeApi'] = globalAcquireVsCodeApi; // Remap event handlers to point to the container. @@ -106,7 +106,7 @@ export class MountedWebView implements IMountedWebView, IDisposable { // During testing the MainPanel sends the init message before our interactive window is created. // Pretend like it's happening now (well after this function returns) - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any setTimeout(() => { this.webPanelListener!.onMessage(InteractiveWindowMessages.Started, {}); }, 0); @@ -197,7 +197,7 @@ export class MountedWebView implements IMountedWebView, IDisposable { public postMessage(m: WebviewMessage): void { // Actually send to the UI if (this.reactMessageCallback) { - // tslint:disable-next-line: no-require-imports + // eslint-disable-next-line @typescript-eslint/no-require-imports const reactHelpers = require('./reactHelpers') as typeof import('./reactHelpers'); const message = reactHelpers.createMessageEvent(m); this.reactMessageCallback(message); diff --git a/src/test/datascience/mountedWebViewFactory.ts b/src/test/datascience/mountedWebViewFactory.ts index 107a2c7d404..8fbe3cbe5cb 100644 --- a/src/test/datascience/mountedWebViewFactory.ts +++ b/src/test/datascience/mountedWebViewFactory.ts @@ -7,7 +7,7 @@ export const IMountedWebViewFactory = Symbol('IMountedWebViewFactory'); export interface IMountedWebViewFactory { get(id: string): IMountedWebView; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any create(id: string, mount: () => ReactWrapper, React.Component>): IMountedWebView; } @@ -31,7 +31,7 @@ export class MountedWebViewFactory implements IMountedWebViewFactory, IDisposabl return obj; } - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public create(id: string, mount: () => ReactWrapper, React.Component>): IMountedWebView { if (this.map.has(id)) { throw new Error(`Mounted web view already exists for id ${id}`); diff --git a/src/test/datascience/nativeEditor.functional.test.tsx b/src/test/datascience/nativeEditor.functional.test.tsx index 881f2f935db..7e63d88c3d2 100644 --- a/src/test/datascience/nativeEditor.functional.test.tsx +++ b/src/test/datascience/nativeEditor.functional.test.tsx @@ -89,7 +89,7 @@ import { ITestNativeEditorProvider } from './testNativeEditorProvider'; use(chaiAsPromised); -// tslint:disable:max-func-body-length trailing-comma no-any no-multiline-string no-invalid-this +/* eslint-disable , comma-dangle, @typescript-eslint/no-explicit-any, no-multi-str, no-invalid-this */ async function updateFileConfig(ioc: DataScienceIocContainer, key: string, value: any) { return ioc.get(IWorkspaceService).getConfiguration('file').update(key, value); } @@ -180,7 +180,7 @@ suite('DataScience Native Editor', () => { .stub(ioc.serviceContainer.get(ITrustService), 'isNotebookTrusted') .resolves(true); } catch (e) { - // tslint:disable-next-line: no-console + // eslint-disable-next-line no-console console.log(`Stub failure ${e}`); } console.log(`Start Test completed ${this.currentTest?.title}`); @@ -192,7 +192,7 @@ suite('DataScience Native Editor', () => { if (!disposable) { continue; } - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const promise = disposable.dispose() as Promise; if (promise) { await promise; @@ -685,7 +685,7 @@ df.head()`; }); runMountedTest('Select Jupyter Server', async () => { - // tslint:disable-next-line: no-console + // eslint-disable-next-line no-console console.log('Test skipped until user can change jupyter server selection again'); // let selectorCalled = false; @@ -704,7 +704,7 @@ df.head()`; }); runMountedTest('Select Jupyter Kernel', async (_wrapper) => { - // tslint:disable-next-line: no-console + // eslint-disable-next-line no-console console.log('Tests skipped, as we need better tests'); // let selectorCalled = false; @@ -1300,7 +1300,7 @@ df.head()`; if (!disposable) { continue; } - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const promise = disposable.dispose() as Promise; if (promise) { await promise; @@ -1412,7 +1412,7 @@ df.head()`; suite('Selection/Focus', () => { setup(async function () { await initIoc(); - // tslint:disable-next-line: no-invalid-this + // eslint-disable-next-line no-invalid-this await setupFunction.call(this); }); test('None of the cells are selected by default', async () => { @@ -1503,7 +1503,7 @@ df.head()`; suite('Model updates', () => { setup(async function () { await initIoc(); - // tslint:disable-next-line: no-invalid-this + // eslint-disable-next-line no-invalid-this await setupFunction.call(this); }); async function undo(): Promise { @@ -1819,7 +1819,7 @@ df.head()`; setup(async function () { (window.navigator as any).platform = originalPlatform; await initIoc(); - // tslint:disable-next-line: no-invalid-this + // eslint-disable-next-line no-invalid-this await setupFunction.call(this); }); teardown(() => ((window.navigator as any).platform = originalPlatform)); @@ -2315,7 +2315,7 @@ df.head()`; test("Test undo using the key 'z'", async function () { if (useCustomEditorApi) { - // tslint:disable-next-line: no-invalid-this + // eslint-disable-next-line no-invalid-this return this.skip(); } clickCell(0); @@ -2422,7 +2422,7 @@ df.head()`; test("Test save using the key 'ctrl+s' on Windows", async function () { if (useCustomEditorApi) { - // tslint:disable-next-line: no-invalid-this + // eslint-disable-next-line no-invalid-this return this.skip(); } (window.navigator as any).platform = 'Win'; @@ -2451,7 +2451,7 @@ df.head()`; test("Test save using the key 'ctrl+s' on Mac", async function () { if (useCustomEditorApi) { - // tslint:disable-next-line: no-invalid-this + // eslint-disable-next-line no-invalid-this return this.skip(); } (window.navigator as any).platform = 'Mac'; @@ -2482,7 +2482,7 @@ df.head()`; test("Test save using the key 'cmd+s' on a Mac", async function () { if (useCustomEditorApi) { - // tslint:disable-next-line: no-invalid-this + // eslint-disable-next-line no-invalid-this return this.skip(); } (window.navigator as any).platform = 'Mac'; @@ -2513,7 +2513,7 @@ df.head()`; }); test("Test save using the key 'cmd+s' on a Windows", async function () { if (useCustomEditorApi) { - // tslint:disable-next-line: no-invalid-this + // eslint-disable-next-line no-invalid-this return this.skip(); } (window.navigator as any).platform = 'Win'; @@ -2547,7 +2547,7 @@ df.head()`; let windowStateChangeHandlers: ((e: WindowState) => any)[] = []; setup(async function () { if (useCustomEditorApi) { - // tslint:disable-next-line: no-invalid-this + // eslint-disable-next-line no-invalid-this return this.skip(); } await initIoc(); @@ -2566,7 +2566,7 @@ df.head()`; // Keep track of all handlers for the onDidChangeWindowState event. when(ioc.applicationShell.onDidChangeWindowState).thenReturn(eventCallback); - // tslint:disable-next-line: no-invalid-this + // eslint-disable-next-line no-invalid-this await setupFunction.call(this); }); teardown(() => sinon.restore()); @@ -2918,7 +2918,7 @@ df.head()`; suite('Update Metadata', () => { setup(async function () { await initIoc(); - // tslint:disable-next-line: no-invalid-this + // eslint-disable-next-line no-invalid-this await setupFunction.call(this, JSON.stringify(oldJson)); }); @@ -2968,7 +2968,7 @@ df.head()`; suite('Clear Outputs', () => { setup(async function () { await initIoc(); - // tslint:disable-next-line: no-invalid-this + // eslint-disable-next-line no-invalid-this await setupFunction.call(this, JSON.stringify(oldJson)); }); diff --git a/src/test/datascience/nativeEditor.toolbar.functional.test.tsx b/src/test/datascience/nativeEditor.toolbar.functional.test.tsx index d5c2ab8cd35..73b4fce7b8a 100644 --- a/src/test/datascience/nativeEditor.toolbar.functional.test.tsx +++ b/src/test/datascience/nativeEditor.toolbar.functional.test.tsx @@ -14,7 +14,7 @@ import { ImageButton } from '../../datascience-ui/react-common/imageButton'; import { noop } from '../core'; import { mountComponent } from './testHelpers'; -// tslint:disable: no-any use-default-type-parameter +/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-unnecessary-type-arguments */ enum Button { RunAll = 0, diff --git a/src/test/datascience/nativeEditorTestHelpers.tsx b/src/test/datascience/nativeEditorTestHelpers.tsx index ecfb3ab3b72..7a5560952ae 100644 --- a/src/test/datascience/nativeEditorTestHelpers.tsx +++ b/src/test/datascience/nativeEditorTestHelpers.tsx @@ -16,7 +16,7 @@ import { IMountedWebView } from './mountedWebView'; import { getCellResults, getNativeFocusedEditor, injectCode, simulateKey } from './testHelpers'; import { ITestNativeEditorProvider } from './testNativeEditorProvider'; -// tslint:disable: no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ async function getOrCreateNativeEditor(ioc: DataScienceIocContainer, uri?: Uri) { const notebookEditorProvider = ioc.get(INotebookEditorProvider); @@ -50,7 +50,7 @@ export async function openEditor( return getOrCreateNativeEditor(ioc, uri); } -// tslint:disable-next-line: no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any export function getNativeCellResults( mounted: IMountedWebView, updater: () => Promise, @@ -59,10 +59,10 @@ export function getNativeCellResults( return getCellResults(mounted, 'NativeCell', updater, renderPromiseGenerator); } -// tslint:disable-next-line:no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any export function runMountedTest(name: string, testFunc: (this: Mocha.Context, context: Mocha.Context) => Promise) { test(name, async function () { - // tslint:disable-next-line: no-invalid-this + // eslint-disable-next-line no-invalid-this await testFunc.bind(this)(this); }); } @@ -80,7 +80,7 @@ export function focusCell(mounted: IMountedWebView, index: number): Promise { // First get the main toolbar. We'll use this to add a cell. const toolbar = mounted.wrapper.find('#main-panel-toolbar'); diff --git a/src/test/datascience/nativeEditorViewTracker.unit.test.ts b/src/test/datascience/nativeEditorViewTracker.unit.test.ts index 7f73a03a9c3..30c604a7e3c 100644 --- a/src/test/datascience/nativeEditorViewTracker.unit.test.ts +++ b/src/test/datascience/nativeEditorViewTracker.unit.test.ts @@ -39,7 +39,7 @@ suite('DataScience - View tracker', () => { when(editorProvider.open(anything())).thenCall((f) => { const key = f.toString(); openedList.push(f.toString()); - // tslint:disable-next-line: no-unnecessary-initializer + // eslint-disable-next-line no-undef-init let editorInstance: INotebookEditor | undefined = undefined; if (key === file1.toString()) { editorInstance = instance(editor1); diff --git a/src/test/datascience/notebook.functional.test.ts b/src/test/datascience/notebook.functional.test.ts index ff3f3c70196..5e336daa3a8 100644 --- a/src/test/datascience/notebook.functional.test.ts +++ b/src/test/datascience/notebook.functional.test.ts @@ -55,7 +55,7 @@ import { SupportedCommands } from './mockJupyterManager'; import { MockPythonService } from './mockPythonService'; import { createPythonService, startRemoteServer } from './remoteTestHelpers'; -// tslint:disable:no-any no-multiline-string max-func-body-length no-console max-classes-per-file trailing-comma +/* eslint-disable @typescript-eslint/no-explicit-any, no-multi-str, , no-console, max-classes-per-file, comma-dangle */ suite('DataScience notebook tests', () => { [false, true].forEach((useRawKernel) => { suite(`${useRawKernel ? 'With Direct Kernel' : 'With Jupyter Server'}`, () => { @@ -66,11 +66,11 @@ suite('DataScience notebook tests', () => { let modifiedConfig = false; const baseUri = Uri.file('foo.py'); - // tslint:disable-next-line: no-function-expression + // eslint-disable-next-line setup(async function () { ioc = new DataScienceIocContainer(); if (ioc.shouldMockJupyter && useRawKernel) { - // tslint:disable-next-line: no-invalid-this + // eslint-disable-next-line no-invalid-this this.skip(); return; } @@ -90,7 +90,7 @@ suite('DataScience notebook tests', () => { } } traceInfo('Shutting down after test.'); - // tslint:disable-next-line:prefer-for-of + // eslint-disable-next-line @typescript-eslint/prefer-for-of for (let i = 0; i < disposables.length; i += 1) { const disposable = disposables[i]; if (disposable) { @@ -266,7 +266,7 @@ suite('DataScience notebook tests', () => { ) { test(name, async function () { console.log(`Starting test ${name} ...`); - // tslint:disable-next-line: no-invalid-this + // eslint-disable-next-line no-invalid-this return func(this); }); } @@ -571,7 +571,7 @@ suite('DataScience notebook tests', () => { ioc.serviceManager.rebind(IInterpreterService, EmptyInterpreterService); await createNotebook(undefined, undefined, true); } else { - // tslint:disable-next-line: no-invalid-this + // eslint-disable-next-line no-invalid-this this.skip(); } }); @@ -647,7 +647,7 @@ suite('DataScience notebook tests', () => { } }); - // tslint:disable-next-line:no-invalid-template-strings + // eslint-disable-next-line no-template-curly-in-string runTest('Verify ${fileDirname} working directory', async () => { // Verify that the default ${fileDirname} setting sets the working directory to the file path changeMockWorkingDirectory(`'${srcDirectory()}'`); @@ -665,7 +665,7 @@ suite('DataScience notebook tests', () => { // Create again, we should get the same server from the cache const server2 = await createNotebook(); - // tslint:disable-next-line: triple-equals + // eslint-disable-next-line eqeqeq assert.ok(server == server2, 'With no settings changed we should return the cached server'); // Create a new mock interpreter with a different path @@ -681,7 +681,7 @@ suite('DataScience notebook tests', () => { // Create a new notebook, we should still be the same as interpreter is just saved for notebook creation const server3 = await createNotebook(); - // tslint:disable-next-line: triple-equals + // eslint-disable-next-line eqeqeq assert.ok(server == server3, 'With interpreter changed we should not return a new server'); } else { console.log(`Skipping Change Interpreter test in non-mocked Jupyter case`); @@ -747,7 +747,7 @@ suite('DataScience notebook tests', () => { ); try { - // tslint:disable-next-line:no-string-literal + // eslint-disable-next-line @typescript-eslint/dot-notation (tokenSource.token as any)['tag'] = messageFormat.format(timeout.toString()); await method(tokenSource.token); } catch (exc) { @@ -767,7 +767,7 @@ suite('DataScience notebook tests', () => { short?: boolean ): Promise { const timeouts = short ? [10, 20, 30, 100] : [300, 400, 500, 1000]; - // tslint:disable-next-line:prefer-for-of + // eslint-disable-next-line @typescript-eslint/prefer-for-of for (let i = 0; i < timeouts.length; i += 1) { await testCancelableCall(method, messageFormat, timeouts[i]); } @@ -992,7 +992,7 @@ df.head()`, mimeType: 'text/html', result: `pd has no attribute 'read'`, cellType: 'error', - // tslint:disable-next-line:quotemark + // eslint-disable-next-line @typescript-eslint/quotes verifyValue: (d) => assert.ok((d as string).includes("has no attribute 'read'"), 'Unexpected error result') }, @@ -1346,7 +1346,7 @@ plt.show()`, test('Notebook launch failure', async function () { if (!ioc.mockJupyter || useRawKernel) { - // tslint:disable-next-line: no-invalid-this + // eslint-disable-next-line no-invalid-this this.skip(); } else { const application = mock(ApplicationShell); @@ -1389,7 +1389,7 @@ plt.show()`, test('Notebook launch with PYTHONWARNINGS', async function () { if (ioc.mockJupyter) { - // tslint:disable-next-line: no-invalid-this + // eslint-disable-next-line no-invalid-this this.skip(); } else { // Force python warnings to always diff --git a/src/test/datascience/notebook/contentProvider.unit.test.ts b/src/test/datascience/notebook/contentProvider.unit.test.ts index 086d90531b8..a07a009a323 100644 --- a/src/test/datascience/notebook/contentProvider.unit.test.ts +++ b/src/test/datascience/notebook/contentProvider.unit.test.ts @@ -8,7 +8,7 @@ import { cloneDeep } from 'lodash'; import { IDisposable } from 'monaco-editor'; import { anything, instance, mock, when } from 'ts-mockito'; import { EventEmitter, Memento, Uri } from 'vscode'; -// tslint:disable-next-line: no-var-requires no-require-imports +// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports const vscodeNotebookEnums = require('vscode') as typeof import('vscode-proposed'); import type { NotebookContentProvider as VSCodeNotebookContentProvider, @@ -21,7 +21,7 @@ import { NotebookContentProvider } from '../../../client/datascience/notebook/co import { NotebookEditorCompatibilitySupport } from '../../../client/datascience/notebook/notebookEditorCompatibilitySupport'; import { INotebookStorageProvider } from '../../../client/datascience/notebookStorage/notebookStorageProvider'; import { createNotebookModel, disposeAllDisposables } from './helper'; -// tslint:disable: no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ suite('DataScience - NativeNotebook ContentProvider', () => { let storageProvider: INotebookStorageProvider; let contentProvider: VSCodeNotebookContentProvider; diff --git a/src/test/datascience/notebook/contentProvider.vscode.test.ts b/src/test/datascience/notebook/contentProvider.vscode.test.ts index cf0299fc33a..44b873e3d3b 100644 --- a/src/test/datascience/notebook/contentProvider.vscode.test.ts +++ b/src/test/datascience/notebook/contentProvider.vscode.test.ts @@ -3,7 +3,7 @@ 'use strict'; -// tslint:disable:no-require-imports no-var-requires +/* eslint-disable @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires */ import { nbformat } from '@jupyterlab/coreutils'; import { assert } from 'chai'; import * as fs from 'fs-extra'; @@ -26,10 +26,10 @@ import { saveActiveNotebook, trustAllNotebooks } from './helper'; -// tslint:disable-next-line: no-var-requires no-require-imports +// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports const vscodeNotebookEnums = require('vscode') as typeof import('vscode-proposed'); -// tslint:disable: no-any no-invalid-this +/* eslint-disable @typescript-eslint/no-explicit-any, no-invalid-this */ suite('DataScience - VSCode Notebook - (Open)', function () { this.timeout(15_000); const templateIPynbWithOutput = path.join( diff --git a/src/test/datascience/notebook/executionService.vscode.test.ts b/src/test/datascience/notebook/executionService.vscode.test.ts index 17572171748..82aeb55e20a 100644 --- a/src/test/datascience/notebook/executionService.vscode.test.ts +++ b/src/test/datascience/notebook/executionService.vscode.test.ts @@ -3,7 +3,7 @@ 'use strict'; -// tslint:disable:no-require-imports no-var-requires +/* eslint-disable @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires */ import { assert, expect } from 'chai'; import * as dedent from 'dedent'; import * as sinon from 'sinon'; @@ -32,10 +32,10 @@ import { waitForKernelToGetAutoSelected } from './helper'; -// tslint:disable-next-line: no-var-requires no-require-imports +// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports const vscodeNotebookEnums = require('vscode') as typeof import('vscode-proposed'); -// tslint:disable: no-any no-invalid-this +/* eslint-disable @typescript-eslint/no-explicit-any, no-invalid-this */ suite('DataScience - VSCode Notebook - (Execution) (slow)', function () { let api: IExtensionTestApi; let editorProvider: INotebookEditorProvider; @@ -190,7 +190,7 @@ suite('DataScience - VSCode Notebook - (Execution) (slow)', function () { assert.isNotEmpty(errorOutput.traceback, 'Incorrect traceback'); expect(cell.metadata.executionOrder).to.be.greaterThan(0, 'Execution count should be > 0'); expect(cell.metadata.runStartTime).to.be.greaterThan(0, 'Start time should be > 0'); - // tslint:disable-next-line: no-suspicious-comment + // eslint-disable-next-line // TODO: https://github.com/microsoft/vscode-jupyter/issues/204 // expect(cell.metadata.lastRunDuration).to.be.greaterThan(0, 'Duration should be > 0'); assert.equal(cell.metadata.runState, vscodeNotebookEnums.NotebookCellRunState.Error, 'Incorrect State'); diff --git a/src/test/datascience/notebook/helper.ts b/src/test/datascience/notebook/helper.ts index 083721a801a..4bb9a125097 100644 --- a/src/test/datascience/notebook/helper.ts +++ b/src/test/datascience/notebook/helper.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// tslint:disable: no-var-requires no-require-imports no-invalid-this no-any +/* eslint-disable @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports, no-invalid-this, @typescript-eslint/no-explicit-any */ import { nbformat } from '@jupyterlab/coreutils'; import { assert, expect } from 'chai'; @@ -263,7 +263,7 @@ export async function waitForKernelToGetAutoSelected(expectedLanguage?: string) return expectedLanguage.toLowerCase() === PYTHON_LANGUAGE.toLowerCase(); } // We don't support testing other kernels, not required hence not added. - // tslint:disable-next-line: no-console + // eslint-disable-next-line no-console console.error('Testing other kernel connections not supported'); } if (!expectedLanguage) { @@ -587,7 +587,7 @@ export async function hijackPrompt( clickButton.resolve(buttonToClick.text); } let displayCount = 0; - // tslint:disable-next-line: no-function-expression + // eslint-disable-next-line const stub = sinon.stub(appShell, promptType).callsFake(function (msg: string) { traceInfo(`Message displayed to user '${msg}', condition ${JSON.stringify(message)}`); if ( @@ -601,7 +601,7 @@ export async function hijackPrompt( return clickButton.promise; } } - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any return (appShell[promptType] as any).wrappedMethod.apply(appShell, arguments); }); const disposable = { dispose: () => stub.restore() }; diff --git a/src/test/datascience/notebook/helpers.unit.test.ts b/src/test/datascience/notebook/helpers.unit.test.ts index e2012e70f1a..a0a10042c22 100644 --- a/src/test/datascience/notebook/helpers.unit.test.ts +++ b/src/test/datascience/notebook/helpers.unit.test.ts @@ -8,7 +8,7 @@ import { assert } from 'chai'; import { cloneDeep } from 'lodash'; import { Uri } from 'vscode'; import { CellOutput, NotebookCellData } from '../../../../types/vscode-proposed'; -// tslint:disable-next-line: no-var-requires no-require-imports +// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports const vscodeNotebookEnums = require('vscode') as typeof import('vscode-proposed'); import { MARKDOWN_LANGUAGE, PYTHON_LANGUAGE } from '../../../client/common/constants'; import { ReadWrite } from '../../../client/common/types'; @@ -31,7 +31,7 @@ suite('DataScience - NativeNotebook helpers', () => { } ]; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const notebook = notebookModelToVSCNotebookData(true, {}, Uri.file(''), cells as any, PYTHON_LANGUAGE); assert.isOk(notebook); @@ -84,7 +84,7 @@ suite('DataScience - NativeNotebook helpers', () => { metadata: {} } ]; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const notebook = notebookModelToVSCNotebookData(true, {}, Uri.file(''), cells, PYTHON_LANGUAGE); assert.deepEqual(notebook.cells[0].outputs, expectedOutputs); diff --git a/src/test/datascience/notebook/interrupRestart.vscode.test.ts b/src/test/datascience/notebook/interrupRestart.vscode.test.ts index 0f48d497076..ef0c62c34d5 100644 --- a/src/test/datascience/notebook/interrupRestart.vscode.test.ts +++ b/src/test/datascience/notebook/interrupRestart.vscode.test.ts @@ -31,7 +31,7 @@ import { waitForTextOutputInVSCode } from './helper'; -// tslint:disable: no-any no-invalid-this no-function-expression +/* eslint-disable @typescript-eslint/no-explicit-any, no-invalid-this, */ /* * This test focuses on interrupting, restarting kernels. * We will not use actual kernels, just ensure the appropriate methods are invoked on the appropriate classes. diff --git a/src/test/datascience/notebook/ipywidget.vscode.test.ts b/src/test/datascience/notebook/ipywidget.vscode.test.ts index 7ac463b35a5..46f0a496557 100644 --- a/src/test/datascience/notebook/ipywidget.vscode.test.ts +++ b/src/test/datascience/notebook/ipywidget.vscode.test.ts @@ -3,7 +3,7 @@ 'use strict'; -// tslint:disable:no-require-imports no-var-requires +/* eslint-disable @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires */ // import * as path from 'path'; // import * as sinon from 'sinon'; import { assert } from 'chai'; @@ -24,7 +24,7 @@ import { } from './helper'; import { InteractiveWindowMessages } from '../../../client/datascience/interactive-common/interactiveWindowTypes'; -// tslint:disable: no-any no-invalid-this +/* eslint-disable @typescript-eslint/no-explicit-any, no-invalid-this */ suite('DataScience - VSCode Notebook - IPyWidget test', () => { // const widgetsNB = path.join( // EXTENSION_ROOT_DIR_FOR_TESTS, @@ -103,7 +103,7 @@ suite('DataScience - VSCode Notebook - IPyWidget test', () => { await waitForExecutionCompletedSuccessfully(cell); // Close notebook and open again - closeNotebooks(); + await closeNotebooks(); await openNotebook(api.serviceContainer, testWidgetNb.fsPath); cell = vscodeNotebook.activeNotebookEditor?.document.cells![0]!; diff --git a/src/test/datascience/notebook/nonPythonKernels.vscode.test.ts b/src/test/datascience/notebook/nonPythonKernels.vscode.test.ts index 0262cd6b07a..45d758186a9 100644 --- a/src/test/datascience/notebook/nonPythonKernels.vscode.test.ts +++ b/src/test/datascience/notebook/nonPythonKernels.vscode.test.ts @@ -3,7 +3,7 @@ 'use strict'; -// tslint:disable:no-require-imports no-var-requires +/* eslint-disable @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires */ import * as path from 'path'; import * as sinon from 'sinon'; import { Uri } from 'vscode'; @@ -33,7 +33,7 @@ import { waitForKernelToGetAutoSelected } from './helper'; -// tslint:disable: no-any no-invalid-this +/* eslint-disable @typescript-eslint/no-explicit-any, no-invalid-this */ suite('DataScience - VSCode Notebook - Kernels (non-python-kernel) (slow)', () => { const juliaNb = path.join( EXTENSION_ROOT_DIR_FOR_TESTS, diff --git a/src/test/datascience/notebook/notebookEditorProvider.vscode.test.ts b/src/test/datascience/notebook/notebookEditorProvider.vscode.test.ts index 7495ca6906d..c4f9e196911 100644 --- a/src/test/datascience/notebook/notebookEditorProvider.vscode.test.ts +++ b/src/test/datascience/notebook/notebookEditorProvider.vscode.test.ts @@ -24,7 +24,7 @@ import { } from './helper'; suite('DataScience - VSCode Notebook (Editor Provider)', function () { - // tslint:disable: no-invalid-this no-any + /* eslint-disable no-invalid-this, @typescript-eslint/no-explicit-any */ this.timeout(5_000); let api: IExtensionTestApi; diff --git a/src/test/datascience/notebook/notebookStorage.unit.test.ts b/src/test/datascience/notebook/notebookStorage.unit.test.ts index ae660b15cb5..916daea75e7 100644 --- a/src/test/datascience/notebook/notebookStorage.unit.test.ts +++ b/src/test/datascience/notebook/notebookStorage.unit.test.ts @@ -3,7 +3,7 @@ 'use strict'; -// tslint:disable-next-line: no-var-requires no-require-imports +// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports import { assert } from 'chai'; import { anyString, instance, mock, when } from 'ts-mockito'; import { Uri } from 'vscode'; @@ -38,7 +38,7 @@ suite('DataScience - Notebook Storage', () => { } const kernelModel = { name: 'foo', - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any session: {} as any, lastActivityTime: new Date(), numberOfConnections: 1, diff --git a/src/test/datascience/notebook/notebookTrust.vscode.test.ts b/src/test/datascience/notebook/notebookTrust.vscode.test.ts index 0a0b49f0000..438eb7ee1b9 100644 --- a/src/test/datascience/notebook/notebookTrust.vscode.test.ts +++ b/src/test/datascience/notebook/notebookTrust.vscode.test.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// tslint:disable:no-require-imports no-var-requires +/* eslint-disable @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires */ import { nbformat } from '@jupyterlab/coreutils'; import { assert } from 'chai'; import * as fs from 'fs-extra'; @@ -32,10 +32,10 @@ import { saveActiveNotebook, waitForKernelToGetAutoSelected } from './helper'; -// tslint:disable-next-line: no-var-requires no-require-imports +// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports const vscodeNotebookEnums = require('vscode') as typeof import('vscode-proposed'); -// tslint:disable: no-any no-invalid-this no-function-expression +/* eslint-disable @typescript-eslint/no-explicit-any, no-invalid-this, */ suite('DataScience - VSCode Notebook - (Trust) (slow)', function () { const templateIPynbWithOutput = path.join( EXTENSION_ROOT_DIR_FOR_TESTS, diff --git a/src/test/datascience/notebook/rendererExtensionDownloader.unit.test.ts b/src/test/datascience/notebook/rendererExtensionDownloader.unit.test.ts index 7a616e25bba..0fd7771c435 100644 --- a/src/test/datascience/notebook/rendererExtensionDownloader.unit.test.ts +++ b/src/test/datascience/notebook/rendererExtensionDownloader.unit.test.ts @@ -11,7 +11,7 @@ import { RendererExtensionDownloadUri } from '../../../client/datascience/notebo import { RendererExtensionDownloader } from '../../../client/datascience/notebook/rendererExtensionDownloader'; import { noop } from '../../core'; -// tslint:disable: no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ suite('DataScience - NativeNotebook Download Renderer Extension', () => { let downloader: RendererExtensionDownloader; let appShell: IApplicationShell; diff --git a/src/test/datascience/notebook/saving.vscode.test.ts b/src/test/datascience/notebook/saving.vscode.test.ts index a8f49deac17..1b2501b959d 100644 --- a/src/test/datascience/notebook/saving.vscode.test.ts +++ b/src/test/datascience/notebook/saving.vscode.test.ts @@ -3,7 +3,7 @@ 'use strict'; -// tslint:disable:no-require-imports no-var-requires +/* eslint-disable @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires */ import { assert, expect } from 'chai'; import * as path from 'path'; import * as sinon from 'sinon'; @@ -29,10 +29,10 @@ import { waitForExecutionCompletedSuccessfully, waitForExecutionCompletedWithErrors } from './helper'; -// tslint:disable-next-line:no-require-imports no-var-requires +// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires const vscodeNotebookEnums = require('vscode') as typeof import('vscode-proposed'); -// tslint:disable: no-any no-invalid-this +/* eslint-disable @typescript-eslint/no-explicit-any, no-invalid-this */ suite('DataScience - VSCode Notebook - (Saving) (slow)', function () { this.timeout(60_000); let api: IExtensionTestApi; @@ -133,7 +133,7 @@ suite('DataScience - VSCode Notebook - (Saving) (slow)', function () { assert.isEmpty(cell4.metadata.statusMessage || '', 'Cell 4 status should be empty'); // Not executed. // Persisting these require us to save custom metadata in ipynb. Not sure users would like this. We'll have more changes in ipynb files. - // tslint:disable-next-line: no-suspicious-comment + // eslint-disable-next-line // TODO: Discuss whether we need to persist these. // assert.isOk(cell1.metadata.runStartTime, 'Start time should be > 0'); // assert.isOk(cell1.metadata.lastRunDuration, 'Duration should be > 0'); diff --git a/src/test/datascience/plotViewer.functional.test.tsx b/src/test/datascience/plotViewer.functional.test.tsx index 4ce147a5437..1d29970d721 100644 --- a/src/test/datascience/plotViewer.functional.test.tsx +++ b/src/test/datascience/plotViewer.functional.test.tsx @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. 'use strict'; -// tslint:disable:max-func-body-length trailing-comma no-any no-multiline-string +/* eslint-disable , comma-dangle, @typescript-eslint/no-explicit-any, no-multi-str */ import '../../client/common/extensions'; import * as assert from 'assert'; @@ -47,7 +47,7 @@ suite('DataScience PlotViewer tests', () => { originalUpdateFunc = originalUpdateFunc.bind(component); } - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any component.componentDidUpdate = (prevProps: Readonly

, prevState: Readonly, snapshot?: any) => { // When the component updates, call the original function and resolve our promise if (originalUpdateFunc) { @@ -67,7 +67,7 @@ suite('DataScience PlotViewer tests', () => { } function waitForRender(component: React.Component, numberOfRenders: number = 1): Promise { - // tslint:disable-next-line:promise-must-complete + // eslint-disable-next-line return new Promise((resolve, reject) => { if (component) { let originalRenderFunc = component.render; @@ -127,7 +127,7 @@ suite('DataScience PlotViewer tests', () => { if (!disposable) { continue; } - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const promise = disposable.dispose() as Promise; if (promise) { await promise; @@ -148,7 +148,7 @@ suite('DataScience PlotViewer tests', () => { await renderPromise; } - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any function runMountedTest( name: string, testFunc: (wrapper: ReactWrapper, React.Component>) => Promise diff --git a/src/test/datascience/progress/progressReporter.unit.test.ts b/src/test/datascience/progress/progressReporter.unit.test.ts index ece6031855e..3227d3fab32 100644 --- a/src/test/datascience/progress/progressReporter.unit.test.ts +++ b/src/test/datascience/progress/progressReporter.unit.test.ts @@ -17,7 +17,7 @@ type Task = ( token: CancellationToken ) => Promise; -// tslint:disable-next-line: max-func-body-length +// eslint-disable-next-line suite('DataScience - Progress Reporter', () => { let reporter: ProgressReporter; let vscodeProgressReporter: VSCProgress<{ message?: string | undefined; increment?: number | undefined }>; diff --git a/src/test/datascience/raw-kernel/rawKernel.functional.test.ts b/src/test/datascience/raw-kernel/rawKernel.functional.test.ts index 60764133bc4..6de1cd99998 100644 --- a/src/test/datascience/raw-kernel/rawKernel.functional.test.ts +++ b/src/test/datascience/raw-kernel/rawKernel.functional.test.ts @@ -18,7 +18,7 @@ import { IInterpreterService } from '../../../client/interpreter/contracts'; import { DataScienceIocContainer } from '../dataScienceIocContainer'; import { requestExecute, requestInspect } from './rawKernelTestHelpers'; -// tslint:disable:no-any no-multiline-string max-func-body-length no-console max-classes-per-file trailing-comma +/* eslint-disable @typescript-eslint/no-explicit-any, no-multi-str, , no-console, max-classes-per-file, comma-dangle */ suite('DataScience raw kernel tests', () => { let ioc: DataScienceIocContainer; let rawKernel: RawKernel; @@ -41,7 +41,7 @@ suite('DataScience raw kernel tests', () => { ioc.registerDataScienceTypes(); await ioc.activate(); if (ioc.mockJupyter) { - // tslint:disable-next-line: no-invalid-this + // eslint-disable-next-line no-invalid-this this.skip(); } else { const port = await portfinder.getPortPromise({ startPort: 57718 }); diff --git a/src/test/datascience/raw-kernel/rawKernelTestHelpers.ts b/src/test/datascience/raw-kernel/rawKernelTestHelpers.ts index 43d806423f6..10d63e67859 100644 --- a/src/test/datascience/raw-kernel/rawKernelTestHelpers.ts +++ b/src/test/datascience/raw-kernel/rawKernelTestHelpers.ts @@ -6,7 +6,7 @@ import { JSONObject } from '@phosphor/coreutils'; import { createDeferred, Deferred } from '../../../client/common/utils/async'; import { RawKernel } from '../../../client/datascience/raw-kernel/rawKernel'; -// tslint:disable: no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ export async function requestExecute( rawKernel: RawKernel, code: string, diff --git a/src/test/datascience/reactHelpers.ts b/src/test/datascience/reactHelpers.ts index 5ce9a617b72..8c66cb01cf9 100644 --- a/src/test/datascience/reactHelpers.ts +++ b/src/test/datascience/reactHelpers.ts @@ -6,7 +6,7 @@ // Custom module loader so we can skip loading the 'canvas' module which won't load // inside of vscode -// tslint:disable:no-var-requires no-require-imports no-any no-function-expression +/* eslint-disable @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports, @typescript-eslint/no-explicit-any, */ const Module = require('module'); (function () { @@ -25,13 +25,13 @@ const Module = require('module'); // This should happen when not inside vscode. } } - // tslint:disable-next-line:no-invalid-this + // eslint-disable-next-line no-invalid-this return _require(this, filepath); }; })(); -// tslint:disable:no-string-literal no-any object-literal-key-quotes max-func-body-length member-ordering -// tslint:disable: no-require-imports no-var-requires +/* eslint-disable @typescript-eslint/dot-notation, @typescript-eslint/no-explicit-any, quote-props, , @typescript-eslint/member-ordering */ +/* eslint-disable @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires */ // Monkey patch the stylesheet impl from jsdom before loading jsdom. // This is necessary to get slickgrid to work. @@ -149,7 +149,7 @@ class MockCanvas implements CanvasRenderingContext2D { throw new Error('Method not implemented.'); } public stroke(): void; - // tslint:disable-next-line: unified-signatures + // eslint-disable-next-line @typescript-eslint/unified-signatures public stroke(path: Path2D): void; public stroke(_path?: any) { throw new Error('Method not implemented.'); @@ -160,7 +160,7 @@ class MockCanvas implements CanvasRenderingContext2D { throw new Error('Method not implemented.'); } public scrollPathIntoView(): void; - // tslint:disable-next-line: unified-signatures + // eslint-disable-next-line @typescript-eslint/unified-signatures public scrollPathIntoView(path: Path2D): void; public scrollPathIntoView(_path?: any) { throw new Error('Method not implemented.'); @@ -292,14 +292,14 @@ class MockCanvas implements CanvasRenderingContext2D { const mockCanvas = new MockCanvas(); export function setUpDomEnvironment() { - // tslint:disable-next-line:no-http-string + // eslint-disable-next-line const dom = new JSDOM('

', { pretendToBeVisual: true, url: 'http://localhost' }); const { window } = dom; - // tslint:disable: no-function-expression no-empty + /* eslint-disable , no-empty,@typescript-eslint/no-empty-function */ try { // If running inside of vscode, we need to mock the canvas because the real canvas is not // returned. @@ -315,7 +315,7 @@ export function setUpDomEnvironment() { noop(); } - // tslint:disable-next-line: no-function-expression + // eslint-disable-next-line window.HTMLCanvasElement.prototype.toDataURL = function () { return ''; }; @@ -324,11 +324,11 @@ export function setUpDomEnvironment() { (global as any)['Element'] = window.Element; // tslist:disable-next-line:no-string-literal no-any (global as any)['location'] = window.location; - // tslint:disable-next-line:no-string-literal no-any + // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-explicit-any (global as any)['window'] = window; - // tslint:disable-next-line:no-string-literal no-any + // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-explicit-any (global as any)['document'] = window.document; - // tslint:disable-next-line:no-string-literal no-any + // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-explicit-any (global as any)['navigator'] = { userAgent: 'node.js', platform: 'node' @@ -337,9 +337,9 @@ export function setUpDomEnvironment() { (global as any)['KeyboardEvent'] = window.KeyboardEvent; (global as any)['MouseEvent'] = window.MouseEvent; (global as any)['DocumentFragment'] = window.DocumentFragment; - // tslint:disable-next-line:no-string-literal no-any + // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-explicit-any (global as any)['getComputedStyle'] = window.getComputedStyle; - // tslint:disable-next-line:no-string-literal no-any + // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-explicit-any (global as any)['self'] = window; copyProps(window, global); @@ -356,7 +356,7 @@ export function setUpDomEnvironment() { }); // Another special case. CodeMirror needs selection - // tslint:disable-next-line:no-string-literal no-any + // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-explicit-any (global as any)['document'].selection = { anchorNode: null, anchorOffset: 0, @@ -388,15 +388,15 @@ export function setUpDomEnvironment() { }; // For Jupyter server to load correctly. It expects the window object to not be defined - // tslint:disable-next-line:no-eval no-any + // eslint-disable-next-line no-eval, @typescript-eslint/no-explicit-any const fetchMod = eval('require')('node-fetch'); - // tslint:disable-next-line:no-string-literal no-any + // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-explicit-any (global as any)['fetch'] = fetchMod; - // tslint:disable-next-line:no-string-literal no-any + // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-explicit-any (global as any)['Request'] = fetchMod.Request; - // tslint:disable-next-line:no-string-literal no-any + // eslint-disable-next-line @typescript-eslint/dot-notation, @typescript-eslint/no-explicit-any (global as any)['Headers'] = fetchMod.Headers; - // tslint:disable-next-line:no-string-literal no-eval no-any + // eslint-disable-next-line @typescript-eslint/dot-notation, no-eval, @typescript-eslint/no-explicit-any (global as any)['WebSocket'] = eval('require')('ws'); (global as any)['DOMParser'] = dom.window.DOMParser; (global as any)['Blob'] = dom.window.Blob; @@ -407,7 +407,7 @@ export function setUpDomEnvironment() { // export the function we need to dispose of the timer it's set. So force it to. const configurationRegex = /.*(\\|\/)node_modules(\\|\/)monaco-editor(\\|\/)esm(\\|\/)vs(\\|\/)editor(\\|\/)browser(\\|\/)config(\\|\/)configuration\.js/g; const _oldLoader = require.extensions['.js']; - // tslint:disable-next-line:no-function-expression + // eslint-disable-next-line require.extensions['.js'] = function (mod: any, filename) { if (configurationRegex.test(filename)) { let content = require('fs').readFileSync(filename, 'utf8'); diff --git a/src/test/datascience/shiftEnterBanner.unit.test.ts b/src/test/datascience/shiftEnterBanner.unit.test.ts index c4f9b9c8497..641a258ebeb 100644 --- a/src/test/datascience/shiftEnterBanner.unit.test.ts +++ b/src/test/datascience/shiftEnterBanner.unit.test.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. 'use strict'; -//tslint:disable:max-func-body-length match-default-export-name no-any no-multiline-string no-trailing-whitespace +/* eslint-disable , , @typescript-eslint/no-explicit-any, no-multi-str, no-trailing-spaces */ import { expect } from 'chai'; import rewiremock from 'rewiremock'; import * as typemoq from 'typemoq'; diff --git a/src/test/datascience/testHelpers.tsx b/src/test/datascience/testHelpers.tsx index 58ee8f4ae32..e51d0ea6e60 100644 --- a/src/test/datascience/testHelpers.tsx +++ b/src/test/datascience/testHelpers.tsx @@ -27,7 +27,7 @@ import { IMountedWebView } from './mountedWebView'; import { createInputEvent, createKeyboardEvent } from './reactHelpers'; export * from './testHelpersCore'; -//tslint:disable:trailing-comma no-any no-multiline-string +/* eslint-disable comma-dangle, @typescript-eslint/no-explicit-any, no-multi-str */ export enum CellInputState { Hidden, Visible, @@ -52,7 +52,7 @@ async function testInnerLoop( addMockData(ioc, 'a=1\na', 1); await testFunc(type); } else { - // tslint:disable-next-line:no-console + // eslint-disable-next-line no-console console.log(`${name} skipped, no Jupyter installed.`); } } diff --git a/src/test/datascience/testNativeEditorProvider.ts b/src/test/datascience/testNativeEditorProvider.ts index 82c87c9eb1a..868ec7667f2 100644 --- a/src/test/datascience/testNativeEditorProvider.ts +++ b/src/test/datascience/testNativeEditorProvider.ts @@ -46,7 +46,7 @@ function TestNativeEditorProviderMixin deferred: Deferred; }[] = []; - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any constructor(...rest: any[]) { super(...rest); } diff --git a/src/test/datascience/testPersistentStateFactory.ts b/src/test/datascience/testPersistentStateFactory.ts index da364bb4a88..d06bfe06782 100644 --- a/src/test/datascience/testPersistentStateFactory.ts +++ b/src/test/datascience/testPersistentStateFactory.ts @@ -4,7 +4,7 @@ import { IPersistentState, IPersistentStateFactory } from '../../client/common/t const PrefixesToStore = ['INTERPRETERS_CACHE']; -// tslint:disable-next-line: no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any const persistedState = new Map(); class TestPersistentState implements IPersistentState { diff --git a/src/test/datascience/trustedNotebooks.functional.test.tsx b/src/test/datascience/trustedNotebooks.functional.test.tsx index 39c6207f15c..74f6b4436e7 100644 --- a/src/test/datascience/trustedNotebooks.functional.test.tsx +++ b/src/test/datascience/trustedNotebooks.functional.test.tsx @@ -43,7 +43,7 @@ function waitForMessage(ioc: DataScienceIocContainer, message: string, options?: .getMountedWebView(undefined) .waitForMessage(message, options); } -// tslint:disable:no-any no-multiline-string +/* eslint-disable @typescript-eslint/no-explicit-any, no-multi-str */ suite('DataScience Notebook trust', () => { let wrapper: ReactWrapper, React.Component>; let ne: { editor: INotebookEditor; mount: IMountedWebView }; @@ -251,7 +251,7 @@ suite('DataScience Notebook trust', () => { if (!disposable) { continue; } - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const promise = disposable.dispose() as Promise; if (promise) { await promise; @@ -267,7 +267,7 @@ suite('DataScience Notebook trust', () => { setup(async function () { await initIoc(); - // tslint:disable-next-line: no-invalid-this + // eslint-disable-next-line no-invalid-this await setupFunction.call(this); }); diff --git a/src/test/datascience/uiTests/helpers.ts b/src/test/datascience/uiTests/helpers.ts index 9852f9cdbbd..0c30f7fa5dd 100644 --- a/src/test/datascience/uiTests/helpers.ts +++ b/src/test/datascience/uiTests/helpers.ts @@ -14,7 +14,7 @@ import { CommonActionType } from '../../../datascience-ui/interactive-common/red import { noop } from '../../core'; import { IWebServer } from './webBrowserPanel'; -// tslint:disable:max-func-body-length trailing-comma no-any no-multiline-string +/* eslint-disable , comma-dangle, @typescript-eslint/no-explicit-any, no-multi-str */ export type WaitForMessageOptions = { /** * Timeout for waiting for message. @@ -163,7 +163,7 @@ export class BaseWebUI implements IAsyncDisposable { await fs.ensureDir(path.basename(filePath)); } await this.page?.screenshot({ path: filePath }); - // tslint:disable-next-line: no-console + // eslint-disable-next-line no-console console.info(`Screenshot captured in ${filePath}`); } } diff --git a/src/test/datascience/uiTests/ipywidget.ui.functional.test.ts b/src/test/datascience/uiTests/ipywidget.ui.functional.test.ts index a7a30989040..653d0cf7eb5 100644 --- a/src/test/datascience/uiTests/ipywidget.ui.functional.test.ts +++ b/src/test/datascience/uiTests/ipywidget.ui.functional.test.ts @@ -3,7 +3,7 @@ 'use strict'; -// tslint:disable: no-var-requires no-require-imports no-invalid-this no-any no-invalid-this no-console +/* eslint-disable @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports, no-invalid-this, @typescript-eslint/no-explicit-any, no-console */ import { nbformat } from '@jupyterlab/coreutils'; import { assert, use } from 'chai'; @@ -52,7 +52,7 @@ use(chaiAsPromised); ioc = new DataScienceIocContainer(true); ioc.setExtensionRootPath(EXTENSION_ROOT_DIR); if (ioc.mockJupyter && useRawKernel) { - // tslint:disable-next-line: no-invalid-this + // eslint-disable-next-line no-invalid-this this.skip(); } @@ -75,7 +75,7 @@ use(chaiAsPromised); if (!disposable) { continue; } - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const promise = disposable.dispose() as Promise; if (promise) { await promise; diff --git a/src/test/datascience/uiTests/notebookHelpers.ts b/src/test/datascience/uiTests/notebookHelpers.ts index 292eebd14c3..59cd9c9eb08 100644 --- a/src/test/datascience/uiTests/notebookHelpers.ts +++ b/src/test/datascience/uiTests/notebookHelpers.ts @@ -51,7 +51,7 @@ function createWebViewPanel(): WebviewPanel { const webViewPanel: Partial = { webview: { html: '' - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any } as any, reveal: noop, onDidDispose: disposeEventEmitter.event.bind(disposeEventEmitter), @@ -70,11 +70,11 @@ function createWebViewPanel(): WebviewPanel { ) .returns(() => { traceInfo(`Mock webview ${JSON.stringify(webViewPanel)} should be returned.`); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any return webViewPanel as any; }); - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any return webViewPanel as any; } @@ -92,7 +92,7 @@ export async function openNotebook( // Wait for UI to load, i.e. until we get the message `LoadAllCellsComplete`. const uiLoaded = notebookUI.waitUntilLoaded(); - // tslint:disable-next-line: insecure-random + // eslint-disable-next-line let port = Math.floor(Math.random() * Math.floor(1000)) + 9000; try { port = await getFreePort({ host: 'localhost' }); diff --git a/src/test/datascience/uiTests/notebookUi.ts b/src/test/datascience/uiTests/notebookUi.ts index 8472e8102bd..e1359157aa3 100644 --- a/src/test/datascience/uiTests/notebookUi.ts +++ b/src/test/datascience/uiTests/notebookUi.ts @@ -53,7 +53,7 @@ export class NotebookEditorUI extends BaseWebUI { // Click the run button. const runButton = await this.getToolbarButton(cellIndex, CellToolbarButton.run); - // tslint:disable-next-line: no-console + // eslint-disable-next-line no-console console.log(`Executing cell ${cellIndex} by clicking ${runButton.toString()}`); await Promise.all([runButton.click({ button: 'left', force: true, timeout: 0 }), renderedPromise]); } diff --git a/src/test/datascience/uiTests/recorder.ts b/src/test/datascience/uiTests/recorder.ts index 6445ba2660a..06010ae230f 100644 --- a/src/test/datascience/uiTests/recorder.ts +++ b/src/test/datascience/uiTests/recorder.ts @@ -10,7 +10,7 @@ import { InteractiveWindowMessages } from '../../../client/datascience/interacti import { noop } from '../../core'; import { IWebServer } from './webBrowserPanel'; -// tslint:disable: no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ export type RequestFromUI = { type: 'fromUI'; diff --git a/src/test/datascience/uiTests/webBrowserPanel.ts b/src/test/datascience/uiTests/webBrowserPanel.ts index 7600ee2b765..218df16345f 100644 --- a/src/test/datascience/uiTests/webBrowserPanel.ts +++ b/src/test/datascience/uiTests/webBrowserPanel.ts @@ -15,7 +15,7 @@ import { createDeferred } from '../../../client/common/utils/async'; import { noop } from '../../../client/common/utils/misc'; import { EXTENSION_ROOT_DIR } from '../../../client/constants'; -// tslint:disable: no-any no-console no-require-imports no-var-requires +/* eslint-disable @typescript-eslint/no-explicit-any, no-console, @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires */ const nocache = require('nocache'); export interface IWebServer extends IDisposable { @@ -132,11 +132,11 @@ export class WebServer implements IWebServer { }); // Display a message if this env variable is set (used when debugging). - // tslint:disable-next-line: no-http-string + // eslint-disable-next-line const url = `http:///localhost:${port}/index.html`; if (process.env.VSC_JUPYTER_DS_UI_PROMPT) { window - // tslint:disable-next-line: messages-must-be-localized + // eslint-disable-next-line .showInformationMessage(`Open browser to '${url}'`, 'Copy') .then((selection) => { if (selection === 'Copy') { @@ -201,7 +201,7 @@ export class WebBrowserPanel implements IWebviewPanel, IDisposable { this.serverUrl = p; }) .catch((ex) => - // tslint:disable-next-line: no-console + // eslint-disable-next-line no-console console.error('Failed to start Web Browser Panel', ex) ); } @@ -281,13 +281,13 @@ export class WebBrowserPanel implements IWebviewPanel, IDisposable { const port = await this.server.launchServer(cwd, resourcesRoot, portToUse); if (this.panel?.webview) { - // tslint:disable-next-line: no-http-string + // eslint-disable-next-line const url = `http:///localhost:${port}/index.html`; this.panel.webview.html = `

${url}

`; } await this.server.waitForConnection(); - // tslint:disable-next-line: no-http-string + // eslint-disable-next-line return `http://localhost:${port}`; } } diff --git a/src/test/datascience/uiTests/webBrowserPanelProvider.ts b/src/test/datascience/uiTests/webBrowserPanelProvider.ts index 340105f60df..ddf0c6d4608 100644 --- a/src/test/datascience/uiTests/webBrowserPanelProvider.ts +++ b/src/test/datascience/uiTests/webBrowserPanelProvider.ts @@ -10,7 +10,7 @@ import { WebBrowserPanel } from './webBrowserPanel'; export class WebBrowserPanelProvider implements IWebviewPanelProvider { constructor(@inject(IDisposableRegistry) private disposableRegistry: IDisposableRegistry) {} - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public async create(options: IWebviewPanelOptions): Promise { return new WebBrowserPanel(this.disposableRegistry, options); } diff --git a/src/test/datascience/variableTestHelpers.ts b/src/test/datascience/variableTestHelpers.ts index adb6b884aba..0f2a1407fd0 100644 --- a/src/test/datascience/variableTestHelpers.ts +++ b/src/test/datascience/variableTestHelpers.ts @@ -22,7 +22,7 @@ import { getOrCreateInteractiveWindow } from './interactiveWindowTestHelpers'; import { MockDocumentManager } from './mockDocumentManager'; import { waitForVariablesUpdated } from './testHelpers'; -// tslint:disable: no-var-requires no-require-imports no-any chai-vague-errors no-unused-expression +/* eslint-disable @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports, @typescript-eslint/no-explicit-any, , @typescript-eslint/no-unused-expressions */ export async function verifyAfterStep( ioc: DataScienceIocContainer, @@ -106,7 +106,7 @@ function verifyCell( const cellHTML = parse(cellWrapper.html()) as any; const innerHTML = cellHTML.innerHTML; if (typeof value === 'string') { - // tslint:disable-next-line:no-string-literal + // eslint-disable-next-line @typescript-eslint/dot-notation const match = /value="([\s\S]+?)"\s+/.exec(innerHTML); expect(match).to.not.be.equal(null, `${targetName} does not have a value attribute`); diff --git a/src/test/datascience/variableexplorer.functional.test.tsx b/src/test/datascience/variableexplorer.functional.test.tsx index 274b370a25b..fb438ab906f 100644 --- a/src/test/datascience/variableexplorer.functional.test.tsx +++ b/src/test/datascience/variableexplorer.functional.test.tsx @@ -14,10 +14,10 @@ import { addCell, createNewEditor } from './nativeEditorTestHelpers'; import { openVariableExplorer, runDoubleTest, runInteractiveTest, waitForVariablesUpdated } from './testHelpers'; import { verifyAfterStep, verifyCanFetchData, verifyVariables } from './variableTestHelpers'; -// tslint:disable: no-var-requires no-require-imports +/* eslint-disable @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports */ const rangeInclusive = require('range-inclusive'); -// tslint:disable:max-func-body-length trailing-comma no-any no-multiline-string +/* eslint-disable , comma-dangle, @typescript-eslint/no-explicit-any, no-multi-str */ [false, true].forEach((runByLine) => { suite(`DataScience Interactive Window variable explorer tests with RunByLine set to ${runByLine}`, () => { const disposables: Disposable[] = []; @@ -28,9 +28,9 @@ const rangeInclusive = require('range-inclusive'); // These test require python, so only run with a non-mocked jupyter const isRollingBuild = process.env ? process.env.VSC_FORCE_REAL_JUPYTER !== undefined : false; if (!isRollingBuild) { - // tslint:disable-next-line:no-console + // eslint-disable-next-line no-console console.log('Skipping Variable Explorer tests. Requires python environment'); - // tslint:disable-next-line:no-invalid-this + // eslint-disable-next-line no-invalid-this this.skip(); } }); @@ -46,7 +46,7 @@ const rangeInclusive = require('range-inclusive'); if (!disposable) { continue; } - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const promise = disposable.dispose() as Promise; if (promise) { await promise; @@ -115,7 +115,7 @@ value = 'hello world'`; count: 0, truncated: false }, - // tslint:disable-next-line:quotemark + // eslint-disable-next-line @typescript-eslint/quotes { name: 'value', value: 'hello world', @@ -235,7 +235,7 @@ value = 'hello world'`; count: 0, truncated: false }, - // tslint:disable-next-line:quotemark + // eslint-disable-next-line @typescript-eslint/quotes { name: 'value2', value: 'hello world 2', @@ -282,7 +282,7 @@ myTuple = 1,2,3,4,5,6,7,8,9`; count: 0, truncated: false }, - // tslint:disable-next-line:quotemark + // eslint-disable-next-line @typescript-eslint/quotes { name: 'myDict', value: "{'a': 1}", @@ -435,7 +435,7 @@ mySeries = myDataframe[0] count: 0, truncated: false }, - // tslint:disable:no-trailing-whitespace + /* eslint-disable no-trailing-spaces */ { name: 'mySeries', value: `0 1.0 diff --git a/src/test/debuggerTest.ts b/src/test/debuggerTest.ts index ac2af8a87b6..f9e6312cf1c 100644 --- a/src/test/debuggerTest.ts +++ b/src/test/debuggerTest.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// tslint:disable:no-console +/* eslint-disable no-console */ import * as path from 'path'; import { runTests } from 'vscode-test'; diff --git a/src/test/extension-version.functional.test.ts b/src/test/extension-version.functional.test.ts index f19310c6540..eae0e05bfc7 100644 --- a/src/test/extension-version.functional.test.ts +++ b/src/test/extension-version.functional.test.ts @@ -3,7 +3,7 @@ 'use strict'; -// tslint:disable:no-any max-func-body-length +/* eslint-disable @typescript-eslint/no-explicit-any, */ import { expect } from 'chai'; import * as fs from 'fs'; @@ -21,7 +21,7 @@ suite('Extension version tests', () => { suiteSetup(async function () { // Skip the entire suite if running locally if (!branchName) { - // tslint:disable-next-line: no-invalid-this + // eslint-disable-next-line no-invalid-this return this.skip(); } }); @@ -33,7 +33,7 @@ suite('Extension version tests', () => { test('If we are running a pipeline in the main branch, the extension version in `package.json` should have the "-dev" suffix', async function () { if (branchName !== 'main') { - // tslint:disable-next-line: no-invalid-this + // eslint-disable-next-line no-invalid-this return this.skip(); } @@ -45,7 +45,7 @@ suite('Extension version tests', () => { test('If we are running a pipeline in the release branch, the extension version in `package.json` should not have the "-dev" suffix', async function () { if (!branchName!.startsWith('release')) { - // tslint:disable-next-line: no-invalid-this + // eslint-disable-next-line no-invalid-this return this.skip(); } diff --git a/src/test/fixtures.ts b/src/test/fixtures.ts index f77193b00df..9ecadb8ea5b 100644 --- a/src/test/fixtures.ts +++ b/src/test/fixtures.ts @@ -39,9 +39,9 @@ export class CleanupFixture { await res; } } catch (err) { - // tslint:disable-next-line:no-console + // eslint-disable-next-line no-console console.error(`cleanup ${i + 1} failed: ${err}`); - // tslint:disable-next-line:no-console + // eslint-disable-next-line no-console console.error('moving on...'); } }) diff --git a/src/test/format/extension.format.vscode.test.ts b/src/test/format/extension.format.vscode.test.ts index 3ac7a6bcb12..f9c8d7912b9 100644 --- a/src/test/format/extension.format.vscode.test.ts +++ b/src/test/format/extension.format.vscode.test.ts @@ -21,7 +21,7 @@ // } from '../datascience/notebook/helper'; // import { EXTENSION_ROOT_DIR_FOR_TESTS, initialize, initializeTest } from '../initialize'; -// // tslint:disable: no-any no-invalid-this +/* eslint-disable @typescript-eslint/no-explicit-any, no-invalid-this */ // suite('Formatting - Notebooks (slow)', () => { // let api: IExtensionTestApi; // suiteSetup(async function () { diff --git a/src/test/functionalTests.ts b/src/test/functionalTests.ts index c4e103ab4d5..f7a7f236bef 100644 --- a/src/test/functionalTests.ts +++ b/src/test/functionalTests.ts @@ -10,12 +10,12 @@ import * as os from 'os'; if (os.platform() === 'win32') { const proc = child_process.spawn('C:\\Windows\\System32\\Reg.exe', ['/?']); proc.on('error', () => { - // tslint:disable-next-line: no-console + // eslint-disable-next-line no-console console.error('error during reg.exe'); }); } -// tslint:disable:no-any no-require-imports no-var-requires +/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires */ if ((Reflect as any).metadata === undefined) { require('reflect-metadata'); } @@ -30,11 +30,11 @@ import { setUpDomEnvironment, setupTranspile } from './datascience/reactHelpers' import { initialize } from './vscode-mock'; // Custom module loader so we skip .css files that break non webpack wrapped compiles -// tslint:disable-next-line:no-var-requires no-require-imports +// eslint-disable-next-line @typescript-eslint/no-var-requires, @typescript-eslint/no-require-imports const Module = require('module'); // Required for DS functional tests. -// tslint:disable-next-line:no-function-expression +// eslint-disable-next-line (function () { const origRequire = Module.prototype.require; const _require = (context: any, filepath: any) => { @@ -49,14 +49,14 @@ const Module = require('module'); const queryEnd = filepath.indexOf('!'); if (queryEnd >= 0) { const query = filepath.substring('expose-loader?'.length, queryEnd); - // tslint:disable-next-line:no-invalid-this + // eslint-disable-next-line no-invalid-this (global as any)[query] = _require(this, filepath.substring(queryEnd + 1)); return ''; } } if (filepath.startsWith('slickgrid/slick.core')) { // Special case. This module sticks something into the global 'window' object. - // tslint:disable-next-line:no-invalid-this + // eslint-disable-next-line no-invalid-this const result = _require(this, filepath); // However it doesn't look in the 'window' object later. we have to move it to @@ -67,7 +67,7 @@ const Module = require('module'); return result; } - // tslint:disable-next-line:no-invalid-this + // eslint-disable-next-line no-invalid-this return _require(this, filepath); }; })(); diff --git a/src/test/index.ts b/src/test/index.ts index d5d01ffde66..99d60d655c4 100644 --- a/src/test/index.ts +++ b/src/test/index.ts @@ -3,7 +3,7 @@ 'use strict'; -// tslint:disable:no-require-imports no-var-requires no-any +/* eslint-disable @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires, @typescript-eslint/no-explicit-any */ // Always place at the top, to ensure other modules are imported first. require('./common/exitCIAfterTestReporter'); @@ -49,7 +49,7 @@ process.on('unhandledRejection', (ex: any, _a) => { message.push(ex.stack); } } - // tslint:disable-next-line: no-console + // eslint-disable-next-line no-console console.log(`Unhandled Promise Rejection with the message ${message.join(', ')}`); }); @@ -125,7 +125,7 @@ function activateExtensionScript() { }); const initializationPromise = initialize(); const promise = Promise.race([initializationPromise, failed]); - // tslint:disable-next-line: no-console + // eslint-disable-next-line no-console promise.finally(() => clearTimeout(timer!)).catch((e) => console.error(e)); return initializationPromise; } @@ -180,7 +180,7 @@ export async function run(): Promise { // Setup test files that need to be run. testFiles.forEach((file) => mocha.addFile(path.join(testsRoot, file))); - // tslint:disable: no-console + /* eslint-disable no-console */ console.time('Time taken to activate the extension'); try { console.log('Starting & waiting for Python extension to activate'); diff --git a/src/test/initialize.ts b/src/test/initialize.ts index bfad0ac94c7..cd1fcfeb722 100644 --- a/src/test/initialize.ts +++ b/src/test/initialize.ts @@ -23,11 +23,11 @@ export async function initializePython() { export function isInsiders() { return vscode.env.appName.indexOf('Insider') > 0; } -// tslint:disable-next-line:no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any export async function initialize(): Promise { await initializePython(); const api = await activateExtension(); - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any return (api as any) as IExtensionTestApi; } @@ -38,7 +38,7 @@ export async function activateExtension() { await api.ready; return api; } -// tslint:disable-next-line:no-any +// eslint-disable-next-line @typescript-eslint/no-explicit-any export async function initializeTest(): Promise { await initializePython(); await closeActiveWindows(); @@ -63,7 +63,7 @@ export async function closeActiveNotebooks(): Promise { return; } // We could have untitled notebooks, close them by reverting changes. - // tslint:disable-next-line: no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any while ((vscode as any).notebook.activeNotebookEditor || vscode.window.activeTextEditor) { await vscode.commands.executeCommand('workbench.action.revertAndCloseActiveEditor'); } @@ -116,7 +116,7 @@ async function closeWindowsInternal() { } function isANotebookOpen() { - // tslint:disable + /* eslint-disable */ if ( Array.isArray((vscode as any).notebook.visibleNotebookEditors) && (vscode as any).notebook.visibleNotebookEditors.length diff --git a/src/test/interpreters/condaService.ts b/src/test/interpreters/condaService.ts index c5c006d8c13..31a6a2c1f90 100644 --- a/src/test/interpreters/condaService.ts +++ b/src/test/interpreters/condaService.ts @@ -13,7 +13,7 @@ import { parseCondaEnvFileContents } from './condaHelper'; import { isCondaEnvironment } from './condaLocator'; /* eslint-disable @typescript-eslint/explicit-module-boundary-types */ -// tslint:disable-next-line:no-require-imports no-var-requires +// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires const untildify: (value: string) => string = require('untildify'); // This glob pattern will match all of the following: diff --git a/src/test/mockClasses.ts b/src/test/mockClasses.ts index 4d94129414f..7fc525e5de8 100644 --- a/src/test/mockClasses.ts +++ b/src/test/mockClasses.ts @@ -15,18 +15,18 @@ export class MockOutputChannel implements vscode.OutputChannel { this.append(value); this.append('\n'); } - // tslint:disable-next-line:no-empty + // eslint-disable-next-line no-empty,@typescript-eslint/no-empty-function public clear() {} public show(preservceFocus?: boolean): void; public show(column?: vscode.ViewColumn, preserveFocus?: boolean): void; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public show(_x?: any, _y?: any): void { this.isShown = true; } public hide() { this.isShown = false; } - // tslint:disable-next-line:no-empty + // eslint-disable-next-line no-empty,@typescript-eslint/no-empty-function public dispose() {} } @@ -37,10 +37,10 @@ export class MockStatusBarItem implements vscode.StatusBarItem { public tooltip!: string; public color!: string; public command!: string; - // tslint:disable-next-line:no-empty + // eslint-disable-next-line no-empty,@typescript-eslint/no-empty-function public show(): void {} - // tslint:disable-next-line:no-empty + // eslint-disable-next-line no-empty,@typescript-eslint/no-empty-function public hide(): void {} - // tslint:disable-next-line:no-empty + // eslint-disable-next-line no-empty,@typescript-eslint/no-empty-function public dispose(): void {} } diff --git a/src/test/mocks/mementos.ts b/src/test/mocks/mementos.ts index 77fde4c8e50..85f3a393760 100644 --- a/src/test/mocks/mementos.ts +++ b/src/test/mocks/mementos.ts @@ -8,14 +8,14 @@ export class MockMemento implements Memento { // with writing too much data to global storage. See bug https://github.com/microsoft/vscode-python/issues/9159 private _value: Record = {}; // @ts-ignore - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public get(key: any, defaultValue?: any); public get(key: string, defaultValue?: T): T { const exists = this._value.hasOwnProperty(key); - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any return exists ? this._value[key] : (defaultValue! as any); } - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any public update(key: string, value: any): Thenable { this._value[key] = value; return Promise.resolve(); diff --git a/src/test/mocks/proc.ts b/src/test/mocks/proc.ts index 59f069cd4d3..25ec528c11c 100644 --- a/src/test/mocks/proc.ts +++ b/src/test/mocks/proc.ts @@ -39,7 +39,7 @@ export class MockProcessService extends EventEmitter implements IProcessService const output = value as Output; if (['stderr', 'stdout'].some((source) => source === output.source)) { return { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any proc: {} as any, out: Observable.of(output), dispose: () => { @@ -48,7 +48,7 @@ export class MockProcessService extends EventEmitter implements IProcessService }; } else { return { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any proc: {} as any, out: value as Observable>, dispose: () => { diff --git a/src/test/mocks/vsc/arrays.ts b/src/test/mocks/vsc/arrays.ts index 9291745a066..6a0fe438e2b 100644 --- a/src/test/mocks/vsc/arrays.ts +++ b/src/test/mocks/vsc/arrays.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -// tslint:disable:all +/* eslint-disable */ export namespace vscMockArrays { /** diff --git a/src/test/mocks/vsc/charCode.ts b/src/test/mocks/vsc/charCode.ts index b13bc31658d..1f0ca240448 100644 --- a/src/test/mocks/vsc/charCode.ts +++ b/src/test/mocks/vsc/charCode.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -/* tslint:disable */ +/* eslint-disable */ // Names from https://blog.codinghorror.com/ascii-pronunciation-rules-for-programmers/ diff --git a/src/test/mocks/vsc/extHostedTypes.ts b/src/test/mocks/vsc/extHostedTypes.ts index fc8f77279b6..9426d5391a5 100644 --- a/src/test/mocks/vsc/extHostedTypes.ts +++ b/src/test/mocks/vsc/extHostedTypes.ts @@ -6,7 +6,7 @@ // import * as crypto from 'crypto'; -// tslint:disable:all +/* eslint-disable */ import { relative } from 'path'; import * as vscode from 'vscode'; @@ -39,7 +39,7 @@ export namespace vscMockExtHostedTypes { pathToRelative(from: string, to: string): string; } - // tslint:disable:all + /* eslint-disable */ const illegalArgument = (msg = 'Illegal Argument') => new Error(msg); export class Disposable { diff --git a/src/test/mocks/vsc/htmlContent.ts b/src/test/mocks/vsc/htmlContent.ts index 61d3c7b7b99..2601418eadd 100644 --- a/src/test/mocks/vsc/htmlContent.ts +++ b/src/test/mocks/vsc/htmlContent.ts @@ -6,7 +6,7 @@ 'use strict'; import { vscMockArrays } from './arrays'; -// tslint:disable:all +/* eslint-disable */ export namespace vscMockHtmlContent { export interface IMarkdownString { diff --git a/src/test/mocks/vsc/index.ts b/src/test/mocks/vsc/index.ts index 6db5dabb7b9..4ab61d36a66 100644 --- a/src/test/mocks/vsc/index.ts +++ b/src/test/mocks/vsc/index.ts @@ -3,7 +3,7 @@ 'use strict'; -// tslint:disable:no-invalid-this no-require-imports no-var-requires no-any max-classes-per-file +/* eslint-disable no-invalid-this, @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires, @typescript-eslint/no-explicit-any, max-classes-per-file */ import { EventEmitter as NodeEventEmitter } from 'events'; import * as vscode from 'vscode'; @@ -275,7 +275,7 @@ export namespace vscMock { } } - // tslint:disable-next-line: interface-name + // eslint-disable-next-line @typescript-eslint/naming-convention export interface DebugAdapterExecutableOptions { env?: { [key: string]: string }; cwd?: string; diff --git a/src/test/mocks/vsc/position.ts b/src/test/mocks/vsc/position.ts index b3dff6149f3..bb4f7f07c79 100644 --- a/src/test/mocks/vsc/position.ts +++ b/src/test/mocks/vsc/position.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -// tslint:disable:all +/* eslint-disable */ export namespace vscMockPosition { /** * A position in the editor. This interface is suitable for serialization. diff --git a/src/test/mocks/vsc/range.ts b/src/test/mocks/vsc/range.ts index c2667e2ce9b..e4974b64e31 100644 --- a/src/test/mocks/vsc/range.ts +++ b/src/test/mocks/vsc/range.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -// tslint:disable:all +/* eslint-disable */ import { vscMockPosition } from './position'; export namespace vscMockRange { diff --git a/src/test/mocks/vsc/selection.ts b/src/test/mocks/vsc/selection.ts index 9e82b905f7c..5e578a78fed 100644 --- a/src/test/mocks/vsc/selection.ts +++ b/src/test/mocks/vsc/selection.ts @@ -3,7 +3,7 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ 'use strict'; -// tslint:disable:all +/* eslint-disable */ import { vscMockPosition } from './position'; import { vscMockRange } from './range'; export namespace vscMockSelection { diff --git a/src/test/mocks/vsc/strings.ts b/src/test/mocks/vsc/strings.ts index a1feac2d266..4658bee6323 100644 --- a/src/test/mocks/vsc/strings.ts +++ b/src/test/mocks/vsc/strings.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -// tslint:disable:all +/* eslint-disable */ export namespace vscMockStrings { /** diff --git a/src/test/mocks/vsc/telemetryReporter.ts b/src/test/mocks/vsc/telemetryReporter.ts index d0250eb1cf5..0fbc82b36ae 100644 --- a/src/test/mocks/vsc/telemetryReporter.ts +++ b/src/test/mocks/vsc/telemetryReporter.ts @@ -3,7 +3,7 @@ 'use strict'; -// tslint:disable:all +/* eslint-disable */ export class vscMockTelemetryReporter { constructor() { // diff --git a/src/test/mocks/vsc/uri.ts b/src/test/mocks/vsc/uri.ts index aa5f38a2555..42a6766d83a 100644 --- a/src/test/mocks/vsc/uri.ts +++ b/src/test/mocks/vsc/uri.ts @@ -4,7 +4,7 @@ *--------------------------------------------------------------------------------------------*/ 'use strict'; -/* tslint:disable */ +/* eslint-disable */ import { CharCode } from './charCode'; import * as path from 'path'; @@ -78,7 +78,7 @@ export namespace vscUri { return scheme || _empty; } if (!scheme) { - // tslint:disable-next-line: no-console + // eslint-disable-next-line no-console console.trace('BAD uri lacks scheme, falling back to file-scheme.'); scheme = 'file'; } @@ -123,7 +123,7 @@ export namespace vscUri { * / \ / \ * urn:example:animal:ferret:nose */ - // tslint:disable-next-line: no-use-before-declare + // eslint-disable-next-line @typescript-eslint/no-use-before-define export class URI implements UriComponents { static isUri(thing: any): thing is URI { if (thing instanceof URI) { @@ -461,7 +461,7 @@ export namespace vscUri { const _pathSepMarker = isWindows ? 1 : undefined; - // tslint:disable-next-line:class-name + // eslint-disable-next-line @typescript-eslint/naming-convention class _URI extends URI { _formatted: string | null = null; _fsPath: string | null = null; diff --git a/src/test/mocks/vsc/uuid.ts b/src/test/mocks/vsc/uuid.ts index 2ddb9848144..17dbf5b0d30 100644 --- a/src/test/mocks/vsc/uuid.ts +++ b/src/test/mocks/vsc/uuid.ts @@ -5,7 +5,7 @@ /** * Represents a UUID as defined by rfc4122. */ -// tslint:disable-next-line: interface-name +// eslint-disable-next-line @typescript-eslint/naming-convention export interface UUID { /** * @returns the canonical representation in sets of hexadecimal numbers separated by dashes. @@ -29,7 +29,7 @@ class V4UUID extends ValueUUID { private static readonly _timeHighBits = ['8', '9', 'a', 'b']; private static _oneOf(array: string[]): string { - // tslint:disable:insecure-random + /* eslint-disable */ return array[Math.floor(array.length * Math.random())]; } @@ -37,7 +37,7 @@ class V4UUID extends ValueUUID { return V4UUID._oneOf(V4UUID._chars); } - // tslint:disable-next-line: member-ordering + // eslint-disable-next-line @typescript-eslint/member-ordering constructor() { super( [ diff --git a/src/test/performance/load.perf.vscode.test.ts b/src/test/performance/load.perf.vscode.test.ts index 3d2a808c473..b04c9000cad 100644 --- a/src/test/performance/load.perf.vscode.test.ts +++ b/src/test/performance/load.perf.vscode.test.ts @@ -3,7 +3,7 @@ 'use strict'; -// tslint:disable:no-invalid-this no-console +/* eslint-disable no-invalid-this, no-console */ import { expect } from 'chai'; import * as fs from 'fs-extra'; @@ -37,7 +37,7 @@ suite('Activation Times', () => { await fs.appendFile(logFile, `${elapsedTime}${EOL}`, { encoding: 'utf8' }); console.log(`Loaded in ${elapsedTime}ms`); } - commands.executeCommand('workbench.action.reloadWindow'); + await commands.executeCommand('workbench.action.reloadWindow'); }); } diff --git a/src/test/performanceTest.ts b/src/test/performanceTest.ts index ef3ff9e042d..a0c34eab382 100644 --- a/src/test/performanceTest.ts +++ b/src/test/performanceTest.ts @@ -12,7 +12,7 @@ This block of code merely launches the tests by using either the dev or release and spawning the tests (mimic user starting tests from command line), this way we can run tests multiple times. */ -// tslint:disable:no-console no-require-imports no-var-requires +/* eslint-disable no-console, @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires */ // Must always be on top to setup expected env. process.env.VSC_JUPYTER_PERF_TEST = '1'; @@ -135,7 +135,7 @@ class TestRunner { } private async getDevVersion(): Promise { - // tslint:disable-next-line:non-literal-require + // eslint-disable-next-line return require(path.join(EXTENSION_ROOT_DIR, 'package.json')).version; } diff --git a/src/test/serviceRegistry.ts b/src/test/serviceRegistry.ts index 9af5e936730..f8d69a12abd 100644 --- a/src/test/serviceRegistry.ts +++ b/src/test/serviceRegistry.ts @@ -149,7 +149,7 @@ export class IocContainer { if (!disposable) { continue; } - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const promise = disposable.dispose() as Promise; if (promise) { await promise; diff --git a/src/test/smoke/datascience.smoke.test.ts b/src/test/smoke/datascience.smoke.test.ts index fd1a1be237d..d975bdc4b9c 100644 --- a/src/test/smoke/datascience.smoke.test.ts +++ b/src/test/smoke/datascience.smoke.test.ts @@ -4,7 +4,7 @@ 'use strict'; import { assert } from 'chai'; -// tslint:disable:max-func-body-length no-invalid-this no-any +/* eslint-disable , no-invalid-this, @typescript-eslint/no-explicit-any */ import * as fs from 'fs-extra'; import * as path from 'path'; diff --git a/src/test/smokeTest.ts b/src/test/smokeTest.ts index 135d536fbd7..b9ac3c88478 100644 --- a/src/test/smokeTest.ts +++ b/src/test/smokeTest.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// tslint:disable:no-console no-require-imports no-var-requires +/* eslint-disable no-console, @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires */ // Must always be on top to setup expected env. process.env.VSC_JUPYTER_SMOKE_TEST = '1'; diff --git a/src/test/standardTest.ts b/src/test/standardTest.ts index 7d8a0f91737..1dea59e191e 100644 --- a/src/test/standardTest.ts +++ b/src/test/standardTest.ts @@ -1,4 +1,4 @@ -// tslint:disable:no-console +/* eslint-disable no-console */ import { spawnSync } from 'child_process'; import * as path from 'path'; diff --git a/src/test/telemetry/importTracker.unit.test.ts b/src/test/telemetry/importTracker.unit.test.ts index 3cf0bfdb4fa..1b3eed0de82 100644 --- a/src/test/telemetry/importTracker.unit.test.ts +++ b/src/test/telemetry/importTracker.unit.test.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. 'use strict'; -//tslint:disable:max-func-body-length match-default-export-name no-any no-multiline-string no-trailing-whitespace +/* eslint-disable , , @typescript-eslint/no-explicit-any, no-multi-str, no-trailing-spaces */ import { expect } from 'chai'; import rewiremock from 'rewiremock'; import * as TypeMoq from 'typemoq'; @@ -17,7 +17,7 @@ import { createDocument } from '../datascience/editor-integration/helpers'; suite('Import Tracker', () => { const oldValueOfVSC_JUPYTER_UNIT_TEST = process.env.VSC_JUPYTER_UNIT_TEST; const oldValueOfVSC_JUPYTER_CI_TEST = process.env.VSC_JUPYTER_CI_TEST; - // tslint:disable-next-line:no-require-imports + // eslint-disable-next-line @typescript-eslint/no-require-imports const hashJs = require('hash.js'); let importTracker: ImportTracker; let documentManager: TypeMoq.IMock; diff --git a/src/test/telemetry/index.unit.test.ts b/src/test/telemetry/index.unit.test.ts index 6d595ddb63f..333acd69aae 100644 --- a/src/test/telemetry/index.unit.test.ts +++ b/src/test/telemetry/index.unit.test.ts @@ -2,7 +2,7 @@ // Licensed under the MIT License. 'use strict'; -//tslint:disable:max-func-body-length match-default-export-name no-any +/* eslint-disable , , @typescript-eslint/no-explicit-any */ import { expect } from 'chai'; import rewiremock from 'rewiremock'; import * as TypeMoq from 'typemoq'; @@ -100,7 +100,7 @@ suite('Telemetry', () => { const properties = { hello: 'world', foo: 'bar' }; const measures = { start: 123, end: 987 }; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any sendTelemetryEvent(eventName as any, measures, properties as any); expect(Reporter.eventName).to.deep.equal([eventName]); @@ -130,7 +130,7 @@ suite('Telemetry', () => { setSharedProperty('one' as any, 'two' as any); - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any sendTelemetryEvent(eventName as any, measures, properties as any); expect(Reporter.eventName).to.deep.equal([eventName]); @@ -148,7 +148,7 @@ suite('Telemetry', () => { setSharedProperty('foo' as any, 'baz' as any); - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any sendTelemetryEvent(eventName as any, measures, properties as any); expect(Reporter.eventName).to.deep.equal([eventName]); @@ -164,7 +164,7 @@ suite('Telemetry', () => { const properties = { hello: 'world', foo: 'bar' }; const measures = { start: 123, end: 987 }; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any sendTelemetryEvent(eventName as any, measures, properties as any, error); const expectedErrorProperties = { @@ -208,7 +208,7 @@ suite('Telemetry', () => { const properties = { hello: 'world', foo: 'bar' }; const measures = { start: 123, end: 987 }; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any sendTelemetryEvent(eventName as any, measures, properties as any, error); const expectedErrorProperties = { diff --git a/src/test/testBootstrap.ts b/src/test/testBootstrap.ts index 2cc97b2a9c5..0cb71374602 100644 --- a/src/test/testBootstrap.ts +++ b/src/test/testBootstrap.ts @@ -13,7 +13,7 @@ import { initializeLogger } from './testLogger'; initializeLogger(); -// tslint:disable: no-console +/* eslint-disable no-console */ /* This is a simple work around for tests tasks not completing on CI. diff --git a/src/test/testLogger.ts b/src/test/testLogger.ts index 83683f6d80d..b93d51d38ba 100644 --- a/src/test/testLogger.ts +++ b/src/test/testLogger.ts @@ -39,7 +39,7 @@ function monkeypatchConsole() { error: LogLevel.Error, warn: LogLevel.Warn }; - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const consoleAny: any = console; for (const stream of streams) { // Using symbols guarantee the properties will be unique & prevents @@ -47,7 +47,7 @@ function monkeypatchConsole() { // We could use a closure but it's a bit trickier. const sym = Symbol.for(stream); consoleAny[sym] = consoleAny[stream]; - // tslint:disable-next-line: no-function-expression + // eslint-disable-next-line consoleAny[stream] = function () { const args = Array.prototype.slice.call(arguments); const fn = consoleAny[sym]; diff --git a/src/test/testRunner.ts b/src/test/testRunner.ts index 12788f9c93d..7a0fc29b77a 100644 --- a/src/test/testRunner.ts +++ b/src/test/testRunner.ts @@ -1,7 +1,7 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -// tslint:disable:no-require-imports no-var-requires import-name no-function-expression no-any prefer-template no-console no-var-self +/* eslint-disable @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires, , , @typescript-eslint/no-explicit-any, prefer-template, no-console */ // Most of the source is in node_modules/vscode/lib/testrunner.js 'use strict'; diff --git a/src/test/testing/serviceRegistry.ts b/src/test/testing/serviceRegistry.ts index 502cd94b6c1..38898225b28 100644 --- a/src/test/testing/serviceRegistry.ts +++ b/src/test/testing/serviceRegistry.ts @@ -22,9 +22,6 @@ import { getPythonSemVer } from '../common'; import { IocContainer } from '../serviceRegistry'; export class UnitTestIocContainer extends IocContainer { - constructor() { - super(); - } public async getPythonMajorVersion(resource: Uri): Promise { const procServiceFactory = this.serviceContainer.get(IProcessServiceFactory); const procService = await procServiceFactory.create(resource); diff --git a/src/test/tslint.json b/src/test/tslint.json deleted file mode 100644 index 6a36cd946d6..00000000000 --- a/src/test/tslint.json +++ /dev/null @@ -1,6 +0,0 @@ -{ - "rules": { - "no-any": false, - "no-console": false - } -} diff --git a/src/test/unittests.ts b/src/test/unittests.ts index f49cf38cfdc..36944591bdf 100644 --- a/src/test/unittests.ts +++ b/src/test/unittests.ts @@ -11,12 +11,12 @@ import { setupCoverage } from './coverage'; if (os.platform() === 'win32') { const proc = child_process.spawn('C:\\Windows\\System32\\Reg.exe', ['/?']); proc.on('error', () => { - // tslint:disable-next-line: no-console + // eslint-disable-next-line no-console console.error('error during reg.exe'); }); } -// tslint:disable:no-any no-require-imports no-var-requires +/* eslint-disable @typescript-eslint/no-explicit-any, @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires */ if ((Reflect as any).metadata === undefined) { require('reflect-metadata'); } diff --git a/src/test/utils/enum.ts b/src/test/utils/enum.ts index 0520f535587..421ade743ef 100644 --- a/src/test/utils/enum.ts +++ b/src/test/utils/enum.ts @@ -3,7 +3,7 @@ 'use strict'; -// tslint:disable:no-any +/* eslint-disable @typescript-eslint/no-explicit-any */ export function getNamesAndValues(e: any): { name: string; value: T }[] { return getNames(e).map((n) => ({ name: n, value: e[n] })); diff --git a/src/test/utils/fs.ts b/src/test/utils/fs.ts index f92ffbfd91c..6fe809388d5 100644 --- a/src/test/utils/fs.ts +++ b/src/test/utils/fs.ts @@ -9,7 +9,7 @@ export function createTemporaryFile( extension: string, temporaryDirectory?: string ): Promise<{ filePath: string; cleanupCallback: Function }> { - // tslint:disable-next-line:no-any + // eslint-disable-next-line @typescript-eslint/no-explicit-any const options: any = { postfix: extension }; if (temporaryDirectory) { options.dir = temporaryDirectory; diff --git a/src/test/vscode-mock.ts b/src/test/vscode-mock.ts index 95fd27ea1a9..e10a2771637 100644 --- a/src/test/vscode-mock.ts +++ b/src/test/vscode-mock.ts @@ -3,7 +3,7 @@ 'use strict'; -// tslint:disable:no-invalid-this no-require-imports no-var-requires no-any +/* eslint-disable no-invalid-this, @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires, @typescript-eslint/no-explicit-any */ import * as TypeMoq from 'typemoq'; import * as vscode from 'vscode'; diff --git a/tslint.json b/tslint.json deleted file mode 100644 index e8d3db286c7..00000000000 --- a/tslint.json +++ /dev/null @@ -1,58 +0,0 @@ -{ - "rulesDirectory": ["./build/tslint-rules"], - "linterOptions": { - "exclude": ["src/ipywidgets"] - }, - "extends": ["tslint-eslint-rules", "tslint-microsoft-contrib", "tslint-plugin-prettier", "tslint-config-prettier"], - "rules": { - "prettier": true, - "no-single-line-block-comment": false, - "messages-must-be-localized": true, - "no-unused-expression": true, - "no-duplicate-variable": true, - "curly": true, - "non-literal-fs-path": false, - "newline-per-chained-call": false, - "class-name": true, - "semicolon": [true, "always", "strict-bound-class-methods"], - "triple-equals": true, - "no-relative-imports": false, - "max-line-length": false, - "max-func-body-length": false, - "typedef": false, - "no-string-throw": true, - "missing-jsdoc": false, - "one-line": [true, "check-catch", "check-finally", "check-else"], - "no-parameter-properties": false, - "no-parameter-reassignment": false, - "no-reserved-keywords": false, - "newline-before-return": false, - "export-name": false, - "align": false, - "linebreak-style": false, - "strict-boolean-expressions": false, - "await-promise": [true, "Thenable", "PromiseLike"], - "completed-docs": false, - "no-unsafe-any": false, - "no-backbone-get-set-outside-model": false, - "underscore-consistent-invocation": false, - "no-void-expression": false, - "no-non-null-assertion": false, - "prefer-type-cast": false, - "promise-function-async": false, - "function-name": false, - "variable-name": false, - "no-import-side-effect": false, - "no-string-based-set-timeout": false, - "no-floating-promises": true, - "no-empty-interface": false, - "no-bitwise": false, - "eofline": true, - "switch-final-break": false, - "no-implicit-dependencies": ["vscode"], - "no-unnecessary-type-assertion": false, - "no-submodule-imports": false, - "no-redundant-jsdoc": false, - "binary-expression-operand-order": false - } -} diff --git a/typings/dom.fix.rx.compiler.d.ts b/typings/dom.fix.rx.compiler.d.ts index 64ced316158..4072b03f664 100644 --- a/typings/dom.fix.rx.compiler.d.ts +++ b/typings/dom.fix.rx.compiler.d.ts @@ -6,7 +6,7 @@ * Another solution is to add the 'dom' lib to tsconfig, but that's even worse. * We don't need dom, as the extension does nothing with the dom (dom = HTML entities and the like). */ -// tslint:disable: interface-name +/* eslint-disable @typescript-eslint/naming-convention */ interface EventTarget { } interface NodeList { } interface HTMLCollection { } diff --git a/typings/extensions.d.ts b/typings/extensions.d.ts index 4a423f329d5..2075478e923 100644 --- a/typings/extensions.d.ts +++ b/typings/extensions.d.ts @@ -8,7 +8,7 @@ */ // https://stackoverflow.com/questions/39877156/how-to-extend-string-prototype-and-use-it-next-in-typescript -// tslint:disable-next-line:interface-name +// eslint-disable-next-line @typescript-eslint/naming-convention declare interface String { /** * Split a string using the cr and lf characters and return them as an array. @@ -38,7 +38,7 @@ declare interface String { trimQuotes(): string; } -// tslint:disable-next-line:interface-name +// eslint-disable-next-line @typescript-eslint/naming-convention declare interface Promise { /** * Catches task errors and ignores them.