diff --git a/.eslintignore b/.eslintignore deleted file mode 100644 index a3a6e01b0ad6..000000000000 --- a/.eslintignore +++ /dev/null @@ -1,254 +0,0 @@ -pythonExtensionApi/out/ - -# The following files were grandfathered out of eslint. They can be removed as time permits. - -src/test/analysisEngineTest.ts -src/test/ciConstants.ts -src/test/common.ts -src/test/constants.ts -src/test/core.ts -src/test/extension-version.functional.test.ts -src/test/fixtures.ts -src/test/index.ts -src/test/initialize.ts -src/test/mockClasses.ts -src/test/performanceTest.ts -src/test/proc.ts -src/test/smokeTest.ts -src/test/standardTest.ts -src/test/startupTelemetry.unit.test.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/interpreters/mocks.ts -src/test/interpreters/virtualEnvs/condaInheritEnvPrompt.unit.test.ts -src/test/interpreters/pythonPathUpdaterFactory.unit.test.ts -src/test/interpreters/activation/service.unit.test.ts -src/test/interpreters/helpers.unit.test.ts -src/test/interpreters/display.unit.test.ts - -src/test/terminals/codeExecution/terminalCodeExec.unit.test.ts -src/test/terminals/codeExecution/codeExecutionManager.unit.test.ts -src/test/terminals/codeExecution/djangoShellCodeExect.unit.test.ts - -src/test/activation/activeResource.unit.test.ts -src/test/activation/extensionSurvey.unit.test.ts - -src/test/utils/fs.ts - -src/test/api.functional.test.ts - -src/test/testing/common/debugLauncher.unit.test.ts -src/test/testing/common/services/configSettingService.unit.test.ts - -src/test/common/exitCIAfterTestReporter.ts - - -src/test/common/terminals/activator/index.unit.test.ts -src/test/common/terminals/activator/base.unit.test.ts -src/test/common/terminals/shellDetector.unit.test.ts -src/test/common/terminals/service.unit.test.ts -src/test/common/terminals/helper.unit.test.ts -src/test/common/terminals/activation.unit.test.ts -src/test/common/terminals/shellDetectors/shellDetectors.unit.test.ts -src/test/common/terminals/environmentActivationProviders/terminalActivation.testvirtualenvs.ts - -src/test/common/socketStream.test.ts - -src/test/common/configSettings.test.ts - -src/test/common/experiments/telemetry.unit.test.ts - -src/test/common/platform/filesystem.unit.test.ts -src/test/common/platform/errors.unit.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/filesystem.functional.test.ts -src/test/common/platform/filesystem.test.ts - -src/test/common/utils/cacheUtils.unit.test.ts -src/test/common/utils/decorators.unit.test.ts -src/test/common/utils/version.unit.test.ts - -src/test/common/configSettings/configSettings.unit.test.ts -src/test/common/serviceRegistry.unit.test.ts -src/test/common/extensions.unit.test.ts -src/test/common/variables/envVarsService.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/pipInstaller.unit.test.ts -src/test/common/installer/pipEnvInstaller.unit.test.ts - -src/test/common/socketCallbackHandler.test.ts - -src/test/common/process/decoder.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/logger.unit.test.ts -src/test/common/process/proc.exec.test.ts -src/test/common/process/pythonProcess.unit.test.ts -src/test/common/process/proc.unit.test.ts - -src/test/common/interpreterPathService.unit.test.ts - - - -src/test/debugger/extension/adapter/adapter.test.ts -src/test/debugger/extension/adapter/outdatedDebuggerPrompt.unit.test.ts -src/test/debugger/extension/adapter/factory.unit.test.ts -src/test/debugger/extension/adapter/logging.unit.test.ts -src/test/debugger/extension/hooks/childProcessAttachHandler.unit.test.ts -src/test/debugger/extension/hooks/childProcessAttachService.unit.test.ts -src/test/debugger/utils.ts -src/test/debugger/envVars.test.ts - -src/test/telemetry/index.unit.test.ts -src/test/telemetry/envFileTelemetry.unit.test.ts - -src/test/application/diagnostics/checks/macPythonInterpreter.unit.test.ts -src/test/application/diagnostics/checks/pythonInterpreter.unit.test.ts -src/test/application/diagnostics/checks/powerShellActivation.unit.test.ts -src/test/application/diagnostics/checks/envPathVariable.unit.test.ts -src/test/application/diagnostics/applicationDiagnostics.unit.test.ts -src/test/application/diagnostics/promptHandler.unit.test.ts -src/test/application/diagnostics/commands/ignore.unit.test.ts - -src/test/performance/load.perf.test.ts - -src/client/interpreter/configuration/interpreterSelector/commands/base.ts -src/client/interpreter/configuration/interpreterSelector/commands/resetInterpreter.ts -src/client/interpreter/configuration/pythonPathUpdaterServiceFactory.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/helpers.ts -src/client/interpreter/virtualEnvs/condaInheritEnvPrompt.ts -src/client/interpreter/display/index.ts - -src/client/extension.ts -src/client/startupTelemetry.ts - -src/client/terminals/codeExecution/terminalCodeExecution.ts -src/client/terminals/codeExecution/codeExecutionManager.ts -src/client/terminals/codeExecution/djangoContext.ts - -src/client/activation/commands.ts -src/client/activation/progress.ts -src/client/activation/extensionSurvey.ts -src/client/activation/common/analysisOptions.ts -src/client/activation/languageClientMiddleware.ts - - -src/client/testing/serviceRegistry.ts -src/client/testing/main.ts -src/client/testing/configurationFactory.ts -src/client/testing/common/constants.ts -src/client/testing/common/testUtils.ts - -src/client/common/helpers.ts -src/client/common/net/browser.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/contextKey.ts -src/client/common/experiments/telemetry.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/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/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/utils/decorators.ts -src/client/common/utils/enum.ts -src/client/common/utils/platform.ts -src/client/common/utils/stopWatch.ts -src/client/common/utils/random.ts -src/client/common/utils/sysTypes.ts -src/client/common/utils/misc.ts -src/client/common/utils/cacheUtils.ts -src/client/common/utils/workerPool.ts -src/client/common/extensions.ts -src/client/common/variables/serviceRegistry.ts -src/client/common/variables/environment.ts -src/client/common/variables/types.ts -src/client/common/variables/systemVariables.ts -src/client/common/cancellation.ts -src/client/common/interpreterPathService.ts -src/client/common/application/applicationShell.ts -src/client/common/application/languageService.ts -src/client/common/application/clipboard.ts -src/client/common/application/workspace.ts -src/client/common/application/debugSessionTelemetry.ts -src/client/common/application/documentManager.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/installer/serviceRegistry.ts -src/client/common/installer/channelManager.ts -src/client/common/installer/moduleInstaller.ts -src/client/common/installer/types.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/pythonToolService.ts -src/client/common/process/internal/python.ts -src/client/common/process/internal/scripts/testing_tools.ts -src/client/common/process/types.ts -src/client/common/process/logger.ts -src/client/common/process/pythonProcess.ts -src/client/common/process/pythonEnvironment.ts -src/client/common/process/decoder.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/activator.ts -src/client/debugger/extension/adapter/logging.ts -src/client/debugger/extension/hooks/eventHandlerDispatcher.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/psProcessParser.ts -src/client/debugger/extension/attachQuickPick/picker.ts - -src/client/application/serviceRegistry.ts -src/client/application/diagnostics/base.ts -src/client/application/diagnostics/applicationDiagnostics.ts -src/client/application/diagnostics/filter.ts -src/client/application/diagnostics/promptHandler.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/launchBrowser.ts - diff --git a/.eslintrc b/.eslintrc deleted file mode 100644 index 3535797eb92c..000000000000 --- a/.eslintrc +++ /dev/null @@ -1,107 +0,0 @@ -{ - "env": { - "node": true, - "es6": true, - "mocha": true - }, - "parser": "@typescript-eslint/parser", - "plugins": [ - "@typescript-eslint", - "no-only-tests" - ], - "extends": [ - "plugin:@typescript-eslint/recommended", - "plugin:import/errors", - "plugin:import/warnings", - "plugin:import/typescript", - "prettier" - ], - "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": "error", - "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", - { - "args": "after-used", - "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 - "class-methods-use-this": ["error", { "exceptMethods": ["dispose"] }], - "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-shadow": "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", - "strict": "off", - "no-only-tests/no-only-tests": ["error", { "block": ["test", "suite"], "focus": ["only"] }], - "prefer-const": "off", - "import/no-named-as-default-member": "off" - } -}