From eaf776717318fb9275c06d6c6064e8966706606c Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Tue, 2 Apr 2024 10:19:16 -0700 Subject: [PATCH 1/2] Update dprint and fix config --- .dprint.jsonc | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.dprint.jsonc b/.dprint.jsonc index 375cc8b2b1f65..a1669df7cc3a8 100644 --- a/.dprint.jsonc +++ b/.dprint.jsonc @@ -19,7 +19,7 @@ "arrowFunction.useParentheses": "preferNone", "conditionalExpression.linePerExpression": false, // Keep our "match/case"-ish conditionals. "functionExpression.spaceAfterFunctionKeyword": true, - "importDeclaration.forceMultiLine": true, + "importDeclaration.forceMultiLine": "always", "constructorType.spaceAfterNewKeyword": true, "constructSignature.spaceAfterNewKeyword": true, @@ -57,8 +57,8 @@ ], // Note: if adding new languages, make sure settings.template.json is updated too. "plugins": [ - "https://plugins.dprint.dev/typescript-0.88.9.wasm", - "https://plugins.dprint.dev/json-0.19.1.wasm", - "https://plugins.dprint.dev/prettier-0.35.0.json@0df49c4d878bb1051af2fa1d1f69ba6400f4b78633f49baa1f38954a6fd32b40" + "https://plugins.dprint.dev/typescript-0.90.0.wasm", + "https://plugins.dprint.dev/json-0.19.2.wasm", + "https://plugins.dprint.dev/prettier-0.39.0.json@896b70f29ef8213c1b0ba81a93cee9c2d4f39ac2194040313cd433906db7bc7c" ] } From 585db258f58160b41edca1c1daf43cfcb9bb2bbf Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Tue, 2 Apr 2024 10:19:32 -0700 Subject: [PATCH 2/2] Only force newlines in imports when more than one named import --- .dprint.jsonc | 2 +- Herebyfile.mjs | 20 ++++--------- scripts/browserIntegrationTest.mjs | 8 ++---- scripts/build/findUpDir.mjs | 4 +-- scripts/build/projects.mjs | 8 ++---- scripts/build/tests.mjs | 4 +-- scripts/build/utils.mjs | 8 ++---- scripts/checkModuleFormat.mjs | 8 ++---- scripts/configurePrerelease.mjs | 4 +-- scripts/dtsBundler.mjs | 4 +-- scripts/errorCheck.mjs | 4 +-- scripts/find-unused-diganostic-messages.mjs | 12 ++------ .../generateLocalizedDiagnosticMessages.mjs | 4 +-- scripts/link-hooks.mjs | 4 +-- scripts/post-vsts-artifact-comment.mjs | 4 +-- scripts/produceLKG.mjs | 8 ++---- src/compiler/performanceCore.ts | 4 +-- .../5.0/identifierProperties.ts | 4 +-- src/deprecatedCompat/deprecations.ts | 4 +-- src/harness/client.ts | 4 +-- src/harness/findUpDir.ts | 4 +-- src/harness/fourslashImpl.ts | 4 +-- src/harness/harnessLanguageService.ts | 16 +++-------- src/harness/projectServiceStateLogger.ts | 4 +-- src/harness/sourceMapRecorder.ts | 4 +-- src/harness/tsserverLogger.ts | 4 +-- src/jsTyping/jsTyping.ts | 4 +-- src/jsTyping/shared.ts | 4 +-- src/server/packageJsonCache.ts | 4 +-- src/server/scriptVersionCache.ts | 4 +-- src/services/codefixes/helpers.ts | 4 +-- src/services/completions.ts | 4 +-- src/services/formatting/formattingContext.ts | 4 +-- src/services/formatting/rule.ts | 4 +-- src/services/goToDefinition.ts | 4 +-- src/services/refactorProvider.ts | 4 +-- .../convertOverloadListToSingleSignature.ts | 4 +-- .../convertParamsToDestructuredObject.ts | 4 +-- .../convertStringOrTemplateLiteral.ts | 4 +-- src/services/refactors/moveToFile.ts | 8 ++---- src/services/stringCompletions.ts | 4 +-- src/testRunner/parallel/shared.ts | 4 +-- src/testRunner/unittests/canWatch.ts | 4 +-- .../unittests/config/commandLineParsing.ts | 4 +-- .../config/configurationExtension.ts | 4 +-- .../config/convertCompilerOptionsFromJson.ts | 8 ++---- .../config/convertTypeAcquisitionFromJson.ts | 8 ++---- src/testRunner/unittests/config/matchFiles.ts | 8 ++---- .../unittests/config/tsconfigParsing.ts | 8 ++---- .../config/tsconfigParsingWatchOptions.ts | 8 ++---- src/testRunner/unittests/debugDeprecation.ts | 4 +-- .../unittests/evaluation/esDecorators.ts | 4 +-- .../evaluation/esDecoratorsMetadata.ts | 4 +-- .../unittests/helpers/alternateResult.ts | 16 +++-------- src/testRunner/unittests/helpers/baseline.ts | 12 ++------ src/testRunner/unittests/helpers/contents.ts | 4 +-- .../helpers/demoProjectReferences.ts | 12 ++------ src/testRunner/unittests/helpers/extends.ts | 8 ++---- .../unittests/helpers/libraryResolution.ts | 12 ++------ .../unittests/helpers/noEmitOnError.ts | 12 ++------ .../helpers/sampleProjectReferences.ts | 12 ++------ .../unittests/helpers/solutionBuilder.ts | 8 ++---- .../unittests/helpers/transitiveReferences.ts | 12 ++------ src/testRunner/unittests/helpers/tsc.ts | 4 +-- src/testRunner/unittests/helpers/tscWatch.ts | 8 ++---- src/testRunner/unittests/helpers/tsserver.ts | 12 ++------ .../unittests/helpers/typingsInstaller.ts | 12 ++------ src/testRunner/unittests/helpers/vfs.ts | 8 ++---- .../helpers/virtualFileSystemWithWatch.ts | 8 ++---- src/testRunner/unittests/moduleResolution.ts | 4 +-- src/testRunner/unittests/programApi.ts | 4 +-- .../unittests/services/extract/functions.ts | 4 +-- .../unittests/services/extract/helpers.ts | 12 ++------ .../unittests/services/extract/ranges.ts | 4 +-- .../unittests/services/languageService.ts | 8 ++---- .../unittests/services/preProcessFile.ts | 4 +-- .../unittests/services/textChanges.ts | 4 +-- .../unittests/sys/symlinkWatching.ts | 4 +-- .../unittests/tsbuild/amdModulesWithOut.ts | 12 ++------ src/testRunner/unittests/tsbuild/clean.ts | 12 ++------ .../unittests/tsbuild/commandLine.ts | 8 ++---- .../unittests/tsbuild/configFileErrors.ts | 8 ++---- .../unittests/tsbuild/configFileExtends.ts | 12 ++------ .../tsbuild/containerOnlyReferenced.ts | 4 +-- .../unittests/tsbuild/declarationEmit.ts | 20 ++++--------- src/testRunner/unittests/tsbuild/demo.ts | 8 ++---- .../unittests/tsbuild/emitDeclarationOnly.ts | 12 ++------ .../unittests/tsbuild/emptyFiles.ts | 12 ++------ .../unittests/tsbuild/exitCodeOnBogusFile.ts | 8 ++---- src/testRunner/unittests/tsbuild/extends.ts | 8 ++---- .../unittests/tsbuild/fileDelete.ts | 20 ++++--------- .../unittests/tsbuild/graphOrdering.ts | 4 +-- .../inferredTypeFromTransitiveModule.ts | 12 ++------ .../tsbuild/javascriptProjectEmit.ts | 12 ++------ .../unittests/tsbuild/lateBoundSymbol.ts | 12 ++------ .../unittests/tsbuild/libraryResolution.ts | 8 ++---- .../unittests/tsbuild/moduleResolution.ts | 12 ++------ .../unittests/tsbuild/moduleSpecifiers.ts | 16 +++-------- src/testRunner/unittests/tsbuild/noEmit.ts | 8 ++---- .../unittests/tsbuild/noEmitOnError.ts | 4 +-- src/testRunner/unittests/tsbuild/outFile.ts | 12 ++------ .../unittests/tsbuild/outputPaths.ts | 8 ++---- src/testRunner/unittests/tsbuild/publicApi.ts | 8 ++---- .../tsbuild/referencesWithRootDirInParent.ts | 12 ++------ .../unittests/tsbuild/resolveJsonModule.ts | 12 ++------ src/testRunner/unittests/tsbuild/roots.ts | 16 +++-------- src/testRunner/unittests/tsbuild/sample.ts | 8 ++---- .../unittests/tsbuild/transitiveReferences.ts | 20 ++++--------- .../tsbuildWatch/configFileErrors.ts | 12 ++------ src/testRunner/unittests/tsbuildWatch/demo.ts | 8 ++---- .../tsbuildWatch/libraryResolution.ts | 8 ++---- .../tsbuildWatch/moduleResolution.ts | 12 ++------ .../unittests/tsbuildWatch/noEmit.ts | 12 ++------ .../unittests/tsbuildWatch/noEmitOnError.ts | 4 +-- .../unittests/tsbuildWatch/programUpdates.ts | 8 ++---- .../tsbuildWatch/projectsBuilding.ts | 4 +-- .../unittests/tsbuildWatch/publicApi.ts | 4 +-- .../unittests/tsbuildWatch/reexport.ts | 16 +++-------- .../tsbuildWatch/watchEnvironment.ts | 4 +-- .../unittests/tsc/cancellationToken.ts | 4 +-- src/testRunner/unittests/tsc/composite.ts | 8 ++---- .../unittests/tsc/declarationEmit.ts | 8 ++---- src/testRunner/unittests/tsc/extends.ts | 8 ++---- .../tsc/forceConsistentCasingInFileNames.ts | 8 ++---- src/testRunner/unittests/tsc/incremental.ts | 8 ++---- .../unittests/tsc/libraryResolution.ts | 4 +-- src/testRunner/unittests/tsc/listFilesOnly.ts | 4 +-- .../unittests/tsc/moduleResolution.ts | 28 +++++-------------- .../unittests/tsc/projectReferences.ts | 12 ++------ .../unittests/tsc/projectReferencesConfig.ts | 12 ++------ src/testRunner/unittests/tsc/redirect.ts | 12 ++------ .../unittests/tsc/runWithoutArgs.ts | 8 ++---- .../unittests/tscWatch/consoleClearing.ts | 4 +-- src/testRunner/unittests/tscWatch/emit.ts | 4 +-- .../unittests/tscWatch/emitAndErrorUpdates.ts | 12 ++------ src/testRunner/unittests/tscWatch/extends.ts | 8 ++---- .../forceConsistentCasingInFileNames.ts | 4 +-- .../unittests/tscWatch/incremental.ts | 12 ++------ .../unittests/tscWatch/libraryResolution.ts | 4 +-- .../unittests/tscWatch/moduleResolution.ts | 8 ++---- .../unittests/tscWatch/nodeNextWatch.ts | 8 ++---- .../unittests/tscWatch/programUpdates.ts | 12 ++------ .../tscWatch/projectsWithReferences.ts | 20 ++++--------- .../unittests/tscWatch/resolutionCache.ts | 8 ++---- .../resolveJsonModuleWithIncremental.ts | 8 ++---- .../sourceOfProjectReferenceRedirect.ts | 16 +++-------- src/testRunner/unittests/tscWatch/watchApi.ts | 16 +++-------- .../unittests/tscWatch/watchEnvironment.ts | 4 +-- .../unittests/tsserver/autoImportProvider.ts | 4 +-- .../unittests/tsserver/auxiliaryProject.ts | 8 ++---- .../tsserver/cachingFileSystemInformation.ts | 12 ++------ .../unittests/tsserver/cancellationToken.ts | 8 ++---- src/testRunner/unittests/tsserver/codeFix.ts | 4 +-- .../unittests/tsserver/compileOnSave.ts | 4 +-- .../unittests/tsserver/completions.ts | 4 +-- .../unittests/tsserver/configuredProjects.ts | 8 ++---- .../unittests/tsserver/declarationFileMaps.ts | 4 +-- .../unittests/tsserver/documentRegistry.ts | 8 ++---- .../unittests/tsserver/duplicatePackages.ts | 4 +-- .../tsserver/events/largeFileReferenced.ts | 4 +-- .../events/projectLanguageServiceState.ts | 4 +-- .../tsserver/events/projectLoading.ts | 4 +-- .../events/projectUpdatedInBackground.ts | 4 +-- .../unittests/tsserver/exportMapCache.ts | 4 +-- src/testRunner/unittests/tsserver/extends.ts | 4 +-- .../unittests/tsserver/externalProjects.ts | 4 +-- .../unittests/tsserver/findAllReferences.ts | 4 +-- .../forceConsistentCasingInFileNames.ts | 8 ++---- .../unittests/tsserver/formatSettings.ts | 8 ++---- .../tsserver/getEditsForFileRename.ts | 4 +-- .../getMoveToRefactoringFileSuggestions.ts | 4 +-- .../unittests/tsserver/goToDefinition.ts | 4 +-- .../unittests/tsserver/importHelpers.ts | 4 +-- .../tsserver/inconsistentErrorInEditor.ts | 4 +-- .../unittests/tsserver/inferredProjects.ts | 12 ++------ .../unittests/tsserver/languageService.ts | 4 +-- .../unittests/tsserver/libraryResolution.ts | 8 ++---- .../tsserver/maxNodeModuleJsDepth.ts | 4 +-- .../unittests/tsserver/metadataInResponse.ts | 4 +-- .../unittests/tsserver/moduleResolution.ts | 16 +++-------- .../tsserver/moduleSpecifierCache.ts | 4 +-- src/testRunner/unittests/tsserver/navTo.ts | 4 +-- .../unittests/tsserver/packageJsonInfo.ts | 4 +-- src/testRunner/unittests/tsserver/plugins.ts | 4 +-- .../unittests/tsserver/pluginsAsync.ts | 4 +-- .../unittests/tsserver/projectErrors.ts | 4 +-- .../tsserver/projectReferenceCompileOnSave.ts | 8 ++---- .../tsserver/projectReferenceErrors.ts | 8 ++---- .../unittests/tsserver/projectReferences.ts | 12 ++------ .../tsserver/projectReferencesSourcemap.ts | 4 +-- src/testRunner/unittests/tsserver/projects.ts | 12 ++------ .../tsserver/projectsWithReferences.ts | 8 ++---- .../unittests/tsserver/reloadProjects.ts | 4 +-- src/testRunner/unittests/tsserver/rename.ts | 12 ++------ .../unittests/tsserver/resolutionCache.ts | 8 ++---- src/testRunner/unittests/tsserver/session.ts | 8 ++---- .../unittests/tsserver/skipLibCheck.ts | 8 ++---- src/testRunner/unittests/tsserver/symLinks.ts | 8 ++---- .../unittests/tsserver/telemetry.ts | 4 +-- .../unittests/tsserver/textStorage.ts | 4 +-- .../unittests/tsserver/typeAquisition.ts | 8 ++---- .../tsserver/typeReferenceDirectives.ts | 4 +-- .../unittests/tsserver/typingsInstaller.ts | 8 ++---- .../unittests/tsserver/watchEnvironment.ts | 4 +-- src/tsserver/server.ts | 8 ++---- 205 files changed, 385 insertions(+), 1153 deletions(-) diff --git a/.dprint.jsonc b/.dprint.jsonc index a1669df7cc3a8..35ce92c54f403 100644 --- a/.dprint.jsonc +++ b/.dprint.jsonc @@ -19,7 +19,7 @@ "arrowFunction.useParentheses": "preferNone", "conditionalExpression.linePerExpression": false, // Keep our "match/case"-ish conditionals. "functionExpression.spaceAfterFunctionKeyword": true, - "importDeclaration.forceMultiLine": "always", + "importDeclaration.forceMultiLine": "whenMultiple", "constructorType.spaceAfterNewKeyword": true, "constructSignature.spaceAfterNewKeyword": true, diff --git a/Herebyfile.mjs b/Herebyfile.mjs index fd5e48752b568..10598bd1e65ab 100644 --- a/Herebyfile.mjs +++ b/Herebyfile.mjs @@ -1,26 +1,16 @@ // @ts-check -import { - CancelToken, -} from "@esfx/canceltoken"; +import { CancelToken } from "@esfx/canceltoken"; import assert from "assert"; import chalk from "chalk"; import chokidar from "chokidar"; import esbuild from "esbuild"; -import { - EventEmitter, -} from "events"; +import { EventEmitter } from "events"; import fs from "fs"; -import { - glob, -} from "glob"; -import { - task, -} from "hereby"; +import { glob } from "glob"; +import { task } from "hereby"; import path from "path"; -import { - localizationDirectories, -} from "./scripts/build/localization.mjs"; +import { localizationDirectories } from "./scripts/build/localization.mjs"; import cmdLineOptions from "./scripts/build/options.mjs"; import { buildProject, diff --git a/scripts/browserIntegrationTest.mjs b/scripts/browserIntegrationTest.mjs index 1571abed88351..f1fab43f2213c 100644 --- a/scripts/browserIntegrationTest.mjs +++ b/scripts/browserIntegrationTest.mjs @@ -1,10 +1,6 @@ import chalk from "chalk"; -import { - readFileSync, -} from "fs"; -import { - join, -} from "path"; +import { readFileSync } from "fs"; +import { join } from "path"; import playwright from "playwright"; // Turning this on will leave the Chromium browser open, giving you the diff --git a/scripts/build/findUpDir.mjs b/scripts/build/findUpDir.mjs index 44bbc658beda5..7ee1544a56b14 100644 --- a/scripts/build/findUpDir.mjs +++ b/scripts/build/findUpDir.mjs @@ -1,6 +1,4 @@ -import { - existsSync, -} from "fs"; +import { existsSync } from "fs"; import { dirname, join, diff --git a/scripts/build/projects.mjs b/scripts/build/projects.mjs index 70e25766672c0..c2daf1c1d1742 100644 --- a/scripts/build/projects.mjs +++ b/scripts/build/projects.mjs @@ -1,10 +1,6 @@ -import { - resolve, -} from "path"; +import { resolve } from "path"; -import { - findUpRoot, -} from "./findUpDir.mjs"; +import { findUpRoot } from "./findUpDir.mjs"; import cmdLineOptions from "./options.mjs"; import { Debouncer, diff --git a/scripts/build/tests.mjs b/scripts/build/tests.mjs index af7d401ddc20f..d247694dcb314 100644 --- a/scripts/build/tests.mjs +++ b/scripts/build/tests.mjs @@ -1,6 +1,4 @@ -import { - CancelError, -} from "@esfx/canceltoken"; +import { CancelError } from "@esfx/canceltoken"; import chalk from "chalk"; import fs from "fs"; import os from "os"; diff --git a/scripts/build/utils.mjs b/scripts/build/utils.mjs index 35f8ca6356879..aec939861bf79 100644 --- a/scripts/build/utils.mjs +++ b/scripts/build/utils.mjs @@ -1,11 +1,7 @@ -import { - CancelError, -} from "@esfx/canceltoken"; +import { CancelError } from "@esfx/canceltoken"; import assert from "assert"; import chalk from "chalk"; -import { - spawn, -} from "child_process"; +import { spawn } from "child_process"; import fs from "fs"; import JSONC from "jsonc-parser"; import which from "which"; diff --git a/scripts/checkModuleFormat.mjs b/scripts/checkModuleFormat.mjs index 3991969472245..ed33b5fb00382 100644 --- a/scripts/checkModuleFormat.mjs +++ b/scripts/checkModuleFormat.mjs @@ -1,13 +1,9 @@ -import { - createRequire, -} from "module"; +import { createRequire } from "module"; import { __importDefault, __importStar, } from "tslib"; -import { - pathToFileURL, -} from "url"; +import { pathToFileURL } from "url"; // This script tests that TypeScript's CJS API is structured // as expected. It calls "require" as though it were in CWD, diff --git a/scripts/configurePrerelease.mjs b/scripts/configurePrerelease.mjs index de0d48f0f657e..32ad59ece0aec 100644 --- a/scripts/configurePrerelease.mjs +++ b/scripts/configurePrerelease.mjs @@ -1,7 +1,5 @@ import assert from "assert"; -import { - execFileSync, -} from "child_process"; +import { execFileSync } from "child_process"; import { readFileSync, writeFileSync, diff --git a/scripts/dtsBundler.mjs b/scripts/dtsBundler.mjs index e76cad1655316..e7ace12303e1d 100644 --- a/scripts/dtsBundler.mjs +++ b/scripts/dtsBundler.mjs @@ -5,9 +5,7 @@ * bundle as namespaces again, even though the project is modules. */ -import assert, { - fail, -} from "assert"; +import assert, { fail } from "assert"; import cp from "child_process"; import fs from "fs"; import minimist from "minimist"; diff --git a/scripts/errorCheck.mjs b/scripts/errorCheck.mjs index 164f056fef0e6..e7068a13fcec3 100644 --- a/scripts/errorCheck.mjs +++ b/scripts/errorCheck.mjs @@ -1,8 +1,6 @@ import fs from "fs"; import fsPromises from "fs/promises"; -import { - glob, -} from "glob"; +import { glob } from "glob"; async function checkErrorBaselines() { const data = await fsPromises.readFile("src/compiler/diagnosticMessages.json", "utf-8"); diff --git a/scripts/find-unused-diganostic-messages.mjs b/scripts/find-unused-diganostic-messages.mjs index b4aff5913b437..ad116ef5a5325 100644 --- a/scripts/find-unused-diganostic-messages.mjs +++ b/scripts/find-unused-diganostic-messages.mjs @@ -1,15 +1,9 @@ // This file requires a modern version of node 14+, and grep to be available. // node scripts/find-unused-diagnostic-messages.mjs -import { - execSync, -} from "child_process"; -import { - readFileSync, -} from "fs"; -import { - EOL, -} from "os"; +import { execSync } from "child_process"; +import { readFileSync } from "fs"; +import { EOL } from "os"; const diags = readFileSync("src/compiler/diagnosticInformationMap.generated.ts", "utf8"); const startOfDiags = diags.split("export const Diagnostics")[1]; diff --git a/scripts/generateLocalizedDiagnosticMessages.mjs b/scripts/generateLocalizedDiagnosticMessages.mjs index 72b3e7febcf6f..531c0702bfa42 100644 --- a/scripts/generateLocalizedDiagnosticMessages.mjs +++ b/scripts/generateLocalizedDiagnosticMessages.mjs @@ -1,6 +1,4 @@ -import { - XMLParser, -} from "fast-xml-parser"; +import { XMLParser } from "fast-xml-parser"; import fs from "fs"; import path from "path"; diff --git a/scripts/link-hooks.mjs b/scripts/link-hooks.mjs index 61c39d242a398..05e1bfc0ddb9a 100644 --- a/scripts/link-hooks.mjs +++ b/scripts/link-hooks.mjs @@ -2,9 +2,7 @@ import fs from "fs"; import path from "path"; import url from "url"; -import { - findUpRoot, -} from "./build/findUpDir.mjs"; +import { findUpRoot } from "./build/findUpDir.mjs"; const __filename = url.fileURLToPath(new URL(import.meta.url)); const __dirname = path.dirname(__filename); diff --git a/scripts/post-vsts-artifact-comment.mjs b/scripts/post-vsts-artifact-comment.mjs index 31ddd3f6ed418..fc62527650ea7 100644 --- a/scripts/post-vsts-artifact-comment.mjs +++ b/scripts/post-vsts-artifact-comment.mjs @@ -1,6 +1,4 @@ -import { - Octokit, -} from "@octokit/rest"; +import { Octokit } from "@octokit/rest"; import assert from "assert"; import ado from "azure-devops-node-api"; import fetch from "node-fetch"; diff --git a/scripts/produceLKG.mjs b/scripts/produceLKG.mjs index 47630c43db5f8..3a71e99011312 100644 --- a/scripts/produceLKG.mjs +++ b/scripts/produceLKG.mjs @@ -1,13 +1,9 @@ import fs from "fs"; -import { - glob, -} from "glob"; +import { glob } from "glob"; import path from "path"; import url from "url"; -import { - localizationDirectories, -} from "./build/localization.mjs"; +import { localizationDirectories } from "./build/localization.mjs"; const __filename = url.fileURLToPath(new URL(import.meta.url)); const __dirname = path.dirname(__filename); diff --git a/src/compiler/performanceCore.ts b/src/compiler/performanceCore.ts index e788836d11866..9493115ea1ed3 100644 --- a/src/compiler/performanceCore.ts +++ b/src/compiler/performanceCore.ts @@ -1,6 +1,4 @@ -import { - isNodeLikeSystem, -} from "./_namespaces/ts"; +import { isNodeLikeSystem } from "./_namespaces/ts"; // The following definitions provide the minimum compatible support for the Web Performance User Timings API // between browsers and NodeJS: diff --git a/src/deprecatedCompat/5.0/identifierProperties.ts b/src/deprecatedCompat/5.0/identifierProperties.ts index 2815b22775df3..d75ef8ef1a8bc 100644 --- a/src/deprecatedCompat/5.0/identifierProperties.ts +++ b/src/deprecatedCompat/5.0/identifierProperties.ts @@ -5,9 +5,7 @@ import { identifierToKeywordKind, NodeFlags, } from "../_namespaces/ts"; -import { - deprecate, -} from "../deprecate"; +import { deprecate } from "../deprecate"; declare module "../../compiler/types" { export interface Identifier { diff --git a/src/deprecatedCompat/deprecations.ts b/src/deprecatedCompat/deprecations.ts index 84310b22a55c2..23dd903c44428 100644 --- a/src/deprecatedCompat/deprecations.ts +++ b/src/deprecatedCompat/deprecations.ts @@ -3,9 +3,7 @@ import { UnionToIntersection, Version, } from "./_namespaces/ts"; -import { - deprecate, -} from "./deprecate"; +import { deprecate } from "./deprecate"; /** @internal */ export interface DeprecationOptions { diff --git a/src/harness/client.ts b/src/harness/client.ts index a10c41604c720..cc138546174e5 100644 --- a/src/harness/client.ts +++ b/src/harness/client.ts @@ -74,9 +74,7 @@ import { TodoCommentDescriptor, UserPreferences, } from "./_namespaces/ts"; -import { - protocol, -} from "./_namespaces/ts.server"; +import { protocol } from "./_namespaces/ts.server"; export interface SessionClientHost extends LanguageServiceHost { writeMessage(message: string): void; diff --git a/src/harness/findUpDir.ts b/src/harness/findUpDir.ts index 4cbd0f8638827..20b1afe414ece 100644 --- a/src/harness/findUpDir.ts +++ b/src/harness/findUpDir.ts @@ -1,6 +1,4 @@ -import { - existsSync, -} from "fs"; +import { existsSync } from "fs"; import { dirname, join, diff --git a/src/harness/fourslashImpl.ts b/src/harness/fourslashImpl.ts index 08698bf8b2721..fc544bc2e0e6d 100644 --- a/src/harness/fourslashImpl.ts +++ b/src/harness/fourslashImpl.ts @@ -5,9 +5,7 @@ import * as ts from "./_namespaces/ts"; import * as Utils from "./_namespaces/Utils"; import * as vfs from "./_namespaces/vfs"; import * as vpath from "./_namespaces/vpath"; -import { - LoggerWithInMemoryLogs, -} from "./tsserverLogger"; +import { LoggerWithInMemoryLogs } from "./tsserverLogger"; import ArrayOrSingle = FourSlashInterface.ArrayOrSingle; diff --git a/src/harness/harnessLanguageService.ts b/src/harness/harnessLanguageService.ts index 122a102fff449..6f755bc02f918 100644 --- a/src/harness/harnessLanguageService.ts +++ b/src/harness/harnessLanguageService.ts @@ -6,25 +6,17 @@ import { virtualFileSystemRoot, } from "./_namespaces/Harness"; import * as ts from "./_namespaces/ts"; -import { - getNewLineCharacter, -} from "./_namespaces/ts"; +import { getNewLineCharacter } from "./_namespaces/ts"; import * as vfs from "./_namespaces/vfs"; import * as vpath from "./_namespaces/vpath"; -import { - incrementalVerifier, -} from "./incrementalUtils"; -import { - patchServiceForStateBaseline, -} from "./projectServiceStateLogger"; +import { incrementalVerifier } from "./incrementalUtils"; +import { patchServiceForStateBaseline } from "./projectServiceStateLogger"; import { createLoggerWithInMemoryLogs, HarnessLSCouldNotResolveModule, LoggerWithInMemoryLogs, } from "./tsserverLogger"; -import { - createWatchUtils, -} from "./watchUtils"; +import { createWatchUtils } from "./watchUtils"; export function makeDefaultProxy(info: ts.server.PluginCreateInfo): ts.LanguageService { const proxy = Object.create(/*o*/ null); // eslint-disable-line no-null/no-null diff --git a/src/harness/projectServiceStateLogger.ts b/src/harness/projectServiceStateLogger.ts index fb332bab8389f..cff377dcb9186 100644 --- a/src/harness/projectServiceStateLogger.ts +++ b/src/harness/projectServiceStateLogger.ts @@ -23,9 +23,7 @@ import { SourceMapFileWatcher, TextStorage, } from "./_namespaces/ts.server"; -import { - LoggerWithInMemoryLogs, -} from "./tsserverLogger"; +import { LoggerWithInMemoryLogs } from "./tsserverLogger"; interface ProjectData { projectStateVersion: Project["projectStateVersion"]; diff --git a/src/harness/sourceMapRecorder.ts b/src/harness/sourceMapRecorder.ts index 9f0a906ed3218..4110c8032ad2b 100644 --- a/src/harness/sourceMapRecorder.ts +++ b/src/harness/sourceMapRecorder.ts @@ -1,7 +1,5 @@ import * as documents from "./_namespaces/documents"; -import { - Compiler, -} from "./_namespaces/Harness"; +import { Compiler } from "./_namespaces/Harness"; import * as ts from "./_namespaces/ts"; import * as Utils from "./_namespaces/Utils"; diff --git a/src/harness/tsserverLogger.ts b/src/harness/tsserverLogger.ts index 32042bdd404a8..670eef9996256 100644 --- a/src/harness/tsserverLogger.ts +++ b/src/harness/tsserverLogger.ts @@ -1,7 +1,5 @@ import * as ts from "./_namespaces/ts"; -import { - Compiler, -} from "./harnessIO"; +import { Compiler } from "./harnessIO"; export const HarnessLSCouldNotResolveModule = "HarnessLanguageService:: Could not resolve module"; diff --git a/src/jsTyping/jsTyping.ts b/src/jsTyping/jsTyping.ts index 7416918ef8782..1f81cca4ad7ad 100644 --- a/src/jsTyping/jsTyping.ts +++ b/src/jsTyping/jsTyping.ts @@ -30,9 +30,7 @@ import { Version, versionMajorMinor, } from "./_namespaces/ts"; -import { - stringifyIndented, -} from "./_namespaces/ts.server"; +import { stringifyIndented } from "./_namespaces/ts.server"; export interface TypingResolutionHost { directoryExists(path: string): boolean; diff --git a/src/jsTyping/shared.ts b/src/jsTyping/shared.ts index ef3320091895b..ab163bccbc34e 100644 --- a/src/jsTyping/shared.ts +++ b/src/jsTyping/shared.ts @@ -1,6 +1,4 @@ -import { - sys, -} from "./_namespaces/ts"; +import { sys } from "./_namespaces/ts"; export type ActionSet = "action::set"; export type ActionInvalidate = "action::invalidate"; diff --git a/src/server/packageJsonCache.ts b/src/server/packageJsonCache.ts index 0baab10ac44a8..522bf0933d16e 100644 --- a/src/server/packageJsonCache.ts +++ b/src/server/packageJsonCache.ts @@ -9,9 +9,7 @@ import { Ternary, tryFileExists, } from "./_namespaces/ts"; -import { - ProjectService, -} from "./_namespaces/ts.server"; +import { ProjectService } from "./_namespaces/ts.server"; /** @internal */ export interface PackageJsonCache { diff --git a/src/server/scriptVersionCache.ts b/src/server/scriptVersionCache.ts index 28449179243cf..e06c943aed1c5 100644 --- a/src/server/scriptVersionCache.ts +++ b/src/server/scriptVersionCache.ts @@ -9,9 +9,7 @@ import { TextSpan, unchangedTextChangeRange, } from "./_namespaces/ts"; -import { - emptyArray, -} from "./_namespaces/ts.server"; +import { emptyArray } from "./_namespaces/ts.server"; import * as protocol from "./protocol"; const lineCollectionCapacity = 4; diff --git a/src/services/codefixes/helpers.ts b/src/services/codefixes/helpers.ts index 5e6dd79755636..ee01e0f00a4b3 100644 --- a/src/services/codefixes/helpers.ts +++ b/src/services/codefixes/helpers.ts @@ -111,9 +111,7 @@ import { visitNode, visitNodes, } from "../_namespaces/ts"; -import { - ImportAdder, -} from "../_namespaces/ts.codefix"; +import { ImportAdder } from "../_namespaces/ts.codefix"; /** * Finds members of the resolved type that are missing in the class pointed to by class decl diff --git a/src/services/completions.ts b/src/services/completions.ts index bd8c13bf76717..2a3e3126dd1f5 100644 --- a/src/services/completions.ts +++ b/src/services/completions.ts @@ -389,9 +389,7 @@ import { VariableDeclaration, walkUpParenthesizedExpressions, } from "./_namespaces/ts"; -import { - StringCompletions, -} from "./_namespaces/ts.Completions"; +import { StringCompletions } from "./_namespaces/ts.Completions"; // Exported only for tests /** @internal */ diff --git a/src/services/formatting/formattingContext.ts b/src/services/formatting/formattingContext.ts index 660f7199ba9eb..be23fe764396b 100644 --- a/src/services/formatting/formattingContext.ts +++ b/src/services/formatting/formattingContext.ts @@ -6,9 +6,7 @@ import { SourceFileLike, SyntaxKind, } from "../_namespaces/ts"; -import { - TextRangeWithKind, -} from "../_namespaces/ts.formatting"; +import { TextRangeWithKind } from "../_namespaces/ts.formatting"; /** @internal */ export const enum FormattingRequestKind { diff --git a/src/services/formatting/rule.ts b/src/services/formatting/rule.ts index 176c0774c2cd4..ba4293102644e 100644 --- a/src/services/formatting/rule.ts +++ b/src/services/formatting/rule.ts @@ -2,9 +2,7 @@ import { emptyArray, SyntaxKind, } from "../_namespaces/ts"; -import { - FormattingContext, -} from "../_namespaces/ts.formatting"; +import { FormattingContext } from "../_namespaces/ts.formatting"; /** @internal */ export interface Rule { diff --git a/src/services/goToDefinition.ts b/src/services/goToDefinition.ts index d3148d5ae60f5..bec35fd70867f 100644 --- a/src/services/goToDefinition.ts +++ b/src/services/goToDefinition.ts @@ -107,9 +107,7 @@ import { TypeReference, unescapeLeadingUnderscores, } from "./_namespaces/ts"; -import { - isContextWithStartAndEndNode, -} from "./_namespaces/ts.FindAllReferences"; +import { isContextWithStartAndEndNode } from "./_namespaces/ts.FindAllReferences"; /** @internal */ export function getDefinitionAtPosition(program: Program, sourceFile: SourceFile, position: number, searchOtherFilesOnly?: boolean, stopAtAlias?: boolean): readonly DefinitionInfo[] | undefined { diff --git a/src/services/refactorProvider.ts b/src/services/refactorProvider.ts index 71759672452b2..368bd8810962e 100644 --- a/src/services/refactorProvider.ts +++ b/src/services/refactorProvider.ts @@ -7,9 +7,7 @@ import { RefactorContext, RefactorEditInfo, } from "./_namespaces/ts"; -import { - refactorKindBeginsWith, -} from "./_namespaces/ts.refactor"; +import { refactorKindBeginsWith } from "./_namespaces/ts.refactor"; // A map with the refactor code as key, the refactor itself as value // e.g. nonSuggestableRefactors[refactorCode] -> the refactor you want diff --git a/src/services/refactors/convertOverloadListToSingleSignature.ts b/src/services/refactors/convertOverloadListToSingleSignature.ts index 6eccdbb06af61..915b59077f8c3 100644 --- a/src/services/refactors/convertOverloadListToSingleSignature.ts +++ b/src/services/refactors/convertOverloadListToSingleSignature.ts @@ -40,9 +40,7 @@ import { textChanges, TupleTypeNode, } from "../_namespaces/ts"; -import { - registerRefactor, -} from "../_namespaces/ts.refactor"; +import { registerRefactor } from "../_namespaces/ts.refactor"; const refactorName = "Convert overload list to single signature"; const refactorDescription = getLocaleSpecificMessage(Diagnostics.Convert_overload_list_to_single_signature); diff --git a/src/services/refactors/convertParamsToDestructuredObject.ts b/src/services/refactors/convertParamsToDestructuredObject.ts index e0d32869e5877..164c725f7a932 100644 --- a/src/services/refactors/convertParamsToDestructuredObject.ts +++ b/src/services/refactors/convertParamsToDestructuredObject.ts @@ -104,9 +104,7 @@ import { TypeNode, VariableDeclaration, } from "../_namespaces/ts"; -import { - registerRefactor, -} from "../_namespaces/ts.refactor"; +import { registerRefactor } from "../_namespaces/ts.refactor"; const refactorName = "Convert parameters to destructured object"; const minimumParameterLength = 1; diff --git a/src/services/refactors/convertStringOrTemplateLiteral.ts b/src/services/refactors/convertStringOrTemplateLiteral.ts index a43121260aab2..cd8fe2ad5032b 100644 --- a/src/services/refactors/convertStringOrTemplateLiteral.ts +++ b/src/services/refactors/convertStringOrTemplateLiteral.ts @@ -37,9 +37,7 @@ import { textChanges, Token, } from "../_namespaces/ts"; -import { - registerRefactor, -} from "../_namespaces/ts.refactor"; +import { registerRefactor } from "../_namespaces/ts.refactor"; const refactorName = "Convert to template string"; const refactorDescription = getLocaleSpecificMessage(Diagnostics.Convert_to_template_string); diff --git a/src/services/refactors/moveToFile.ts b/src/services/refactors/moveToFile.ts index a84da0a381a12..b2a04354e1ad3 100644 --- a/src/services/refactors/moveToFile.ts +++ b/src/services/refactors/moveToFile.ts @@ -1,6 +1,4 @@ -import { - getModuleSpecifier, -} from "../../compiler/moduleSpecifiers"; +import { getModuleSpecifier } from "../../compiler/moduleSpecifiers"; import { AnyImportOrRequireStatement, append, @@ -153,9 +151,7 @@ import { VariableDeclarationList, VariableStatement, } from "../_namespaces/ts"; -import { - registerRefactor, -} from "../refactorProvider"; +import { registerRefactor } from "../refactorProvider"; const refactorNameForMoveToFile = "Move to file"; const description = getLocaleSpecificMessage(Diagnostics.Move_to_file); diff --git a/src/services/stringCompletions.ts b/src/services/stringCompletions.ts index b5115345cd582..4000e227a8682 100644 --- a/src/services/stringCompletions.ts +++ b/src/services/stringCompletions.ts @@ -1,6 +1,4 @@ -import { - getModuleSpecifierPreferences, -} from "../compiler/moduleSpecifiers"; +import { getModuleSpecifierPreferences } from "../compiler/moduleSpecifiers"; import { addToSeen, altDirectorySeparator, diff --git a/src/testRunner/parallel/shared.ts b/src/testRunner/parallel/shared.ts index 880f92f0c8e61..755d353be1f9f 100644 --- a/src/testRunner/parallel/shared.ts +++ b/src/testRunner/parallel/shared.ts @@ -1,6 +1,4 @@ -import { - TestRunnerKind, -} from "../_namespaces/Harness"; +import { TestRunnerKind } from "../_namespaces/Harness"; import * as ts from "../_namespaces/ts"; export interface RunnerTask { diff --git a/src/testRunner/unittests/canWatch.ts b/src/testRunner/unittests/canWatch.ts index e1124af61aced..b84894cbc0622 100644 --- a/src/testRunner/unittests/canWatch.ts +++ b/src/testRunner/unittests/canWatch.ts @@ -1,6 +1,4 @@ -import { - Baseline, -} from "../_namespaces/Harness"; +import { Baseline } from "../_namespaces/Harness"; import * as ts from "../_namespaces/ts"; describe("unittests:: canWatch::", () => { baselineCanWatch( diff --git a/src/testRunner/unittests/config/commandLineParsing.ts b/src/testRunner/unittests/config/commandLineParsing.ts index 2187978de3898..6173663884323 100644 --- a/src/testRunner/unittests/config/commandLineParsing.ts +++ b/src/testRunner/unittests/config/commandLineParsing.ts @@ -1,8 +1,6 @@ import * as Harness from "../../_namespaces/Harness"; import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; describe("unittests:: config:: commandLineParsing:: parseCommandLine", () => { function assertParseResult(subScenario: string, commandLine: string[], workerDiagnostic?: () => ts.ParseCommandLineWorkerDiagnostics) { diff --git a/src/testRunner/unittests/config/configurationExtension.ts b/src/testRunner/unittests/config/configurationExtension.ts index 1d6149bc1a25e..99f2021c16147 100644 --- a/src/testRunner/unittests/config/configurationExtension.ts +++ b/src/testRunner/unittests/config/configurationExtension.ts @@ -2,9 +2,7 @@ import * as fakes from "../../_namespaces/fakes"; import * as Harness from "../../_namespaces/Harness"; import * as ts from "../../_namespaces/ts"; import * as vfs from "../../_namespaces/vfs"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { baselineParseConfig, baselineParseConfigHost, diff --git a/src/testRunner/unittests/config/convertCompilerOptionsFromJson.ts b/src/testRunner/unittests/config/convertCompilerOptionsFromJson.ts index 31d9ff664d315..684484c6c2ce2 100644 --- a/src/testRunner/unittests/config/convertCompilerOptionsFromJson.ts +++ b/src/testRunner/unittests/config/convertCompilerOptionsFromJson.ts @@ -1,11 +1,7 @@ import * as fakes from "../../_namespaces/fakes"; import * as vfs from "../../_namespaces/vfs"; -import { - jsonToReadableText, -} from "../helpers"; -import { - baselineParseConfig, -} from "./helpers"; +import { jsonToReadableText } from "../helpers"; +import { baselineParseConfig } from "./helpers"; describe("unittests:: config:: convertCompilerOptionsFromJson", () => { function baselineCompilerOptions(subScenario: string, json: any, configFileName: string) { diff --git a/src/testRunner/unittests/config/convertTypeAcquisitionFromJson.ts b/src/testRunner/unittests/config/convertTypeAcquisitionFromJson.ts index 22d346a714501..2a0e1f458af1a 100644 --- a/src/testRunner/unittests/config/convertTypeAcquisitionFromJson.ts +++ b/src/testRunner/unittests/config/convertTypeAcquisitionFromJson.ts @@ -1,11 +1,7 @@ import * as fakes from "../../_namespaces/fakes"; import * as vfs from "../../_namespaces/vfs"; -import { - jsonToReadableText, -} from "../helpers"; -import { - baselineParseConfig, -} from "./helpers"; +import { jsonToReadableText } from "../helpers"; +import { baselineParseConfig } from "./helpers"; describe("unittests:: config:: convertTypeAcquisitionFromJson", () => { function baselineTypeAcquisition(subScenario: string, json: any, configFileName: string) { diff --git a/src/testRunner/unittests/config/matchFiles.ts b/src/testRunner/unittests/config/matchFiles.ts index 40fe85fb6ccef..f2359ca9922ea 100644 --- a/src/testRunner/unittests/config/matchFiles.ts +++ b/src/testRunner/unittests/config/matchFiles.ts @@ -1,12 +1,8 @@ import * as fakes from "../../_namespaces/fakes"; import * as ts from "../../_namespaces/ts"; import * as vfs from "../../_namespaces/vfs"; -import { - jsonToReadableText, -} from "../helpers"; -import { - baselineParseConfig, -} from "./helpers"; +import { jsonToReadableText } from "../helpers"; +import { baselineParseConfig } from "./helpers"; const caseInsensitiveBasePath = "c:/dev/"; const caseInsensitiveTsconfigPath = "c:/dev/tsconfig.json"; diff --git a/src/testRunner/unittests/config/tsconfigParsing.ts b/src/testRunner/unittests/config/tsconfigParsing.ts index 1b050c6a20cff..9c1693ac76ac3 100644 --- a/src/testRunner/unittests/config/tsconfigParsing.ts +++ b/src/testRunner/unittests/config/tsconfigParsing.ts @@ -2,12 +2,8 @@ import * as fakes from "../../_namespaces/fakes"; import * as Harness from "../../_namespaces/Harness"; import * as ts from "../../_namespaces/ts"; import * as vfs from "../../_namespaces/vfs"; -import { - jsonToReadableText, -} from "../helpers"; -import { - baselineParseConfig, -} from "./helpers"; +import { jsonToReadableText } from "../helpers"; +import { baselineParseConfig } from "./helpers"; describe("unittests:: config:: tsconfigParsing:: parseConfigFileTextToJson", () => { function formatErrors(errors: readonly ts.Diagnostic[]) { diff --git a/src/testRunner/unittests/config/tsconfigParsingWatchOptions.ts b/src/testRunner/unittests/config/tsconfigParsingWatchOptions.ts index 2df76a14a4083..0474846384905 100644 --- a/src/testRunner/unittests/config/tsconfigParsingWatchOptions.ts +++ b/src/testRunner/unittests/config/tsconfigParsingWatchOptions.ts @@ -1,12 +1,8 @@ import * as fakes from "../../_namespaces/fakes"; import * as ts from "../../_namespaces/ts"; import * as vfs from "../../_namespaces/vfs"; -import { - jsonToReadableText, -} from "../helpers"; -import { - baselineParseConfig, -} from "./helpers"; +import { jsonToReadableText } from "../helpers"; +import { baselineParseConfig } from "./helpers"; describe("unittests:: config:: tsconfigParsingWatchOptions:: parseConfigFileTextToJson", () => { interface VerifyWatchOptions { diff --git a/src/testRunner/unittests/debugDeprecation.ts b/src/testRunner/unittests/debugDeprecation.ts index c40943be0d37b..4019a021bb807 100644 --- a/src/testRunner/unittests/debugDeprecation.ts +++ b/src/testRunner/unittests/debugDeprecation.ts @@ -1,6 +1,4 @@ -import { - deprecate, -} from "../../deprecatedCompat/deprecate"; +import { deprecate } from "../../deprecatedCompat/deprecate"; import * as ts from "../_namespaces/ts"; describe("unittests:: debugDeprecation", () => { diff --git a/src/testRunner/unittests/evaluation/esDecorators.ts b/src/testRunner/unittests/evaluation/esDecorators.ts index 7dcf1e1f33aa7..4443dae958d02 100644 --- a/src/testRunner/unittests/evaluation/esDecorators.ts +++ b/src/testRunner/unittests/evaluation/esDecorators.ts @@ -1,8 +1,6 @@ import * as evaluator from "../../_namespaces/evaluator"; import * as ts from "../../_namespaces/ts"; -import { - ScriptTarget, -} from "../../_namespaces/ts"; +import { ScriptTarget } from "../../_namespaces/ts"; describe("unittests:: evaluation:: esDecorators", () => { const options: ts.CompilerOptions = { target: ts.ScriptTarget.ES2021 }; diff --git a/src/testRunner/unittests/evaluation/esDecoratorsMetadata.ts b/src/testRunner/unittests/evaluation/esDecoratorsMetadata.ts index 1c14cdcab233f..3a5a979d4895d 100644 --- a/src/testRunner/unittests/evaluation/esDecoratorsMetadata.ts +++ b/src/testRunner/unittests/evaluation/esDecoratorsMetadata.ts @@ -1,8 +1,6 @@ import * as evaluator from "../../_namespaces/evaluator"; import * as ts from "../../_namespaces/ts"; -import { - ScriptTarget, -} from "../../_namespaces/ts"; +import { ScriptTarget } from "../../_namespaces/ts"; describe("unittests:: evaluation:: esDecoratorsMetadata", () => { const nodeVersion = new ts.Version(process.versions.node); diff --git a/src/testRunner/unittests/helpers/alternateResult.ts b/src/testRunner/unittests/helpers/alternateResult.ts index e481e70783877..d43e1eb8d68c9 100644 --- a/src/testRunner/unittests/helpers/alternateResult.ts +++ b/src/testRunner/unittests/helpers/alternateResult.ts @@ -1,15 +1,7 @@ -import { - dedent, -} from "../../_namespaces/Utils"; -import { - jsonToReadableText, -} from "../helpers"; -import { - FsContents, -} from "./contents"; -import { - libFile, -} from "./virtualFileSystemWithWatch"; +import { dedent } from "../../_namespaces/Utils"; +import { jsonToReadableText } from "../helpers"; +import { FsContents } from "./contents"; +import { libFile } from "./virtualFileSystemWithWatch"; export function getFsConentsForAlternateResultAtTypesPackageJson(packageName: string, addTypesCondition: boolean) { return jsonToReadableText({ diff --git a/src/testRunner/unittests/helpers/baseline.ts b/src/testRunner/unittests/helpers/baseline.ts index 47da75c4d934e..21cf49ad95b90 100644 --- a/src/testRunner/unittests/helpers/baseline.ts +++ b/src/testRunner/unittests/helpers/baseline.ts @@ -1,15 +1,9 @@ import * as fakes from "../../_namespaces/fakes"; import * as Harness from "../../_namespaces/Harness"; import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; -import { - TscCompileSystem, -} from "./tsc"; -import { - TestServerHost, -} from "./virtualFileSystemWithWatch"; +import { jsonToReadableText } from "../helpers"; +import { TscCompileSystem } from "./tsc"; +import { TestServerHost } from "./virtualFileSystemWithWatch"; export type CommandLineProgram = [ts.Program, ts.BuilderProgram?]; export interface CommandLineCallbacks { diff --git a/src/testRunner/unittests/helpers/contents.ts b/src/testRunner/unittests/helpers/contents.ts index dc5ca993c22ea..c01f55d7d35f3 100644 --- a/src/testRunner/unittests/helpers/contents.ts +++ b/src/testRunner/unittests/helpers/contents.ts @@ -1,7 +1,5 @@ import * as ts from "../../_namespaces/ts"; -import { - libFile, -} from "./virtualFileSystemWithWatch"; +import { libFile } from "./virtualFileSystemWithWatch"; export function compilerOptionsToConfigJson(options: ts.CompilerOptions) { return ts.optionMapToObject(ts.serializeCompilerOptions(options)); diff --git a/src/testRunner/unittests/helpers/demoProjectReferences.ts b/src/testRunner/unittests/helpers/demoProjectReferences.ts index d6bf1741b2e82..7189d5afbe23c 100644 --- a/src/testRunner/unittests/helpers/demoProjectReferences.ts +++ b/src/testRunner/unittests/helpers/demoProjectReferences.ts @@ -1,16 +1,10 @@ -import { - dedent, -} from "../../_namespaces/Utils"; -import { - jsonToReadableText, -} from "../helpers"; +import { dedent } from "../../_namespaces/Utils"; +import { jsonToReadableText } from "../helpers"; import { FsContents, libContent, } from "./contents"; -import { - loadProjectFromFiles, -} from "./vfs"; +import { loadProjectFromFiles } from "./vfs"; import { createWatchedSystem, libFile, diff --git a/src/testRunner/unittests/helpers/extends.ts b/src/testRunner/unittests/helpers/extends.ts index 88768c4cea02f..0ab23e2bf368c 100644 --- a/src/testRunner/unittests/helpers/extends.ts +++ b/src/testRunner/unittests/helpers/extends.ts @@ -1,9 +1,5 @@ -import { - dedent, -} from "../../_namespaces/Utils"; -import { - jsonToReadableText, -} from "../helpers"; +import { dedent } from "../../_namespaces/Utils"; +import { jsonToReadableText } from "../helpers"; import { createServerHost, createWatchedSystem, diff --git a/src/testRunner/unittests/helpers/libraryResolution.ts b/src/testRunner/unittests/helpers/libraryResolution.ts index 983acc1232537..aef17d25f8154 100644 --- a/src/testRunner/unittests/helpers/libraryResolution.ts +++ b/src/testRunner/unittests/helpers/libraryResolution.ts @@ -1,16 +1,10 @@ -import { - dedent, -} from "../../_namespaces/Utils"; -import { - jsonToReadableText, -} from "../helpers"; +import { dedent } from "../../_namespaces/Utils"; +import { jsonToReadableText } from "../helpers"; import { FsContents, libContent, } from "./contents"; -import { - loadProjectFromFiles, -} from "./vfs"; +import { loadProjectFromFiles } from "./vfs"; import { createServerHost, createWatchedSystem, diff --git a/src/testRunner/unittests/helpers/noEmitOnError.ts b/src/testRunner/unittests/helpers/noEmitOnError.ts index 3144319367514..c0fda49bd28eb 100644 --- a/src/testRunner/unittests/helpers/noEmitOnError.ts +++ b/src/testRunner/unittests/helpers/noEmitOnError.ts @@ -1,16 +1,10 @@ -import { - dedent, -} from "../../_namespaces/Utils"; -import { - jsonToReadableText, -} from "../helpers"; +import { dedent } from "../../_namespaces/Utils"; +import { jsonToReadableText } from "../helpers"; import { FsContents, libContent, } from "./contents"; -import { - loadProjectFromFiles, -} from "./vfs"; +import { loadProjectFromFiles } from "./vfs"; import { createWatchedSystem, libFile, diff --git a/src/testRunner/unittests/helpers/sampleProjectReferences.ts b/src/testRunner/unittests/helpers/sampleProjectReferences.ts index a9ff459f43486..7d417940e88cc 100644 --- a/src/testRunner/unittests/helpers/sampleProjectReferences.ts +++ b/src/testRunner/unittests/helpers/sampleProjectReferences.ts @@ -1,16 +1,10 @@ -import { - dedent, -} from "../../_namespaces/Utils"; -import { - jsonToReadableText, -} from "../helpers"; +import { dedent } from "../../_namespaces/Utils"; +import { jsonToReadableText } from "../helpers"; import { FsContents, getProjectConfigWithNodeNext, } from "./contents"; -import { - loadProjectFromFiles, -} from "./vfs"; +import { loadProjectFromFiles } from "./vfs"; import { createServerHost, createWatchedSystem, diff --git a/src/testRunner/unittests/helpers/solutionBuilder.ts b/src/testRunner/unittests/helpers/solutionBuilder.ts index f11cbb9569312..2e18c5b94e363 100644 --- a/src/testRunner/unittests/helpers/solutionBuilder.ts +++ b/src/testRunner/unittests/helpers/solutionBuilder.ts @@ -1,11 +1,7 @@ import * as fakes from "../../_namespaces/fakes"; import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; -import { - commandLineCallbacks, -} from "./baseline"; +import { jsonToReadableText } from "../helpers"; +import { commandLineCallbacks } from "./baseline"; import { makeSystemReadyForBaseline, TscCompileSystem, diff --git a/src/testRunner/unittests/helpers/transitiveReferences.ts b/src/testRunner/unittests/helpers/transitiveReferences.ts index 8a34b6a909942..958371ee25e40 100644 --- a/src/testRunner/unittests/helpers/transitiveReferences.ts +++ b/src/testRunner/unittests/helpers/transitiveReferences.ts @@ -1,17 +1,11 @@ -import { - dedent, -} from "../../_namespaces/Utils"; -import { - jsonToReadableText, -} from "../helpers"; +import { dedent } from "../../_namespaces/Utils"; +import { jsonToReadableText } from "../helpers"; import { FsContents, getProjectConfigWithNodeNext, libContent, } from "./contents"; -import { - libFile, -} from "./virtualFileSystemWithWatch"; +import { libFile } from "./virtualFileSystemWithWatch"; export function getFsContentsForTransitiveReferencesRefsAdts() { return dedent` diff --git a/src/testRunner/unittests/helpers/tsc.ts b/src/testRunner/unittests/helpers/tsc.ts index 166aaca4f151f..1a1c9154e1af3 100644 --- a/src/testRunner/unittests/helpers/tsc.ts +++ b/src/testRunner/unittests/helpers/tsc.ts @@ -2,9 +2,7 @@ import * as fakes from "../../_namespaces/fakes"; import * as Harness from "../../_namespaces/Harness"; import * as ts from "../../_namespaces/ts"; import * as vfs from "../../_namespaces/vfs"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { baselinePrograms, CommandLineCallbacks, diff --git a/src/testRunner/unittests/helpers/tscWatch.ts b/src/testRunner/unittests/helpers/tscWatch.ts index 04e74a2977eb9..94a7acc6c160e 100644 --- a/src/testRunner/unittests/helpers/tscWatch.ts +++ b/src/testRunner/unittests/helpers/tscWatch.ts @@ -2,12 +2,8 @@ import { verifyProgramStructure, verifyResolutionCache, } from "../../../harness/incrementalUtils"; -import { - patchHostForBuildInfoReadWrite, -} from "../../_namespaces/fakes"; -import { - Baseline, -} from "../../_namespaces/Harness"; +import { patchHostForBuildInfoReadWrite } from "../../_namespaces/fakes"; +import { Baseline } from "../../_namespaces/Harness"; import * as ts from "../../_namespaces/ts"; import { baselinePrograms, diff --git a/src/testRunner/unittests/helpers/tsserver.ts b/src/testRunner/unittests/helpers/tsserver.ts index d206ac660283f..7d0667f2416ff 100644 --- a/src/testRunner/unittests/helpers/tsserver.ts +++ b/src/testRunner/unittests/helpers/tsserver.ts @@ -1,18 +1,12 @@ -import { - incrementalVerifier, -} from "../../../harness/incrementalUtils"; -import { - patchServiceForStateBaseline, -} from "../../../harness/projectServiceStateLogger"; +import { incrementalVerifier } from "../../../harness/incrementalUtils"; +import { patchServiceForStateBaseline } from "../../../harness/projectServiceStateLogger"; import { createLoggerWithInMemoryLogs, LoggerWithInMemoryLogs, } from "../../../harness/tsserverLogger"; import * as Harness from "../../_namespaces/Harness"; import * as ts from "../../_namespaces/ts"; -import { - ensureErrorFreeBuild, -} from "./solutionBuilder"; +import { ensureErrorFreeBuild } from "./solutionBuilder"; import { customTypesMap, TestTypingsInstallerAdapter, diff --git a/src/testRunner/unittests/helpers/typingsInstaller.ts b/src/testRunner/unittests/helpers/typingsInstaller.ts index 6c683f2c68f15..a12caae2052b3 100644 --- a/src/testRunner/unittests/helpers/typingsInstaller.ts +++ b/src/testRunner/unittests/helpers/typingsInstaller.ts @@ -3,15 +3,9 @@ import { nowString, } from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; -import { - stringifyIndented, -} from "../../_namespaces/ts.server"; -import { - jsonToReadableText, -} from "../helpers"; -import { - TestSession, -} from "./tsserver"; +import { stringifyIndented } from "../../_namespaces/ts.server"; +import { jsonToReadableText } from "../helpers"; +import { TestSession } from "./tsserver"; import { File, TestServerHost, diff --git a/src/testRunner/unittests/helpers/vfs.ts b/src/testRunner/unittests/helpers/vfs.ts index feb2a973f0974..5b8a264f75fcf 100644 --- a/src/testRunner/unittests/helpers/vfs.ts +++ b/src/testRunner/unittests/helpers/vfs.ts @@ -1,10 +1,6 @@ -import { - getDirectoryPath, -} from "../../_namespaces/ts"; +import { getDirectoryPath } from "../../_namespaces/ts"; import * as vfs from "../../_namespaces/vfs"; -import { - libContent, -} from "./contents"; +import { libContent } from "./contents"; export interface FsOptions { libContentToAppend?: string; diff --git a/src/testRunner/unittests/helpers/virtualFileSystemWithWatch.ts b/src/testRunner/unittests/helpers/virtualFileSystemWithWatch.ts index 356b6d67f1f16..c5e10c486c7d8 100644 --- a/src/testRunner/unittests/helpers/virtualFileSystemWithWatch.ts +++ b/src/testRunner/unittests/helpers/virtualFileSystemWithWatch.ts @@ -44,12 +44,8 @@ import { sys, toPath, } from "../../_namespaces/ts"; -import { - typingsInstaller, -} from "../../_namespaces/ts.server"; -import { - timeIncrements, -} from "../../_namespaces/vfs"; +import { typingsInstaller } from "../../_namespaces/ts.server"; +import { timeIncrements } from "../../_namespaces/vfs"; export const libFile: File = { path: "/a/lib/lib.d.ts", diff --git a/src/testRunner/unittests/moduleResolution.ts b/src/testRunner/unittests/moduleResolution.ts index f4afa5184efad..addcd9481dac3 100644 --- a/src/testRunner/unittests/moduleResolution.ts +++ b/src/testRunner/unittests/moduleResolution.ts @@ -1,8 +1,6 @@ import * as Harness from "../_namespaces/Harness"; import * as ts from "../_namespaces/ts"; -import { - jsonToReadableText, -} from "./helpers"; +import { jsonToReadableText } from "./helpers"; interface File { name: string; diff --git a/src/testRunner/unittests/programApi.ts b/src/testRunner/unittests/programApi.ts index 325dcba56652d..fe129d78a9ade 100644 --- a/src/testRunner/unittests/programApi.ts +++ b/src/testRunner/unittests/programApi.ts @@ -3,9 +3,7 @@ import * as fakes from "../_namespaces/fakes"; import * as Harness from "../_namespaces/Harness"; import * as ts from "../_namespaces/ts"; import * as vfs from "../_namespaces/vfs"; -import { - jsonToReadableText, -} from "./helpers"; +import { jsonToReadableText } from "./helpers"; function verifyMissingFilePaths(missing: ReturnType, expected: readonly string[]) { assert.isDefined(missing); diff --git a/src/testRunner/unittests/services/extract/functions.ts b/src/testRunner/unittests/services/extract/functions.ts index 359b2d98241d8..58df9dc87823f 100644 --- a/src/testRunner/unittests/services/extract/functions.ts +++ b/src/testRunner/unittests/services/extract/functions.ts @@ -1,7 +1,5 @@ import * as ts from "../../../_namespaces/ts"; -import { - testExtractSymbol, -} from "./helpers"; +import { testExtractSymbol } from "./helpers"; describe("unittests:: services:: extract:: extractFunctions", () => { testExtractFunction( diff --git a/src/testRunner/unittests/services/extract/helpers.ts b/src/testRunner/unittests/services/extract/helpers.ts index 5f5c8b141973c..c3065e0a0d558 100644 --- a/src/testRunner/unittests/services/extract/helpers.ts +++ b/src/testRunner/unittests/services/extract/helpers.ts @@ -1,14 +1,8 @@ -import { - incrementalVerifier, -} from "../../../../harness/incrementalUtils"; -import { - createHasErrorMessageLogger, -} from "../../../../harness/tsserverLogger"; +import { incrementalVerifier } from "../../../../harness/incrementalUtils"; +import { createHasErrorMessageLogger } from "../../../../harness/tsserverLogger"; import * as Harness from "../../../_namespaces/Harness"; import * as ts from "../../../_namespaces/ts"; -import { - customTypesMap, -} from "../../helpers/typingsInstaller"; +import { customTypesMap } from "../../helpers/typingsInstaller"; import { createServerHost, libFile, diff --git a/src/testRunner/unittests/services/extract/ranges.ts b/src/testRunner/unittests/services/extract/ranges.ts index ce0312d3f1288..b5c2745950333 100644 --- a/src/testRunner/unittests/services/extract/ranges.ts +++ b/src/testRunner/unittests/services/extract/ranges.ts @@ -1,7 +1,5 @@ import * as ts from "../../../_namespaces/ts"; -import { - extractTest, -} from "./helpers"; +import { extractTest } from "./helpers"; function testExtractRangeFailed(caption: string, s: string, expectedErrors: string[]) { return it(caption, () => { diff --git a/src/testRunner/unittests/services/languageService.ts b/src/testRunner/unittests/services/languageService.ts index 96ea65170b63e..9e4e7568bb699 100644 --- a/src/testRunner/unittests/services/languageService.ts +++ b/src/testRunner/unittests/services/languageService.ts @@ -1,11 +1,7 @@ -import { - expect, -} from "chai"; +import { expect } from "chai"; import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { createServerHost, File, diff --git a/src/testRunner/unittests/services/preProcessFile.ts b/src/testRunner/unittests/services/preProcessFile.ts index 05bf0d3db9cef..4f22b123dc79a 100644 --- a/src/testRunner/unittests/services/preProcessFile.ts +++ b/src/testRunner/unittests/services/preProcessFile.ts @@ -1,7 +1,5 @@ import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; describe("unittests:: services:: PreProcessFile:", () => { function test(sourceText: string, readImportFile: boolean, detectJavaScriptImports: boolean, expectedPreProcess: ts.PreProcessedFileInfo): void { diff --git a/src/testRunner/unittests/services/textChanges.ts b/src/testRunner/unittests/services/textChanges.ts index 57b3e206ef283..00ad1d26943d5 100644 --- a/src/testRunner/unittests/services/textChanges.ts +++ b/src/testRunner/unittests/services/textChanges.ts @@ -1,8 +1,6 @@ import * as Harness from "../../_namespaces/Harness"; import * as ts from "../../_namespaces/ts"; -import { - notImplementedHost, -} from "./extract/helpers"; +import { notImplementedHost } from "./extract/helpers"; // Some tests have trailing whitespace diff --git a/src/testRunner/unittests/sys/symlinkWatching.ts b/src/testRunner/unittests/sys/symlinkWatching.ts index f7c2430b9b1f2..6a21dbd6de008 100644 --- a/src/testRunner/unittests/sys/symlinkWatching.ts +++ b/src/testRunner/unittests/sys/symlinkWatching.ts @@ -1,8 +1,6 @@ import * as fs from "fs"; -import { - IO, -} from "../../_namespaces/Harness"; +import { IO } from "../../_namespaces/Harness"; import * as ts from "../../_namespaces/ts"; import { defer, diff --git a/src/testRunner/unittests/tsbuild/amdModulesWithOut.ts b/src/testRunner/unittests/tsbuild/amdModulesWithOut.ts index f370d4edbb200..d4375b95ed0b1 100644 --- a/src/testRunner/unittests/tsbuild/amdModulesWithOut.ts +++ b/src/testRunner/unittests/tsbuild/amdModulesWithOut.ts @@ -1,13 +1,7 @@ -import { - dedent, -} from "../../_namespaces/Utils"; +import { dedent } from "../../_namespaces/Utils"; import * as vfs from "../../_namespaces/vfs"; -import { - jsonToReadableText, -} from "../helpers"; -import { - verifyTsc, -} from "../helpers/tsc"; +import { jsonToReadableText } from "../helpers"; +import { verifyTsc } from "../helpers/tsc"; import { appendText, loadProjectFromFiles, diff --git a/src/testRunner/unittests/tsbuild/clean.ts b/src/testRunner/unittests/tsbuild/clean.ts index 5742fd0bed67b..da33f6c8a7255 100644 --- a/src/testRunner/unittests/tsbuild/clean.ts +++ b/src/testRunner/unittests/tsbuild/clean.ts @@ -1,16 +1,10 @@ -import { - noop, -} from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; +import { noop } from "../../_namespaces/ts"; +import { jsonToReadableText } from "../helpers"; import { noChangeRun, verifyTsc, } from "../helpers/tsc"; -import { - loadProjectFromFiles, -} from "../helpers/vfs"; +import { loadProjectFromFiles } from "../helpers/vfs"; describe("unittests:: tsbuild - clean::", () => { verifyTsc({ diff --git a/src/testRunner/unittests/tsbuild/commandLine.ts b/src/testRunner/unittests/tsbuild/commandLine.ts index 213245d711973..1aa8cdb8daf0b 100644 --- a/src/testRunner/unittests/tsbuild/commandLine.ts +++ b/src/testRunner/unittests/tsbuild/commandLine.ts @@ -1,10 +1,6 @@ import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; -import { - compilerOptionsToConfigJson, -} from "../helpers/contents"; +import { jsonToReadableText } from "../helpers"; +import { compilerOptionsToConfigJson } from "../helpers/contents"; import { noChangeRun, TestTscEdit, diff --git a/src/testRunner/unittests/tsbuild/configFileErrors.ts b/src/testRunner/unittests/tsbuild/configFileErrors.ts index 6e288575ded06..4137e99475750 100644 --- a/src/testRunner/unittests/tsbuild/configFileErrors.ts +++ b/src/testRunner/unittests/tsbuild/configFileErrors.ts @@ -1,9 +1,5 @@ -import { - dedent, -} from "../../_namespaces/Utils"; -import { - jsonToReadableText, -} from "../helpers"; +import { dedent } from "../../_namespaces/Utils"; +import { jsonToReadableText } from "../helpers"; import { noChangeRun, verifyTsc, diff --git a/src/testRunner/unittests/tsbuild/configFileExtends.ts b/src/testRunner/unittests/tsbuild/configFileExtends.ts index 8795137003264..5f396a4296d44 100644 --- a/src/testRunner/unittests/tsbuild/configFileExtends.ts +++ b/src/testRunner/unittests/tsbuild/configFileExtends.ts @@ -1,12 +1,6 @@ -import { - jsonToReadableText, -} from "../helpers"; -import { - verifyTsc, -} from "../helpers/tsc"; -import { - loadProjectFromFiles, -} from "../helpers/vfs"; +import { jsonToReadableText } from "../helpers"; +import { verifyTsc } from "../helpers/tsc"; +import { loadProjectFromFiles } from "../helpers/vfs"; describe("unittests:: tsbuild:: configFileExtends:: when tsconfig extends another config", () => { function getConfigExtendsWithIncludeFs() { diff --git a/src/testRunner/unittests/tsbuild/containerOnlyReferenced.ts b/src/testRunner/unittests/tsbuild/containerOnlyReferenced.ts index 366d72699f717..0f9081be8ea36 100644 --- a/src/testRunner/unittests/tsbuild/containerOnlyReferenced.ts +++ b/src/testRunner/unittests/tsbuild/containerOnlyReferenced.ts @@ -1,6 +1,4 @@ -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { noChangeOnlyRuns, verifyTsc, diff --git a/src/testRunner/unittests/tsbuild/declarationEmit.ts b/src/testRunner/unittests/tsbuild/declarationEmit.ts index 6ccc629bece05..aee908cc055b4 100644 --- a/src/testRunner/unittests/tsbuild/declarationEmit.ts +++ b/src/testRunner/unittests/tsbuild/declarationEmit.ts @@ -1,22 +1,12 @@ -import { - dedent, -} from "../../_namespaces/Utils"; -import { - FileSet, -} from "../../_namespaces/vfs"; -import { - jsonToReadableText, -} from "../helpers"; -import { - libContent, -} from "../helpers/contents"; +import { dedent } from "../../_namespaces/Utils"; +import { FileSet } from "../../_namespaces/vfs"; +import { jsonToReadableText } from "../helpers"; +import { libContent } from "../helpers/contents"; import { noChangeOnlyRuns, verifyTsc, } from "../helpers/tsc"; -import { - loadProjectFromFiles, -} from "../helpers/vfs"; +import { loadProjectFromFiles } from "../helpers/vfs"; describe("unittests:: tsbuild:: declarationEmit", () => { function getFiles(): FileSet { diff --git a/src/testRunner/unittests/tsbuild/demo.ts b/src/testRunner/unittests/tsbuild/demo.ts index 174ccd1ce4883..b486d2ecefe9d 100644 --- a/src/testRunner/unittests/tsbuild/demo.ts +++ b/src/testRunner/unittests/tsbuild/demo.ts @@ -3,12 +3,8 @@ import { getFsContentsForDemoProjectReferencesCoreConfig, getFsForDemoProjectReferences, } from "../helpers/demoProjectReferences"; -import { - verifyTsc, -} from "../helpers/tsc"; -import { - prependText, -} from "../helpers/vfs"; +import { verifyTsc } from "../helpers/tsc"; +import { prependText } from "../helpers/vfs"; describe("unittests:: tsbuild:: on demo project", () => { let projFs: vfs.FileSystem; diff --git a/src/testRunner/unittests/tsbuild/emitDeclarationOnly.ts b/src/testRunner/unittests/tsbuild/emitDeclarationOnly.ts index 03e9bd3b87178..b1c2c0a425d65 100644 --- a/src/testRunner/unittests/tsbuild/emitDeclarationOnly.ts +++ b/src/testRunner/unittests/tsbuild/emitDeclarationOnly.ts @@ -1,13 +1,7 @@ -import { - dedent, -} from "../../_namespaces/Utils"; +import { dedent } from "../../_namespaces/Utils"; import * as vfs from "../../_namespaces/vfs"; -import { - jsonToReadableText, -} from "../helpers"; -import { - verifyTsc, -} from "../helpers/tsc"; +import { jsonToReadableText } from "../helpers"; +import { verifyTsc } from "../helpers/tsc"; import { loadProjectFromFiles, replaceText, diff --git a/src/testRunner/unittests/tsbuild/emptyFiles.ts b/src/testRunner/unittests/tsbuild/emptyFiles.ts index 779f0a05186bb..77cbc6c2da39d 100644 --- a/src/testRunner/unittests/tsbuild/emptyFiles.ts +++ b/src/testRunner/unittests/tsbuild/emptyFiles.ts @@ -1,12 +1,6 @@ -import { - jsonToReadableText, -} from "../helpers"; -import { - verifyTsc, -} from "../helpers/tsc"; -import { - loadProjectFromFiles, -} from "../helpers/vfs"; +import { jsonToReadableText } from "../helpers"; +import { verifyTsc } from "../helpers/tsc"; +import { loadProjectFromFiles } from "../helpers/vfs"; describe("unittests:: tsbuild - empty files option in tsconfig", () => { verifyTsc({ diff --git a/src/testRunner/unittests/tsbuild/exitCodeOnBogusFile.ts b/src/testRunner/unittests/tsbuild/exitCodeOnBogusFile.ts index 1346f4e251400..933aa4a67f2cc 100644 --- a/src/testRunner/unittests/tsbuild/exitCodeOnBogusFile.ts +++ b/src/testRunner/unittests/tsbuild/exitCodeOnBogusFile.ts @@ -1,9 +1,5 @@ -import { - verifyTsc, -} from "../helpers/tsc"; -import { - loadProjectFromFiles, -} from "../helpers/vfs"; +import { verifyTsc } from "../helpers/tsc"; +import { loadProjectFromFiles } from "../helpers/vfs"; // https://github.com/microsoft/TypeScript/issues/33849 describe("unittests:: tsbuild:: exitCodeOnBogusFile:: test exit code", () => { diff --git a/src/testRunner/unittests/tsbuild/extends.ts b/src/testRunner/unittests/tsbuild/extends.ts index 8605d1e8fbd43..dbf2512e7502a 100644 --- a/src/testRunner/unittests/tsbuild/extends.ts +++ b/src/testRunner/unittests/tsbuild/extends.ts @@ -1,9 +1,5 @@ -import { - getSymlinkedExtendsSys, -} from "../helpers/extends"; -import { - verifyTscWatch, -} from "../helpers/tscWatch"; +import { getSymlinkedExtendsSys } from "../helpers/extends"; +import { verifyTscWatch } from "../helpers/tscWatch"; describe("unittests:: tsbuild:: extends::", () => { verifyTscWatch({ diff --git a/src/testRunner/unittests/tsbuild/fileDelete.ts b/src/testRunner/unittests/tsbuild/fileDelete.ts index dbaf4a791c7e9..f360c5880485d 100644 --- a/src/testRunner/unittests/tsbuild/fileDelete.ts +++ b/src/testRunner/unittests/tsbuild/fileDelete.ts @@ -1,19 +1,9 @@ import * as ts from "../../_namespaces/ts"; -import { - dedent, -} from "../../_namespaces/Utils"; -import { - jsonToReadableText, -} from "../helpers"; -import { - compilerOptionsToConfigJson, -} from "../helpers/contents"; -import { - verifyTsc, -} from "../helpers/tsc"; -import { - loadProjectFromFiles, -} from "../helpers/vfs"; +import { dedent } from "../../_namespaces/Utils"; +import { jsonToReadableText } from "../helpers"; +import { compilerOptionsToConfigJson } from "../helpers/contents"; +import { verifyTsc } from "../helpers/tsc"; +import { loadProjectFromFiles } from "../helpers/vfs"; describe("unittests:: tsbuild:: fileDelete::", () => { function fs(childOptions: ts.CompilerOptions, mainOptions?: ts.CompilerOptions) { diff --git a/src/testRunner/unittests/tsbuild/graphOrdering.ts b/src/testRunner/unittests/tsbuild/graphOrdering.ts index 1b2adbb160ee1..75780224aa7e0 100644 --- a/src/testRunner/unittests/tsbuild/graphOrdering.ts +++ b/src/testRunner/unittests/tsbuild/graphOrdering.ts @@ -1,9 +1,7 @@ import * as fakes from "../../_namespaces/fakes"; import * as ts from "../../_namespaces/ts"; import * as vfs from "../../_namespaces/vfs"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; describe("unittests:: tsbuild - graph-ordering", () => { let host: fakes.SolutionBuilderHost | undefined; diff --git a/src/testRunner/unittests/tsbuild/inferredTypeFromTransitiveModule.ts b/src/testRunner/unittests/tsbuild/inferredTypeFromTransitiveModule.ts index 95cef8c1d24cb..78f292a10eb43 100644 --- a/src/testRunner/unittests/tsbuild/inferredTypeFromTransitiveModule.ts +++ b/src/testRunner/unittests/tsbuild/inferredTypeFromTransitiveModule.ts @@ -1,13 +1,7 @@ -import { - dedent, -} from "../../_namespaces/Utils"; +import { dedent } from "../../_namespaces/Utils"; import * as vfs from "../../_namespaces/vfs"; -import { - jsonToReadableText, -} from "../helpers"; -import { - verifyTsc, -} from "../helpers/tsc"; +import { jsonToReadableText } from "../helpers"; +import { verifyTsc } from "../helpers/tsc"; import { appendText, loadProjectFromFiles, diff --git a/src/testRunner/unittests/tsbuild/javascriptProjectEmit.ts b/src/testRunner/unittests/tsbuild/javascriptProjectEmit.ts index 5d560ddfaaf3e..64a7c32d9179b 100644 --- a/src/testRunner/unittests/tsbuild/javascriptProjectEmit.ts +++ b/src/testRunner/unittests/tsbuild/javascriptProjectEmit.ts @@ -1,13 +1,7 @@ import * as Utils from "../../_namespaces/Utils"; -import { - symbolLibContent, -} from "../helpers/contents"; -import { - verifyTsc, -} from "../helpers/tsc"; -import { - loadProjectFromFiles, -} from "../helpers/vfs"; +import { symbolLibContent } from "../helpers/contents"; +import { verifyTsc } from "../helpers/tsc"; +import { loadProjectFromFiles } from "../helpers/vfs"; describe("unittests:: tsbuild:: javascriptProjectEmit::", () => { verifyTsc({ diff --git a/src/testRunner/unittests/tsbuild/lateBoundSymbol.ts b/src/testRunner/unittests/tsbuild/lateBoundSymbol.ts index e6b8d275bb9a7..61cb5d4aed5db 100644 --- a/src/testRunner/unittests/tsbuild/lateBoundSymbol.ts +++ b/src/testRunner/unittests/tsbuild/lateBoundSymbol.ts @@ -1,12 +1,6 @@ -import { - dedent, -} from "../../_namespaces/Utils"; -import { - jsonToReadableText, -} from "../helpers"; -import { - verifyTsc, -} from "../helpers/tsc"; +import { dedent } from "../../_namespaces/Utils"; +import { jsonToReadableText } from "../helpers"; +import { verifyTsc } from "../helpers/tsc"; import { appendText, loadProjectFromFiles, diff --git a/src/testRunner/unittests/tsbuild/libraryResolution.ts b/src/testRunner/unittests/tsbuild/libraryResolution.ts index 4fe269a2ea0fc..ed854616c3ac2 100644 --- a/src/testRunner/unittests/tsbuild/libraryResolution.ts +++ b/src/testRunner/unittests/tsbuild/libraryResolution.ts @@ -1,9 +1,5 @@ -import { - getFsForLibResolution, -} from "../helpers/libraryResolution"; -import { - verifyTsc, -} from "../helpers/tsc"; +import { getFsForLibResolution } from "../helpers/libraryResolution"; +import { verifyTsc } from "../helpers/tsc"; describe("unittests:: tsbuild:: libraryResolution:: library file resolution", () => { function verify(libRedirection?: true) { diff --git a/src/testRunner/unittests/tsbuild/moduleResolution.ts b/src/testRunner/unittests/tsbuild/moduleResolution.ts index 7085ff7c0cb6f..9e37a5ce4911a 100644 --- a/src/testRunner/unittests/tsbuild/moduleResolution.ts +++ b/src/testRunner/unittests/tsbuild/moduleResolution.ts @@ -1,18 +1,12 @@ import * as ts from "../../_namespaces/ts"; import * as Utils from "../../_namespaces/Utils"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { noChangeOnlyRuns, verifyTsc, } from "../helpers/tsc"; -import { - verifyTscWatch, -} from "../helpers/tscWatch"; -import { - loadProjectFromFiles, -} from "../helpers/vfs"; +import { verifyTscWatch } from "../helpers/tscWatch"; +import { loadProjectFromFiles } from "../helpers/vfs"; import { createWatchedSystem, libFile, diff --git a/src/testRunner/unittests/tsbuild/moduleSpecifiers.ts b/src/testRunner/unittests/tsbuild/moduleSpecifiers.ts index 0a872a15f2696..b22d9a611996a 100644 --- a/src/testRunner/unittests/tsbuild/moduleSpecifiers.ts +++ b/src/testRunner/unittests/tsbuild/moduleSpecifiers.ts @@ -1,16 +1,8 @@ import * as Utils from "../../_namespaces/Utils"; -import { - symbolLibContent, -} from "../helpers/contents"; -import { - verifyTsc, -} from "../helpers/tsc"; -import { - loadProjectFromFiles, -} from "../helpers/vfs"; -import { - libFile, -} from "../helpers/virtualFileSystemWithWatch"; +import { symbolLibContent } from "../helpers/contents"; +import { verifyTsc } from "../helpers/tsc"; +import { loadProjectFromFiles } from "../helpers/vfs"; +import { libFile } from "../helpers/virtualFileSystemWithWatch"; // https://github.com/microsoft/TypeScript/issues/31696 describe("unittests:: tsbuild:: moduleSpecifiers:: synthesized module specifiers to referenced projects resolve correctly", () => { diff --git a/src/testRunner/unittests/tsbuild/noEmit.ts b/src/testRunner/unittests/tsbuild/noEmit.ts index 58e2a779fd32f..97747b8bb3b72 100644 --- a/src/testRunner/unittests/tsbuild/noEmit.ts +++ b/src/testRunner/unittests/tsbuild/noEmit.ts @@ -1,13 +1,9 @@ -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { noChangeRun, verifyTsc, } from "../helpers/tsc"; -import { - loadProjectFromFiles, -} from "../helpers/vfs"; +import { loadProjectFromFiles } from "../helpers/vfs"; describe("unittests:: tsbuild:: noEmit", () => { function verifyNoEmitWorker(subScenario: string, aTsContent: string, commandLineArgs: readonly string[]) { diff --git a/src/testRunner/unittests/tsbuild/noEmitOnError.ts b/src/testRunner/unittests/tsbuild/noEmitOnError.ts index 996ff3c3e3bdd..d52036dd6ad51 100644 --- a/src/testRunner/unittests/tsbuild/noEmitOnError.ts +++ b/src/testRunner/unittests/tsbuild/noEmitOnError.ts @@ -1,7 +1,5 @@ import * as vfs from "../../_namespaces/vfs"; -import { - getFsForNoEmitOnError, -} from "../helpers/noEmitOnError"; +import { getFsForNoEmitOnError } from "../helpers/noEmitOnError"; import { noChangeRun, verifyTsc, diff --git a/src/testRunner/unittests/tsbuild/outFile.ts b/src/testRunner/unittests/tsbuild/outFile.ts index ddf6b77c7e899..1a6b801db5c39 100644 --- a/src/testRunner/unittests/tsbuild/outFile.ts +++ b/src/testRunner/unittests/tsbuild/outFile.ts @@ -1,15 +1,9 @@ import * as fakes from "../../_namespaces/fakes"; import * as ts from "../../_namespaces/ts"; -import { - dedent, -} from "../../_namespaces/Utils"; +import { dedent } from "../../_namespaces/Utils"; import * as vfs from "../../_namespaces/vfs"; -import { - jsonToReadableText, -} from "../helpers"; -import { - createSolutionBuilderHostForBaseline, -} from "../helpers/solutionBuilder"; +import { jsonToReadableText } from "../helpers"; +import { createSolutionBuilderHostForBaseline } from "../helpers/solutionBuilder"; import { noChangeOnlyRuns, testTscCompileLike, diff --git a/src/testRunner/unittests/tsbuild/outputPaths.ts b/src/testRunner/unittests/tsbuild/outputPaths.ts index d054707141306..0e856df73a0c6 100644 --- a/src/testRunner/unittests/tsbuild/outputPaths.ts +++ b/src/testRunner/unittests/tsbuild/outputPaths.ts @@ -1,8 +1,6 @@ import * as fakes from "../../_namespaces/fakes"; import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { noChangeRun, TestTscEdit, @@ -10,9 +8,7 @@ import { verifyTsc, VerifyTscWithEditsInput, } from "../helpers/tsc"; -import { - loadProjectFromFiles, -} from "../helpers/vfs"; +import { loadProjectFromFiles } from "../helpers/vfs"; describe("unittests:: tsbuild - output file paths", () => { const noChangeProject: TestTscEdit = { diff --git a/src/testRunner/unittests/tsbuild/publicApi.ts b/src/testRunner/unittests/tsbuild/publicApi.ts index 6c710661aca04..b75f378649e79 100644 --- a/src/testRunner/unittests/tsbuild/publicApi.ts +++ b/src/testRunner/unittests/tsbuild/publicApi.ts @@ -1,9 +1,7 @@ import * as fakes from "../../_namespaces/fakes"; import * as ts from "../../_namespaces/ts"; import * as vfs from "../../_namespaces/vfs"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { baselinePrograms, commandLineCallbacks, @@ -13,9 +11,7 @@ import { TscCompileSystem, verifyTscBaseline, } from "../helpers/tsc"; -import { - loadProjectFromFiles, -} from "../helpers/vfs"; +import { loadProjectFromFiles } from "../helpers/vfs"; describe("unittests:: tsbuild:: Public API with custom transformers when passed to build", () => { let sys: TscCompileSystem; diff --git a/src/testRunner/unittests/tsbuild/referencesWithRootDirInParent.ts b/src/testRunner/unittests/tsbuild/referencesWithRootDirInParent.ts index 1ad927b06b6f7..500ea68bf7af3 100644 --- a/src/testRunner/unittests/tsbuild/referencesWithRootDirInParent.ts +++ b/src/testRunner/unittests/tsbuild/referencesWithRootDirInParent.ts @@ -1,13 +1,7 @@ -import { - dedent, -} from "../../_namespaces/Utils"; +import { dedent } from "../../_namespaces/Utils"; import * as vfs from "../../_namespaces/vfs"; -import { - jsonToReadableText, -} from "../helpers"; -import { - verifyTsc, -} from "../helpers/tsc"; +import { jsonToReadableText } from "../helpers"; +import { verifyTsc } from "../helpers/tsc"; import { loadProjectFromFiles, replaceText, diff --git a/src/testRunner/unittests/tsbuild/resolveJsonModule.ts b/src/testRunner/unittests/tsbuild/resolveJsonModule.ts index b0b1bef064ba0..6cc71087a210a 100644 --- a/src/testRunner/unittests/tsbuild/resolveJsonModule.ts +++ b/src/testRunner/unittests/tsbuild/resolveJsonModule.ts @@ -1,12 +1,6 @@ -import { - CompilerOptions, -} from "../../_namespaces/ts"; -import { - dedent, -} from "../../_namespaces/Utils"; -import { - jsonToReadableText, -} from "../helpers"; +import { CompilerOptions } from "../../_namespaces/ts"; +import { dedent } from "../../_namespaces/Utils"; +import { jsonToReadableText } from "../helpers"; import { noChangeOnlyRuns, verifyTsc, diff --git a/src/testRunner/unittests/tsbuild/roots.ts b/src/testRunner/unittests/tsbuild/roots.ts index e8c3cb3a5c01a..ba6255a2012fb 100644 --- a/src/testRunner/unittests/tsbuild/roots.ts +++ b/src/testRunner/unittests/tsbuild/roots.ts @@ -1,15 +1,7 @@ -import { - dedent, -} from "../../_namespaces/Utils"; -import { - jsonToReadableText, -} from "../helpers"; -import { - verifyTsc, -} from "../helpers/tsc"; -import { - loadProjectFromFiles, -} from "../helpers/vfs"; +import { dedent } from "../../_namespaces/Utils"; +import { jsonToReadableText } from "../helpers"; +import { verifyTsc } from "../helpers/tsc"; +import { loadProjectFromFiles } from "../helpers/vfs"; describe("unittests:: tsbuild:: roots::", () => { verifyTsc({ diff --git a/src/testRunner/unittests/tsbuild/sample.ts b/src/testRunner/unittests/tsbuild/sample.ts index 82e382845fa4d..396ed09741a66 100644 --- a/src/testRunner/unittests/tsbuild/sample.ts +++ b/src/testRunner/unittests/tsbuild/sample.ts @@ -2,9 +2,7 @@ import * as fakes from "../../_namespaces/fakes"; import * as Harness from "../../_namespaces/Harness"; import * as ts from "../../_namespaces/ts"; import * as vfs from "../../_namespaces/vfs"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { libContent, libPath, @@ -13,9 +11,7 @@ import { getFsForSampleProjectReferences, getSysForSampleProjectReferences, } from "../helpers/sampleProjectReferences"; -import { - createSolutionBuilderHostForBaseline, -} from "../helpers/solutionBuilder"; +import { createSolutionBuilderHostForBaseline } from "../helpers/solutionBuilder"; import { noChangeOnlyRuns, noChangeRun, diff --git a/src/testRunner/unittests/tsbuild/transitiveReferences.ts b/src/testRunner/unittests/tsbuild/transitiveReferences.ts index 08cc01572f529..0b062d537336c 100644 --- a/src/testRunner/unittests/tsbuild/transitiveReferences.ts +++ b/src/testRunner/unittests/tsbuild/transitiveReferences.ts @@ -1,19 +1,9 @@ import * as vfs from "../../_namespaces/vfs"; -import { - jsonToReadableText, -} from "../helpers"; -import { - getFsContentsForTransitiveReferences, -} from "../helpers/transitiveReferences"; -import { - verifyTsc, -} from "../helpers/tsc"; -import { - loadProjectFromFiles, -} from "../helpers/vfs"; -import { - libFile, -} from "../helpers/virtualFileSystemWithWatch"; +import { jsonToReadableText } from "../helpers"; +import { getFsContentsForTransitiveReferences } from "../helpers/transitiveReferences"; +import { verifyTsc } from "../helpers/tsc"; +import { loadProjectFromFiles } from "../helpers/vfs"; +import { libFile } from "../helpers/virtualFileSystemWithWatch"; describe("unittests:: tsbuild:: when project reference is referenced transitively", () => { let projFs: vfs.FileSystem; diff --git a/src/testRunner/unittests/tsbuildWatch/configFileErrors.ts b/src/testRunner/unittests/tsbuildWatch/configFileErrors.ts index 2f18df2f91f08..ebbc53b8a14bb 100644 --- a/src/testRunner/unittests/tsbuildWatch/configFileErrors.ts +++ b/src/testRunner/unittests/tsbuildWatch/configFileErrors.ts @@ -1,12 +1,6 @@ -import { - dedent, -} from "../../_namespaces/Utils"; -import { - jsonToReadableText, -} from "../helpers"; -import { - verifyTscWatch, -} from "../helpers/tscWatch"; +import { dedent } from "../../_namespaces/Utils"; +import { jsonToReadableText } from "../helpers"; +import { verifyTscWatch } from "../helpers/tscWatch"; import { createWatchedSystem, libFile, diff --git a/src/testRunner/unittests/tsbuildWatch/demo.ts b/src/testRunner/unittests/tsbuildWatch/demo.ts index f67df1a2f7032..1c83351fefb3b 100644 --- a/src/testRunner/unittests/tsbuildWatch/demo.ts +++ b/src/testRunner/unittests/tsbuildWatch/demo.ts @@ -1,13 +1,9 @@ -import { - dedent, -} from "../../_namespaces/Utils"; +import { dedent } from "../../_namespaces/Utils"; import { getFsContentsForDemoProjectReferencesCoreConfig, getSysForDemoProjectReferences, } from "../helpers/demoProjectReferences"; -import { - verifyTscWatch, -} from "../helpers/tscWatch"; +import { verifyTscWatch } from "../helpers/tscWatch"; describe("unittests:: tsbuildWatch:: watchMode:: with demo project", () => { verifyTscWatch({ diff --git a/src/testRunner/unittests/tsbuildWatch/libraryResolution.ts b/src/testRunner/unittests/tsbuildWatch/libraryResolution.ts index dd2c4f0e2ac2e..a6391cdb9b7ee 100644 --- a/src/testRunner/unittests/tsbuildWatch/libraryResolution.ts +++ b/src/testRunner/unittests/tsbuildWatch/libraryResolution.ts @@ -1,9 +1,5 @@ -import { - getSysForLibResolution, -} from "../helpers/libraryResolution"; -import { - verifyTscWatch, -} from "../helpers/tscWatch"; +import { getSysForLibResolution } from "../helpers/libraryResolution"; +import { verifyTscWatch } from "../helpers/tscWatch"; describe("unittests:: tsbuildWatch:: watchMode:: libraryResolution:: library file resolution", () => { function verify(libRedirection?: true) { diff --git a/src/testRunner/unittests/tsbuildWatch/moduleResolution.ts b/src/testRunner/unittests/tsbuildWatch/moduleResolution.ts index 3088691fcdbba..8c72b41bdd2bb 100644 --- a/src/testRunner/unittests/tsbuildWatch/moduleResolution.ts +++ b/src/testRunner/unittests/tsbuildWatch/moduleResolution.ts @@ -1,12 +1,6 @@ -import { - dedent, -} from "../../_namespaces/Utils"; -import { - jsonToReadableText, -} from "../helpers"; -import { - verifyTscWatch, -} from "../helpers/tscWatch"; +import { dedent } from "../../_namespaces/Utils"; +import { jsonToReadableText } from "../helpers"; +import { verifyTscWatch } from "../helpers/tscWatch"; import { createWatchedSystem, libFile, diff --git a/src/testRunner/unittests/tsbuildWatch/noEmit.ts b/src/testRunner/unittests/tsbuildWatch/noEmit.ts index dca46f0ecf1bc..2d74e68de2758 100644 --- a/src/testRunner/unittests/tsbuildWatch/noEmit.ts +++ b/src/testRunner/unittests/tsbuildWatch/noEmit.ts @@ -1,12 +1,6 @@ -import { - jsonToReadableText, -} from "../helpers"; -import { - libContent, -} from "../helpers/contents"; -import { - verifyTscWatch, -} from "../helpers/tscWatch"; +import { jsonToReadableText } from "../helpers"; +import { libContent } from "../helpers/contents"; +import { verifyTscWatch } from "../helpers/tscWatch"; import { createWatchedSystem, libFile, diff --git a/src/testRunner/unittests/tsbuildWatch/noEmitOnError.ts b/src/testRunner/unittests/tsbuildWatch/noEmitOnError.ts index 8ef96500031c8..11d77047fb8bf 100644 --- a/src/testRunner/unittests/tsbuildWatch/noEmitOnError.ts +++ b/src/testRunner/unittests/tsbuildWatch/noEmitOnError.ts @@ -1,6 +1,4 @@ -import { - getSysForNoEmitOnError, -} from "../helpers/noEmitOnError"; +import { getSysForNoEmitOnError } from "../helpers/noEmitOnError"; import { TscWatchCompileChange, verifyTscWatch, diff --git a/src/testRunner/unittests/tsbuildWatch/programUpdates.ts b/src/testRunner/unittests/tsbuildWatch/programUpdates.ts index 307399cb6e142..492172dc37e84 100644 --- a/src/testRunner/unittests/tsbuildWatch/programUpdates.ts +++ b/src/testRunner/unittests/tsbuildWatch/programUpdates.ts @@ -1,10 +1,6 @@ import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; -import { - FsContents, -} from "../helpers/contents"; +import { jsonToReadableText } from "../helpers"; +import { FsContents } from "../helpers/contents"; import { getFsContentsForSampleProjectReferences, getFsContentsForSampleProjectReferencesLogicConfig, diff --git a/src/testRunner/unittests/tsbuildWatch/projectsBuilding.ts b/src/testRunner/unittests/tsbuildWatch/projectsBuilding.ts index f14506e74d6b3..67385b1c70260 100644 --- a/src/testRunner/unittests/tsbuildWatch/projectsBuilding.ts +++ b/src/testRunner/unittests/tsbuildWatch/projectsBuilding.ts @@ -1,7 +1,5 @@ import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { noopChange, TscWatchCompileChange, diff --git a/src/testRunner/unittests/tsbuildWatch/publicApi.ts b/src/testRunner/unittests/tsbuildWatch/publicApi.ts index 487b160a8f772..6739656e67920 100644 --- a/src/testRunner/unittests/tsbuildWatch/publicApi.ts +++ b/src/testRunner/unittests/tsbuildWatch/publicApi.ts @@ -1,7 +1,5 @@ import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { createBaseline, createSolutionBuilderWithWatchHostForBaseline, diff --git a/src/testRunner/unittests/tsbuildWatch/reexport.ts b/src/testRunner/unittests/tsbuildWatch/reexport.ts index 61088df8c8630..168fc249a12be 100644 --- a/src/testRunner/unittests/tsbuildWatch/reexport.ts +++ b/src/testRunner/unittests/tsbuildWatch/reexport.ts @@ -1,15 +1,7 @@ -import { - dedent, -} from "../../_namespaces/Utils"; -import { - jsonToReadableText, -} from "../helpers"; -import { - libContent, -} from "../helpers/contents"; -import { - verifyTscWatch, -} from "../helpers/tscWatch"; +import { dedent } from "../../_namespaces/Utils"; +import { jsonToReadableText } from "../helpers"; +import { libContent } from "../helpers/contents"; +import { verifyTscWatch } from "../helpers/tscWatch"; import { createWatchedSystem, libFile, diff --git a/src/testRunner/unittests/tsbuildWatch/watchEnvironment.ts b/src/testRunner/unittests/tsbuildWatch/watchEnvironment.ts index a8f730e192267..b431518ec8e12 100644 --- a/src/testRunner/unittests/tsbuildWatch/watchEnvironment.ts +++ b/src/testRunner/unittests/tsbuildWatch/watchEnvironment.ts @@ -1,7 +1,5 @@ import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { createBaseline, createSolutionBuilderWithWatchHostForBaseline, diff --git a/src/testRunner/unittests/tsc/cancellationToken.ts b/src/testRunner/unittests/tsc/cancellationToken.ts index 381bef09b273a..a2df9298c5a9b 100644 --- a/src/testRunner/unittests/tsc/cancellationToken.ts +++ b/src/testRunner/unittests/tsc/cancellationToken.ts @@ -1,9 +1,7 @@ import * as Harness from "../../_namespaces/Harness"; import * as ts from "../../_namespaces/ts"; import * as Utils from "../../_namespaces/Utils"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { baselineBuildInfo, CommandLineProgram, diff --git a/src/testRunner/unittests/tsc/composite.ts b/src/testRunner/unittests/tsc/composite.ts index 4b3ad541e8bb1..3b385290717e7 100644 --- a/src/testRunner/unittests/tsc/composite.ts +++ b/src/testRunner/unittests/tsc/composite.ts @@ -1,10 +1,6 @@ import * as Utils from "../../_namespaces/Utils"; -import { - jsonToReadableText, -} from "../helpers"; -import { - verifyTsc, -} from "../helpers/tsc"; +import { jsonToReadableText } from "../helpers"; +import { verifyTsc } from "../helpers/tsc"; import { loadProjectFromFiles, replaceText, diff --git a/src/testRunner/unittests/tsc/declarationEmit.ts b/src/testRunner/unittests/tsc/declarationEmit.ts index 6655fcc0249ac..7cda171565795 100644 --- a/src/testRunner/unittests/tsc/declarationEmit.ts +++ b/src/testRunner/unittests/tsc/declarationEmit.ts @@ -1,10 +1,6 @@ import * as Utils from "../../_namespaces/Utils"; -import { - jsonToReadableText, -} from "../helpers"; -import { - verifyTscWatch, -} from "../helpers/tscWatch"; +import { jsonToReadableText } from "../helpers"; +import { verifyTscWatch } from "../helpers/tscWatch"; import { createWatchedSystem, FileOrFolderOrSymLink, diff --git a/src/testRunner/unittests/tsc/extends.ts b/src/testRunner/unittests/tsc/extends.ts index ebc16575046d9..d1e8226517076 100644 --- a/src/testRunner/unittests/tsc/extends.ts +++ b/src/testRunner/unittests/tsc/extends.ts @@ -1,9 +1,5 @@ -import { - getSymlinkedExtendsSys, -} from "../helpers/extends"; -import { - verifyTscWatch, -} from "../helpers/tscWatch"; +import { getSymlinkedExtendsSys } from "../helpers/extends"; +import { verifyTscWatch } from "../helpers/tscWatch"; describe("unittests:: tsc:: extends::", () => { verifyTscWatch({ diff --git a/src/testRunner/unittests/tsc/forceConsistentCasingInFileNames.ts b/src/testRunner/unittests/tsc/forceConsistentCasingInFileNames.ts index 0a765e6e3f193..24aa8f61df742 100644 --- a/src/testRunner/unittests/tsc/forceConsistentCasingInFileNames.ts +++ b/src/testRunner/unittests/tsc/forceConsistentCasingInFileNames.ts @@ -1,10 +1,6 @@ import * as Utils from "../../_namespaces/Utils"; -import { - verifyTsc, -} from "../helpers/tsc"; -import { - loadProjectFromFiles, -} from "../helpers/vfs"; +import { verifyTsc } from "../helpers/tsc"; +import { loadProjectFromFiles } from "../helpers/vfs"; describe("unittests:: tsc:: forceConsistentCasingInFileNames::", () => { verifyTsc({ diff --git a/src/testRunner/unittests/tsc/incremental.ts b/src/testRunner/unittests/tsc/incremental.ts index 31f4119332204..58c4055e25dd7 100644 --- a/src/testRunner/unittests/tsc/incremental.ts +++ b/src/testRunner/unittests/tsc/incremental.ts @@ -1,16 +1,12 @@ import * as ts from "../../_namespaces/ts"; import * as Utils from "../../_namespaces/Utils"; import * as vfs from "../../_namespaces/vfs"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { compilerOptionsToConfigJson, libContent, } from "../helpers/contents"; -import { - getFsForNoEmitOnError, -} from "../helpers/noEmitOnError"; +import { getFsForNoEmitOnError } from "../helpers/noEmitOnError"; import { noChangeOnlyRuns, noChangeRun, diff --git a/src/testRunner/unittests/tsc/libraryResolution.ts b/src/testRunner/unittests/tsc/libraryResolution.ts index a2f7f49c05d60..5a6bb2b29ddb8 100644 --- a/src/testRunner/unittests/tsc/libraryResolution.ts +++ b/src/testRunner/unittests/tsc/libraryResolution.ts @@ -2,9 +2,7 @@ import { getCommandLineArgsForLibResolution, getFsForLibResolution, } from "../helpers/libraryResolution"; -import { - verifyTsc, -} from "../helpers/tsc"; +import { verifyTsc } from "../helpers/tsc"; describe("unittests:: tsc:: libraryResolution:: library file resolution", () => { function verify(libRedirection?: true, withoutConfig?: true) { diff --git a/src/testRunner/unittests/tsc/listFilesOnly.ts b/src/testRunner/unittests/tsc/listFilesOnly.ts index efff95327fa6e..d4a2dd6eab711 100644 --- a/src/testRunner/unittests/tsc/listFilesOnly.ts +++ b/src/testRunner/unittests/tsc/listFilesOnly.ts @@ -3,9 +3,7 @@ import { noChangeRun, verifyTsc, } from "../helpers/tsc"; -import { - loadProjectFromFiles, -} from "../helpers/vfs"; +import { loadProjectFromFiles } from "../helpers/vfs"; describe("unittests:: tsc:: listFilesOnly::", () => { verifyTsc({ diff --git a/src/testRunner/unittests/tsc/moduleResolution.ts b/src/testRunner/unittests/tsc/moduleResolution.ts index 81fabcfc89dee..aee945ede1868 100644 --- a/src/testRunner/unittests/tsc/moduleResolution.ts +++ b/src/testRunner/unittests/tsc/moduleResolution.ts @@ -1,30 +1,16 @@ -import { - dedent, -} from "../../_namespaces/Utils"; -import { - jsonToReadableText, -} from "../helpers"; +import { dedent } from "../../_namespaces/Utils"; +import { jsonToReadableText } from "../helpers"; import { getFsConentsForAlternateResultAtTypesPackageJson, getFsContentsForAlternateResult, getFsContentsForAlternateResultDts, getFsContentsForAlternateResultPackageJson, } from "../helpers/alternateResult"; -import { - libContent, -} from "../helpers/contents"; -import { - verifyTsc, -} from "../helpers/tsc"; -import { - verifyTscWatch, -} from "../helpers/tscWatch"; -import { - loadProjectFromFiles, -} from "../helpers/vfs"; -import { - createWatchedSystem, -} from "../helpers/virtualFileSystemWithWatch"; +import { libContent } from "../helpers/contents"; +import { verifyTsc } from "../helpers/tsc"; +import { verifyTscWatch } from "../helpers/tscWatch"; +import { loadProjectFromFiles } from "../helpers/vfs"; +import { createWatchedSystem } from "../helpers/virtualFileSystemWithWatch"; describe("unittests:: tsc:: moduleResolution::", () => { verifyTsc({ diff --git a/src/testRunner/unittests/tsc/projectReferences.ts b/src/testRunner/unittests/tsc/projectReferences.ts index 18049687745cf..f0437860f0d92 100644 --- a/src/testRunner/unittests/tsc/projectReferences.ts +++ b/src/testRunner/unittests/tsc/projectReferences.ts @@ -1,12 +1,6 @@ -import { - jsonToReadableText, -} from "../helpers"; -import { - verifyTsc, -} from "../helpers/tsc"; -import { - loadProjectFromFiles, -} from "../helpers/vfs"; +import { jsonToReadableText } from "../helpers"; +import { verifyTsc } from "../helpers/tsc"; +import { loadProjectFromFiles } from "../helpers/vfs"; describe("unittests:: tsc:: projectReferences::", () => { verifyTsc({ diff --git a/src/testRunner/unittests/tsc/projectReferencesConfig.ts b/src/testRunner/unittests/tsc/projectReferencesConfig.ts index 7d7331c28e45c..819c777956fee 100644 --- a/src/testRunner/unittests/tsc/projectReferencesConfig.ts +++ b/src/testRunner/unittests/tsc/projectReferencesConfig.ts @@ -1,13 +1,7 @@ import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; -import { - verifyTsc, -} from "../helpers/tsc"; -import { - loadProjectFromFiles, -} from "../helpers/vfs"; +import { jsonToReadableText } from "../helpers"; +import { verifyTsc } from "../helpers/tsc"; +import { loadProjectFromFiles } from "../helpers/vfs"; function emptyModule() { return "export { };"; diff --git a/src/testRunner/unittests/tsc/redirect.ts b/src/testRunner/unittests/tsc/redirect.ts index 37646f7479a1b..fc35d072ffb66 100644 --- a/src/testRunner/unittests/tsc/redirect.ts +++ b/src/testRunner/unittests/tsc/redirect.ts @@ -1,12 +1,6 @@ -import { - jsonToReadableText, -} from "../helpers"; -import { - verifyTsc, -} from "../helpers/tsc"; -import { - loadProjectFromFiles, -} from "../helpers/vfs"; +import { jsonToReadableText } from "../helpers"; +import { verifyTsc } from "../helpers/tsc"; +import { loadProjectFromFiles } from "../helpers/vfs"; describe("unittests:: tsc:: redirect::", () => { verifyTsc({ diff --git a/src/testRunner/unittests/tsc/runWithoutArgs.ts b/src/testRunner/unittests/tsc/runWithoutArgs.ts index d92f526aaf39d..ed26b9a4853fc 100644 --- a/src/testRunner/unittests/tsc/runWithoutArgs.ts +++ b/src/testRunner/unittests/tsc/runWithoutArgs.ts @@ -1,9 +1,5 @@ -import { - verifyTsc, -} from "../helpers/tsc"; -import { - loadProjectFromFiles, -} from "../helpers/vfs"; +import { verifyTsc } from "../helpers/tsc"; +import { loadProjectFromFiles } from "../helpers/vfs"; describe("unittests:: tsc:: runWithoutArgs::", () => { verifyTsc({ diff --git a/src/testRunner/unittests/tscWatch/consoleClearing.ts b/src/testRunner/unittests/tscWatch/consoleClearing.ts index 3e759eb0b7a09..6af2bb7d85857 100644 --- a/src/testRunner/unittests/tscWatch/consoleClearing.ts +++ b/src/testRunner/unittests/tscWatch/consoleClearing.ts @@ -1,7 +1,5 @@ import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { createBaseline, createWatchCompilerHostOfConfigFileForBaseline, diff --git a/src/testRunner/unittests/tscWatch/emit.ts b/src/testRunner/unittests/tscWatch/emit.ts index f29421b920af7..849ad87f06a81 100644 --- a/src/testRunner/unittests/tscWatch/emit.ts +++ b/src/testRunner/unittests/tscWatch/emit.ts @@ -1,7 +1,5 @@ import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { TscWatchCompileChange, verifyTscWatch, diff --git a/src/testRunner/unittests/tscWatch/emitAndErrorUpdates.ts b/src/testRunner/unittests/tscWatch/emitAndErrorUpdates.ts index 1585ef391a7ed..9c9abf7cfd8a4 100644 --- a/src/testRunner/unittests/tscWatch/emitAndErrorUpdates.ts +++ b/src/testRunner/unittests/tscWatch/emitAndErrorUpdates.ts @@ -1,12 +1,6 @@ -import { - jsonToReadableText, -} from "../helpers"; -import { - FsContents, -} from "../helpers/contents"; -import { - getFsContentsForNoEmitOnError, -} from "../helpers/noEmitOnError"; +import { jsonToReadableText } from "../helpers"; +import { FsContents } from "../helpers/contents"; +import { getFsContentsForNoEmitOnError } from "../helpers/noEmitOnError"; import { TscWatchCompileChange, verifyTscWatch, diff --git a/src/testRunner/unittests/tscWatch/extends.ts b/src/testRunner/unittests/tscWatch/extends.ts index db8ff56cd72d4..86d3fdf2c217d 100644 --- a/src/testRunner/unittests/tscWatch/extends.ts +++ b/src/testRunner/unittests/tscWatch/extends.ts @@ -1,9 +1,5 @@ -import { - getSymlinkedExtendsSys, -} from "../helpers/extends"; -import { - verifyTscWatch, -} from "../helpers/tscWatch"; +import { getSymlinkedExtendsSys } from "../helpers/extends"; +import { verifyTscWatch } from "../helpers/tscWatch"; describe("unittests:: tsc-watch:: extends::", () => { verifyTscWatch({ diff --git a/src/testRunner/unittests/tscWatch/forceConsistentCasingInFileNames.ts b/src/testRunner/unittests/tscWatch/forceConsistentCasingInFileNames.ts index c78a4ab1b6a75..7c7361222e754 100644 --- a/src/testRunner/unittests/tscWatch/forceConsistentCasingInFileNames.ts +++ b/src/testRunner/unittests/tscWatch/forceConsistentCasingInFileNames.ts @@ -1,7 +1,5 @@ import * as Utils from "../../_namespaces/Utils"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { TscWatchCompileChange, verifyTscWatch, diff --git a/src/testRunner/unittests/tscWatch/incremental.ts b/src/testRunner/unittests/tscWatch/incremental.ts index 353eeabb0079d..27f3a435de359 100644 --- a/src/testRunner/unittests/tscWatch/incremental.ts +++ b/src/testRunner/unittests/tscWatch/incremental.ts @@ -1,14 +1,8 @@ import * as Harness from "../../_namespaces/Harness"; import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; -import { - CommandLineProgram, -} from "../helpers/baseline"; -import { - libContent, -} from "../helpers/contents"; +import { jsonToReadableText } from "../helpers"; +import { CommandLineProgram } from "../helpers/baseline"; +import { libContent } from "../helpers/contents"; import { applyEdit, createBaseline, diff --git a/src/testRunner/unittests/tscWatch/libraryResolution.ts b/src/testRunner/unittests/tscWatch/libraryResolution.ts index a3778c4ef4460..0efbe202e91bc 100644 --- a/src/testRunner/unittests/tscWatch/libraryResolution.ts +++ b/src/testRunner/unittests/tscWatch/libraryResolution.ts @@ -1,6 +1,4 @@ -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { getCommandLineArgsForLibResolution, getSysForLibResolution, diff --git a/src/testRunner/unittests/tscWatch/moduleResolution.ts b/src/testRunner/unittests/tscWatch/moduleResolution.ts index dc213e7a5c949..d11a142d876b8 100644 --- a/src/testRunner/unittests/tscWatch/moduleResolution.ts +++ b/src/testRunner/unittests/tscWatch/moduleResolution.ts @@ -1,16 +1,12 @@ import * as Utils from "../../_namespaces/Utils"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { getFsConentsForAlternateResultAtTypesPackageJson, getFsContentsForAlternateResult, getFsContentsForAlternateResultDts, getFsContentsForAlternateResultPackageJson, } from "../helpers/alternateResult"; -import { - verifyTscWatch, -} from "../helpers/tscWatch"; +import { verifyTscWatch } from "../helpers/tscWatch"; import { createWatchedSystem, File, diff --git a/src/testRunner/unittests/tscWatch/nodeNextWatch.ts b/src/testRunner/unittests/tscWatch/nodeNextWatch.ts index 820b83a82ed52..2f753a4e05170 100644 --- a/src/testRunner/unittests/tscWatch/nodeNextWatch.ts +++ b/src/testRunner/unittests/tscWatch/nodeNextWatch.ts @@ -1,10 +1,6 @@ import * as Utils from "../../_namespaces/Utils"; -import { - jsonToReadableText, -} from "../helpers"; -import { - verifyTscWatch, -} from "../helpers/tscWatch"; +import { jsonToReadableText } from "../helpers"; +import { verifyTscWatch } from "../helpers/tscWatch"; import { createWatchedSystem, File, diff --git a/src/testRunner/unittests/tscWatch/programUpdates.ts b/src/testRunner/unittests/tscWatch/programUpdates.ts index 0eea0079ca228..b583441801f83 100644 --- a/src/testRunner/unittests/tscWatch/programUpdates.ts +++ b/src/testRunner/unittests/tscWatch/programUpdates.ts @@ -1,14 +1,8 @@ import * as Harness from "../../_namespaces/Harness"; import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; -import { - commandLineCallbacks, -} from "../helpers/baseline"; -import { - compilerOptionsToConfigJson, -} from "../helpers/contents"; +import { jsonToReadableText } from "../helpers"; +import { commandLineCallbacks } from "../helpers/baseline"; +import { compilerOptionsToConfigJson } from "../helpers/contents"; import { commonFile1, commonFile2, diff --git a/src/testRunner/unittests/tscWatch/projectsWithReferences.ts b/src/testRunner/unittests/tscWatch/projectsWithReferences.ts index f860327328dc0..a6cc9f2ea89bf 100644 --- a/src/testRunner/unittests/tscWatch/projectsWithReferences.ts +++ b/src/testRunner/unittests/tscWatch/projectsWithReferences.ts @@ -1,15 +1,7 @@ -import { - noop, -} from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; -import { - getProjectConfigWithNodeNext, -} from "../helpers/contents"; -import { - getSysForSampleProjectReferences, -} from "../helpers/sampleProjectReferences"; +import { noop } from "../../_namespaces/ts"; +import { jsonToReadableText } from "../helpers"; +import { getProjectConfigWithNodeNext } from "../helpers/contents"; +import { getSysForSampleProjectReferences } from "../helpers/sampleProjectReferences"; import { createSolutionBuilder, solutionBuildWithBaseline, @@ -20,9 +12,7 @@ import { getFsContentsForTransitiveReferencesBConfig, getFsContentsForTransitiveReferencesRefsAdts, } from "../helpers/transitiveReferences"; -import { - verifyTscWatch, -} from "../helpers/tscWatch"; +import { verifyTscWatch } from "../helpers/tscWatch"; import { createWatchedSystem, libFile, diff --git a/src/testRunner/unittests/tscWatch/resolutionCache.ts b/src/testRunner/unittests/tscWatch/resolutionCache.ts index 36fb5dbede741..cb59a30499668 100644 --- a/src/testRunner/unittests/tscWatch/resolutionCache.ts +++ b/src/testRunner/unittests/tscWatch/resolutionCache.ts @@ -1,11 +1,7 @@ import * as ts from "../../_namespaces/ts"; import * as Utils from "../../_namespaces/Utils"; -import { - jsonToReadableText, -} from "../helpers"; -import { - libContent, -} from "../helpers/contents"; +import { jsonToReadableText } from "../helpers"; +import { libContent } from "../helpers/contents"; import { createBaseline, createWatchCompilerHostOfFilesAndCompilerOptionsForBaseline, diff --git a/src/testRunner/unittests/tscWatch/resolveJsonModuleWithIncremental.ts b/src/testRunner/unittests/tscWatch/resolveJsonModuleWithIncremental.ts index c53e697927d72..a5ba4c33c3d8f 100644 --- a/src/testRunner/unittests/tscWatch/resolveJsonModuleWithIncremental.ts +++ b/src/testRunner/unittests/tscWatch/resolveJsonModuleWithIncremental.ts @@ -1,9 +1,5 @@ -import { - jsonToReadableText, -} from "../helpers"; -import { - verifyTscWatch, -} from "../helpers/tscWatch"; +import { jsonToReadableText } from "../helpers"; +import { verifyTscWatch } from "../helpers/tscWatch"; import { createWatchedSystem, libFile, diff --git a/src/testRunner/unittests/tscWatch/sourceOfProjectReferenceRedirect.ts b/src/testRunner/unittests/tscWatch/sourceOfProjectReferenceRedirect.ts index c02a60e708d64..ba76f6f73f204 100644 --- a/src/testRunner/unittests/tscWatch/sourceOfProjectReferenceRedirect.ts +++ b/src/testRunner/unittests/tscWatch/sourceOfProjectReferenceRedirect.ts @@ -1,16 +1,8 @@ import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; -import { - FsContents, -} from "../helpers/contents"; -import { - getFsContentsForDemoProjectReferences, -} from "../helpers/demoProjectReferences"; -import { - solutionBuildWithBaseline, -} from "../helpers/solutionBuilder"; +import { jsonToReadableText } from "../helpers"; +import { FsContents } from "../helpers/contents"; +import { getFsContentsForDemoProjectReferences } from "../helpers/demoProjectReferences"; +import { solutionBuildWithBaseline } from "../helpers/solutionBuilder"; import { createBaseline, createWatchCompilerHostOfConfigFileForBaseline, diff --git a/src/testRunner/unittests/tscWatch/watchApi.ts b/src/testRunner/unittests/tscWatch/watchApi.ts index 1f8e6077b6f40..9565b608b5186 100644 --- a/src/testRunner/unittests/tscWatch/watchApi.ts +++ b/src/testRunner/unittests/tscWatch/watchApi.ts @@ -1,17 +1,9 @@ import * as Harness from "../../_namespaces/Harness"; import * as ts from "../../_namespaces/ts"; -import { - dedent, -} from "../../_namespaces/Utils"; -import { - jsonToReadableText, -} from "../helpers"; -import { - commandLineCallbacks, -} from "../helpers/baseline"; -import { - libContent, -} from "../helpers/contents"; +import { dedent } from "../../_namespaces/Utils"; +import { jsonToReadableText } from "../helpers"; +import { commandLineCallbacks } from "../helpers/baseline"; +import { libContent } from "../helpers/contents"; import { applyEdit, createBaseline, diff --git a/src/testRunner/unittests/tscWatch/watchEnvironment.ts b/src/testRunner/unittests/tscWatch/watchEnvironment.ts index 3cbe266763c1f..9fb9f51e62833 100644 --- a/src/testRunner/unittests/tscWatch/watchEnvironment.ts +++ b/src/testRunner/unittests/tscWatch/watchEnvironment.ts @@ -1,7 +1,5 @@ import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { commonFile1, commonFile2, diff --git a/src/testRunner/unittests/tsserver/autoImportProvider.ts b/src/testRunner/unittests/tsserver/autoImportProvider.ts index ea95cc427b2aa..b223a287db3ef 100644 --- a/src/testRunner/unittests/tsserver/autoImportProvider.ts +++ b/src/testRunner/unittests/tsserver/autoImportProvider.ts @@ -1,7 +1,5 @@ import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { baselineTsserverLogs, closeFilesForSession, diff --git a/src/testRunner/unittests/tsserver/auxiliaryProject.ts b/src/testRunner/unittests/tsserver/auxiliaryProject.ts index cc14c79aeff2e..b030d17429387 100644 --- a/src/testRunner/unittests/tsserver/auxiliaryProject.ts +++ b/src/testRunner/unittests/tsserver/auxiliaryProject.ts @@ -1,10 +1,6 @@ import * as ts from "../../_namespaces/ts"; -import { - dedent, -} from "../../_namespaces/Utils"; -import { - jsonToReadableText, -} from "../helpers"; +import { dedent } from "../../_namespaces/Utils"; +import { jsonToReadableText } from "../helpers"; import { baselineTsserverLogs, openFilesForSession, diff --git a/src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts b/src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts index 184da488e05c7..56854dd05894e 100644 --- a/src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts +++ b/src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts @@ -1,13 +1,7 @@ -import { - IncrementalVerifierCallbacks, -} from "../../../harness/incrementalUtils"; -import { - LoggerWithInMemoryLogs, -} from "../../../harness/tsserverLogger"; +import { IncrementalVerifierCallbacks } from "../../../harness/incrementalUtils"; +import { LoggerWithInMemoryLogs } from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { baselineTsserverLogs, logDiagnostics, diff --git a/src/testRunner/unittests/tsserver/cancellationToken.ts b/src/testRunner/unittests/tsserver/cancellationToken.ts index 8a41996a29474..7feaac7c930ca 100644 --- a/src/testRunner/unittests/tsserver/cancellationToken.ts +++ b/src/testRunner/unittests/tsserver/cancellationToken.ts @@ -1,15 +1,11 @@ import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { baselineTsserverLogs, TestSession, TestSessionRequest, } from "../helpers/tsserver"; -import { - createServerHost, -} from "../helpers/virtualFileSystemWithWatch"; +import { createServerHost } from "../helpers/virtualFileSystemWithWatch"; describe("unittests:: tsserver:: cancellationToken", () => { // Disable sourcemap support for the duration of the test, as sourcemapping the errors generated during this test is slow and not something we care to test diff --git a/src/testRunner/unittests/tsserver/codeFix.ts b/src/testRunner/unittests/tsserver/codeFix.ts index 97ff4c4058c9b..3b22ca80a5c5d 100644 --- a/src/testRunner/unittests/tsserver/codeFix.ts +++ b/src/testRunner/unittests/tsserver/codeFix.ts @@ -1,7 +1,5 @@ import * as ts from "../../_namespaces/ts"; -import { - dedent, -} from "../../_namespaces/Utils"; +import { dedent } from "../../_namespaces/Utils"; import { baselineTsserverLogs, openFilesForSession, diff --git a/src/testRunner/unittests/tsserver/compileOnSave.ts b/src/testRunner/unittests/tsserver/compileOnSave.ts index ed3a9e2354335..2d85bea12db48 100644 --- a/src/testRunner/unittests/tsserver/compileOnSave.ts +++ b/src/testRunner/unittests/tsserver/compileOnSave.ts @@ -3,9 +3,7 @@ import { LoggerWithInMemoryLogs, } from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { baselineTsserverLogs, openExternalProjectForSession, diff --git a/src/testRunner/unittests/tsserver/completions.ts b/src/testRunner/unittests/tsserver/completions.ts index 2743b52b56c1b..6b0148e3c1cdd 100644 --- a/src/testRunner/unittests/tsserver/completions.ts +++ b/src/testRunner/unittests/tsserver/completions.ts @@ -1,7 +1,5 @@ import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { baselineTsserverLogs, openFilesForSession, diff --git a/src/testRunner/unittests/tsserver/configuredProjects.ts b/src/testRunner/unittests/tsserver/configuredProjects.ts index d5182830f2cc9..7973cef3b1249 100644 --- a/src/testRunner/unittests/tsserver/configuredProjects.ts +++ b/src/testRunner/unittests/tsserver/configuredProjects.ts @@ -1,10 +1,6 @@ import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; -import { - ensureErrorFreeBuild, -} from "../helpers/solutionBuilder"; +import { jsonToReadableText } from "../helpers"; +import { ensureErrorFreeBuild } from "../helpers/solutionBuilder"; import { commonFile1, commonFile2, diff --git a/src/testRunner/unittests/tsserver/declarationFileMaps.ts b/src/testRunner/unittests/tsserver/declarationFileMaps.ts index 7e01ce4f79e9a..f46a08399d372 100644 --- a/src/testRunner/unittests/tsserver/declarationFileMaps.ts +++ b/src/testRunner/unittests/tsserver/declarationFileMaps.ts @@ -1,7 +1,5 @@ import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { baselineTsserverLogs, closeFilesForSession, diff --git a/src/testRunner/unittests/tsserver/documentRegistry.ts b/src/testRunner/unittests/tsserver/documentRegistry.ts index 01f9dfc124245..449c076118ae2 100644 --- a/src/testRunner/unittests/tsserver/documentRegistry.ts +++ b/src/testRunner/unittests/tsserver/documentRegistry.ts @@ -1,10 +1,6 @@ -import { - reportDocumentRegistryStats, -} from "../../../harness/incrementalUtils"; +import { reportDocumentRegistryStats } from "../../../harness/incrementalUtils"; import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { baselineTsserverLogs, closeFilesForSession, diff --git a/src/testRunner/unittests/tsserver/duplicatePackages.ts b/src/testRunner/unittests/tsserver/duplicatePackages.ts index 8413022207d8f..2a5078493127d 100644 --- a/src/testRunner/unittests/tsserver/duplicatePackages.ts +++ b/src/testRunner/unittests/tsserver/duplicatePackages.ts @@ -1,7 +1,5 @@ import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { baselineTsserverLogs, openFilesForSession, diff --git a/src/testRunner/unittests/tsserver/events/largeFileReferenced.ts b/src/testRunner/unittests/tsserver/events/largeFileReferenced.ts index a0cce09a03992..f596808ad1232 100644 --- a/src/testRunner/unittests/tsserver/events/largeFileReferenced.ts +++ b/src/testRunner/unittests/tsserver/events/largeFileReferenced.ts @@ -1,7 +1,5 @@ import * as ts from "../../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../../helpers"; +import { jsonToReadableText } from "../../helpers"; import { baselineTsserverLogs, openFilesForSession, diff --git a/src/testRunner/unittests/tsserver/events/projectLanguageServiceState.ts b/src/testRunner/unittests/tsserver/events/projectLanguageServiceState.ts index a66d4a76363df..86b70c73a0d93 100644 --- a/src/testRunner/unittests/tsserver/events/projectLanguageServiceState.ts +++ b/src/testRunner/unittests/tsserver/events/projectLanguageServiceState.ts @@ -1,7 +1,5 @@ import * as ts from "../../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../../helpers"; +import { jsonToReadableText } from "../../helpers"; import { baselineTsserverLogs, openFilesForSession, diff --git a/src/testRunner/unittests/tsserver/events/projectLoading.ts b/src/testRunner/unittests/tsserver/events/projectLoading.ts index b636a8008d628..928385c5d7d70 100644 --- a/src/testRunner/unittests/tsserver/events/projectLoading.ts +++ b/src/testRunner/unittests/tsserver/events/projectLoading.ts @@ -1,7 +1,5 @@ import * as ts from "../../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../../helpers"; +import { jsonToReadableText } from "../../helpers"; import { baselineTsserverLogs, createSessionWithCustomEventHandler, diff --git a/src/testRunner/unittests/tsserver/events/projectUpdatedInBackground.ts b/src/testRunner/unittests/tsserver/events/projectUpdatedInBackground.ts index abf1d24bcc39b..853d503d86467 100644 --- a/src/testRunner/unittests/tsserver/events/projectUpdatedInBackground.ts +++ b/src/testRunner/unittests/tsserver/events/projectUpdatedInBackground.ts @@ -1,7 +1,5 @@ import * as ts from "../../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../../helpers"; +import { jsonToReadableText } from "../../helpers"; import { baselineTsserverLogs, createSessionWithCustomEventHandler, diff --git a/src/testRunner/unittests/tsserver/exportMapCache.ts b/src/testRunner/unittests/tsserver/exportMapCache.ts index bcb719106d30f..d2aa99bb6dae1 100644 --- a/src/testRunner/unittests/tsserver/exportMapCache.ts +++ b/src/testRunner/unittests/tsserver/exportMapCache.ts @@ -1,7 +1,5 @@ import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { baselineTsserverLogs, closeFilesForSession, diff --git a/src/testRunner/unittests/tsserver/extends.ts b/src/testRunner/unittests/tsserver/extends.ts index d37b69aafbaf8..a722c8a0dfb0e 100644 --- a/src/testRunner/unittests/tsserver/extends.ts +++ b/src/testRunner/unittests/tsserver/extends.ts @@ -1,6 +1,4 @@ -import { - getSymlinkedExtendsSys, -} from "../helpers/extends"; +import { getSymlinkedExtendsSys } from "../helpers/extends"; import { baselineTsserverLogs, openFilesForSession, diff --git a/src/testRunner/unittests/tsserver/externalProjects.ts b/src/testRunner/unittests/tsserver/externalProjects.ts index 84ed0c67622a8..a134fb28e5573 100644 --- a/src/testRunner/unittests/tsserver/externalProjects.ts +++ b/src/testRunner/unittests/tsserver/externalProjects.ts @@ -1,8 +1,6 @@ import * as Harness from "../../_namespaces/Harness"; import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { baselineTsserverLogs, closeFilesForSession, diff --git a/src/testRunner/unittests/tsserver/findAllReferences.ts b/src/testRunner/unittests/tsserver/findAllReferences.ts index 485acd4c85f8b..f2be8e7887a12 100644 --- a/src/testRunner/unittests/tsserver/findAllReferences.ts +++ b/src/testRunner/unittests/tsserver/findAllReferences.ts @@ -1,6 +1,4 @@ -import { - protocol, -} from "../../_namespaces/ts.server"; +import { protocol } from "../../_namespaces/ts.server"; import { baselineTsserverLogs, TestSession, diff --git a/src/testRunner/unittests/tsserver/forceConsistentCasingInFileNames.ts b/src/testRunner/unittests/tsserver/forceConsistentCasingInFileNames.ts index bb14ea25d7c0d..3bec79f503616 100644 --- a/src/testRunner/unittests/tsserver/forceConsistentCasingInFileNames.ts +++ b/src/testRunner/unittests/tsserver/forceConsistentCasingInFileNames.ts @@ -1,10 +1,6 @@ import * as ts from "../../_namespaces/ts"; -import { - dedent, -} from "../../_namespaces/Utils"; -import { - jsonToReadableText, -} from "../helpers"; +import { dedent } from "../../_namespaces/Utils"; +import { jsonToReadableText } from "../helpers"; import { baselineTsserverLogs, closeFilesForSession, diff --git a/src/testRunner/unittests/tsserver/formatSettings.ts b/src/testRunner/unittests/tsserver/formatSettings.ts index 0415f416c4f0f..213ea404860f1 100644 --- a/src/testRunner/unittests/tsserver/formatSettings.ts +++ b/src/testRunner/unittests/tsserver/formatSettings.ts @@ -1,15 +1,11 @@ import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { baselineTsserverLogs, openFilesForSession, TestSession, } from "../helpers/tsserver"; -import { - createServerHost, -} from "../helpers/virtualFileSystemWithWatch"; +import { createServerHost } from "../helpers/virtualFileSystemWithWatch"; describe("unittests:: tsserver:: formatSettings", () => { it("can be set globally", () => { diff --git a/src/testRunner/unittests/tsserver/getEditsForFileRename.ts b/src/testRunner/unittests/tsserver/getEditsForFileRename.ts index 463670439867a..54025265b275f 100644 --- a/src/testRunner/unittests/tsserver/getEditsForFileRename.ts +++ b/src/testRunner/unittests/tsserver/getEditsForFileRename.ts @@ -1,7 +1,5 @@ import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { baselineTsserverLogs, openFilesForSession, diff --git a/src/testRunner/unittests/tsserver/getMoveToRefactoringFileSuggestions.ts b/src/testRunner/unittests/tsserver/getMoveToRefactoringFileSuggestions.ts index ace602019ccaf..90d7fa870edb1 100644 --- a/src/testRunner/unittests/tsserver/getMoveToRefactoringFileSuggestions.ts +++ b/src/testRunner/unittests/tsserver/getMoveToRefactoringFileSuggestions.ts @@ -1,7 +1,5 @@ import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { baselineTsserverLogs, openFilesForSession, diff --git a/src/testRunner/unittests/tsserver/goToDefinition.ts b/src/testRunner/unittests/tsserver/goToDefinition.ts index 09d147d1577dc..c08b827e7528c 100644 --- a/src/testRunner/unittests/tsserver/goToDefinition.ts +++ b/src/testRunner/unittests/tsserver/goToDefinition.ts @@ -1,6 +1,4 @@ -import { - protocol, -} from "../../_namespaces/ts.server"; +import { protocol } from "../../_namespaces/ts.server"; import { baselineTsserverLogs, TestSession, diff --git a/src/testRunner/unittests/tsserver/importHelpers.ts b/src/testRunner/unittests/tsserver/importHelpers.ts index 2d340b4a9f1e3..95228dd4266f4 100644 --- a/src/testRunner/unittests/tsserver/importHelpers.ts +++ b/src/testRunner/unittests/tsserver/importHelpers.ts @@ -4,9 +4,7 @@ import { TestSession, toExternalFile, } from "../helpers/tsserver"; -import { - createServerHost, -} from "../helpers/virtualFileSystemWithWatch"; +import { createServerHost } from "../helpers/virtualFileSystemWithWatch"; describe("unittests:: tsserver:: importHelpers", () => { it("should not crash in tsserver", () => { diff --git a/src/testRunner/unittests/tsserver/inconsistentErrorInEditor.ts b/src/testRunner/unittests/tsserver/inconsistentErrorInEditor.ts index 718ade5a3749d..bab2c00a0e13e 100644 --- a/src/testRunner/unittests/tsserver/inconsistentErrorInEditor.ts +++ b/src/testRunner/unittests/tsserver/inconsistentErrorInEditor.ts @@ -4,9 +4,7 @@ import { TestSession, verifyGetErrRequest, } from "../helpers/tsserver"; -import { - createServerHost, -} from "../helpers/virtualFileSystemWithWatch"; +import { createServerHost } from "../helpers/virtualFileSystemWithWatch"; describe("unittests:: tsserver:: inconsistentErrorInEditor", () => { it("should not error", () => { const host = createServerHost([]); diff --git a/src/testRunner/unittests/tsserver/inferredProjects.ts b/src/testRunner/unittests/tsserver/inferredProjects.ts index ac84258c39e58..2dcdb3019162a 100644 --- a/src/testRunner/unittests/tsserver/inferredProjects.ts +++ b/src/testRunner/unittests/tsserver/inferredProjects.ts @@ -1,13 +1,7 @@ import * as ts from "../../_namespaces/ts"; -import { - dedent, -} from "../../_namespaces/Utils"; -import { - jsonToReadableText, -} from "../helpers"; -import { - commonFile1, -} from "../helpers/tscWatch"; +import { dedent } from "../../_namespaces/Utils"; +import { jsonToReadableText } from "../helpers"; +import { commonFile1 } from "../helpers/tscWatch"; import { baselineTsserverLogs, closeFilesForSession, diff --git a/src/testRunner/unittests/tsserver/languageService.ts b/src/testRunner/unittests/tsserver/languageService.ts index 7d4c779e08974..72e972f67d336 100644 --- a/src/testRunner/unittests/tsserver/languageService.ts +++ b/src/testRunner/unittests/tsserver/languageService.ts @@ -5,9 +5,7 @@ import { openFilesForSession, TestSession, } from "../helpers/tsserver"; -import { - createServerHost, -} from "../helpers/virtualFileSystemWithWatch"; +import { createServerHost } from "../helpers/virtualFileSystemWithWatch"; describe("unittests:: tsserver:: languageService", () => { it("should work correctly on case-sensitive file systems", () => { diff --git a/src/testRunner/unittests/tsserver/libraryResolution.ts b/src/testRunner/unittests/tsserver/libraryResolution.ts index b9fbccbe31b0c..23c912ec834d1 100644 --- a/src/testRunner/unittests/tsserver/libraryResolution.ts +++ b/src/testRunner/unittests/tsserver/libraryResolution.ts @@ -1,9 +1,5 @@ -import { - jsonToReadableText, -} from "../helpers"; -import { - getServerHostForLibResolution, -} from "../helpers/libraryResolution"; +import { jsonToReadableText } from "../helpers"; +import { getServerHostForLibResolution } from "../helpers/libraryResolution"; import { baselineTsserverLogs, openFilesForSession, diff --git a/src/testRunner/unittests/tsserver/maxNodeModuleJsDepth.ts b/src/testRunner/unittests/tsserver/maxNodeModuleJsDepth.ts index 1bef59c14fb5e..1db62cbb5fe16 100644 --- a/src/testRunner/unittests/tsserver/maxNodeModuleJsDepth.ts +++ b/src/testRunner/unittests/tsserver/maxNodeModuleJsDepth.ts @@ -1,7 +1,5 @@ import * as ts from "../../_namespaces/ts"; -import { - dedent, -} from "../../_namespaces/Utils"; +import { dedent } from "../../_namespaces/Utils"; import { baselineTsserverLogs, closeFilesForSession, diff --git a/src/testRunner/unittests/tsserver/metadataInResponse.ts b/src/testRunner/unittests/tsserver/metadataInResponse.ts index b60521e3d49b6..fa40e5fdda6dc 100644 --- a/src/testRunner/unittests/tsserver/metadataInResponse.ts +++ b/src/testRunner/unittests/tsserver/metadataInResponse.ts @@ -1,8 +1,6 @@ import * as Harness from "../../_namespaces/Harness"; import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { baselineTsserverLogs, openFilesForSession, diff --git a/src/testRunner/unittests/tsserver/moduleResolution.ts b/src/testRunner/unittests/tsserver/moduleResolution.ts index 5706ab92c80ff..82b8294afe666 100644 --- a/src/testRunner/unittests/tsserver/moduleResolution.ts +++ b/src/testRunner/unittests/tsserver/moduleResolution.ts @@ -1,22 +1,14 @@ import * as ts from "../../_namespaces/ts"; -import { - dedent, -} from "../../_namespaces/Utils"; -import { - jsonToReadableText, -} from "../helpers"; +import { dedent } from "../../_namespaces/Utils"; +import { jsonToReadableText } from "../helpers"; import { getFsConentsForAlternateResultAtTypesPackageJson, getFsContentsForAlternateResult, getFsContentsForAlternateResultDts, getFsContentsForAlternateResultPackageJson, } from "../helpers/alternateResult"; -import { - libContent, -} from "../helpers/contents"; -import { - solutionBuildWithBaseline, -} from "../helpers/solutionBuilder"; +import { libContent } from "../helpers/contents"; +import { solutionBuildWithBaseline } from "../helpers/solutionBuilder"; import { baselineTsserverLogs, openFilesForSession, diff --git a/src/testRunner/unittests/tsserver/moduleSpecifierCache.ts b/src/testRunner/unittests/tsserver/moduleSpecifierCache.ts index 82d885e748a2c..773d6c2c651d1 100644 --- a/src/testRunner/unittests/tsserver/moduleSpecifierCache.ts +++ b/src/testRunner/unittests/tsserver/moduleSpecifierCache.ts @@ -1,7 +1,5 @@ import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { baselineTsserverLogs, openFilesForSession, diff --git a/src/testRunner/unittests/tsserver/navTo.ts b/src/testRunner/unittests/tsserver/navTo.ts index 9346a0ef04566..1df2f1e36e300 100644 --- a/src/testRunner/unittests/tsserver/navTo.ts +++ b/src/testRunner/unittests/tsserver/navTo.ts @@ -1,7 +1,5 @@ import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { baselineTsserverLogs, openFilesForSession, diff --git a/src/testRunner/unittests/tsserver/packageJsonInfo.ts b/src/testRunner/unittests/tsserver/packageJsonInfo.ts index 953e24e907939..f258be6cab492 100644 --- a/src/testRunner/unittests/tsserver/packageJsonInfo.ts +++ b/src/testRunner/unittests/tsserver/packageJsonInfo.ts @@ -1,6 +1,4 @@ -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { baselineTsserverLogs, openFilesForSession, diff --git a/src/testRunner/unittests/tsserver/plugins.ts b/src/testRunner/unittests/tsserver/plugins.ts index d5985a0212dce..9d24ecb3c1aaf 100644 --- a/src/testRunner/unittests/tsserver/plugins.ts +++ b/src/testRunner/unittests/tsserver/plugins.ts @@ -1,8 +1,6 @@ import * as Harness from "../../_namespaces/Harness"; import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { baselineTsserverLogs, openFilesForSession, diff --git a/src/testRunner/unittests/tsserver/pluginsAsync.ts b/src/testRunner/unittests/tsserver/pluginsAsync.ts index cc5a7e4f7ad75..15de233b9ca78 100644 --- a/src/testRunner/unittests/tsserver/pluginsAsync.ts +++ b/src/testRunner/unittests/tsserver/pluginsAsync.ts @@ -1,7 +1,5 @@ import * as ts from "../../_namespaces/ts"; -import { - defer, -} from "../../_namespaces/Utils"; +import { defer } from "../../_namespaces/Utils"; import { baselineTsserverLogs, closeFilesForSession, diff --git a/src/testRunner/unittests/tsserver/projectErrors.ts b/src/testRunner/unittests/tsserver/projectErrors.ts index 21c6548e42b16..baf7ac07c8987 100644 --- a/src/testRunner/unittests/tsserver/projectErrors.ts +++ b/src/testRunner/unittests/tsserver/projectErrors.ts @@ -1,7 +1,5 @@ import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { baselineTsserverLogs, closeFilesForSession, diff --git a/src/testRunner/unittests/tsserver/projectReferenceCompileOnSave.ts b/src/testRunner/unittests/tsserver/projectReferenceCompileOnSave.ts index 004816c0a0a75..80cf128b37c82 100644 --- a/src/testRunner/unittests/tsserver/projectReferenceCompileOnSave.ts +++ b/src/testRunner/unittests/tsserver/projectReferenceCompileOnSave.ts @@ -1,10 +1,6 @@ import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; -import { - ensureErrorFreeBuild, -} from "../helpers/solutionBuilder"; +import { jsonToReadableText } from "../helpers"; +import { ensureErrorFreeBuild } from "../helpers/solutionBuilder"; import { baselineTsserverLogs, openFilesForSession, diff --git a/src/testRunner/unittests/tsserver/projectReferenceErrors.ts b/src/testRunner/unittests/tsserver/projectReferenceErrors.ts index 584ea277b539d..b6a5c0e366277 100644 --- a/src/testRunner/unittests/tsserver/projectReferenceErrors.ts +++ b/src/testRunner/unittests/tsserver/projectReferenceErrors.ts @@ -1,13 +1,9 @@ -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { GetErrForProjectDiagnostics, verifyGetErrScenario, } from "../helpers/tsserver"; -import { - File, -} from "../helpers/virtualFileSystemWithWatch"; +import { File } from "../helpers/virtualFileSystemWithWatch"; describe("unittests:: tsserver:: with project references and error reporting", () => { const dependecyLocation = `/user/username/projects/myproject/dependency`; diff --git a/src/testRunner/unittests/tsserver/projectReferences.ts b/src/testRunner/unittests/tsserver/projectReferences.ts index 7ed29fa1f3af7..c579eca556c11 100644 --- a/src/testRunner/unittests/tsserver/projectReferences.ts +++ b/src/testRunner/unittests/tsserver/projectReferences.ts @@ -1,13 +1,7 @@ import * as ts from "../../_namespaces/ts"; -import { - dedent, -} from "../../_namespaces/Utils"; -import { - jsonToReadableText, -} from "../helpers"; -import { - solutionBuildWithBaseline, -} from "../helpers/solutionBuilder"; +import { dedent } from "../../_namespaces/Utils"; +import { jsonToReadableText } from "../helpers"; +import { solutionBuildWithBaseline } from "../helpers/solutionBuilder"; import { baselineTsserverLogs, closeFilesForSession, diff --git a/src/testRunner/unittests/tsserver/projectReferencesSourcemap.ts b/src/testRunner/unittests/tsserver/projectReferencesSourcemap.ts index 5880e2307c18d..bec4bbbd0701f 100644 --- a/src/testRunner/unittests/tsserver/projectReferencesSourcemap.ts +++ b/src/testRunner/unittests/tsserver/projectReferencesSourcemap.ts @@ -1,7 +1,5 @@ import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { baselineTsserverLogs, closeFilesForSession, diff --git a/src/testRunner/unittests/tsserver/projects.ts b/src/testRunner/unittests/tsserver/projects.ts index f5928a63682f0..6dac7fa3763ab 100644 --- a/src/testRunner/unittests/tsserver/projects.ts +++ b/src/testRunner/unittests/tsserver/projects.ts @@ -1,10 +1,6 @@ -import { - createLoggerWithInMemoryLogs, -} from "../../../harness/tsserverLogger"; +import { createLoggerWithInMemoryLogs } from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { commonFile1, commonFile2, @@ -22,9 +18,7 @@ import { toExternalFiles, verifyGetErrRequest, } from "../helpers/tsserver"; -import { - customTypesMap, -} from "../helpers/typingsInstaller"; +import { customTypesMap } from "../helpers/typingsInstaller"; import { createServerHost, File, diff --git a/src/testRunner/unittests/tsserver/projectsWithReferences.ts b/src/testRunner/unittests/tsserver/projectsWithReferences.ts index d307a94aeb44c..66e11ebcc9187 100644 --- a/src/testRunner/unittests/tsserver/projectsWithReferences.ts +++ b/src/testRunner/unittests/tsserver/projectsWithReferences.ts @@ -1,9 +1,5 @@ -import { - jsonToReadableText, -} from "../helpers"; -import { - getFsContentsForSampleProjectReferences, -} from "../helpers/sampleProjectReferences"; +import { jsonToReadableText } from "../helpers"; +import { getFsContentsForSampleProjectReferences } from "../helpers/sampleProjectReferences"; import { baselineTsserverLogs, openFilesForSession, diff --git a/src/testRunner/unittests/tsserver/reloadProjects.ts b/src/testRunner/unittests/tsserver/reloadProjects.ts index 665430ad0d87d..5c0a8b4934a9d 100644 --- a/src/testRunner/unittests/tsserver/reloadProjects.ts +++ b/src/testRunner/unittests/tsserver/reloadProjects.ts @@ -1,7 +1,5 @@ import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { baselineTsserverLogs, openExternalProjectForSession, diff --git a/src/testRunner/unittests/tsserver/rename.ts b/src/testRunner/unittests/tsserver/rename.ts index c967cf05a6a5f..a46816203ece4 100644 --- a/src/testRunner/unittests/tsserver/rename.ts +++ b/src/testRunner/unittests/tsserver/rename.ts @@ -1,13 +1,7 @@ import * as ts from "../../_namespaces/ts"; -import { - dedent, -} from "../../_namespaces/Utils"; -import { - jsonToReadableText, -} from "../helpers"; -import { - libContent, -} from "../helpers/contents"; +import { dedent } from "../../_namespaces/Utils"; +import { jsonToReadableText } from "../helpers"; +import { libContent } from "../helpers/contents"; import { baselineTsserverLogs, openFilesForSession, diff --git a/src/testRunner/unittests/tsserver/resolutionCache.ts b/src/testRunner/unittests/tsserver/resolutionCache.ts index 4d61db308c355..507e236f6cd50 100644 --- a/src/testRunner/unittests/tsserver/resolutionCache.ts +++ b/src/testRunner/unittests/tsserver/resolutionCache.ts @@ -1,11 +1,7 @@ import * as ts from "../../_namespaces/ts"; import * as Utils from "../../_namespaces/Utils"; -import { - jsonToReadableText, -} from "../helpers"; -import { - compilerOptionsToConfigJson, -} from "../helpers/contents"; +import { jsonToReadableText } from "../helpers"; +import { compilerOptionsToConfigJson } from "../helpers/contents"; import { baselineTsserverLogs, openExternalProjectForSession, diff --git a/src/testRunner/unittests/tsserver/session.ts b/src/testRunner/unittests/tsserver/session.ts index 6fb2fb4f4edbe..b567c6d1d6172 100644 --- a/src/testRunner/unittests/tsserver/session.ts +++ b/src/testRunner/unittests/tsserver/session.ts @@ -1,10 +1,6 @@ -import { - expect, -} from "chai"; +import { expect } from "chai"; -import { - incrementalVerifier, -} from "../../../harness/incrementalUtils"; +import { incrementalVerifier } from "../../../harness/incrementalUtils"; import { createHasErrorMessageLogger, nullLogger, diff --git a/src/testRunner/unittests/tsserver/skipLibCheck.ts b/src/testRunner/unittests/tsserver/skipLibCheck.ts index 2591af7276b8e..e31d8103fbfb8 100644 --- a/src/testRunner/unittests/tsserver/skipLibCheck.ts +++ b/src/testRunner/unittests/tsserver/skipLibCheck.ts @@ -1,7 +1,5 @@ import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { baselineTsserverLogs, openExternalProjectForSession, @@ -9,9 +7,7 @@ import { TestSession, toExternalFiles, } from "../helpers/tsserver"; -import { - createServerHost, -} from "../helpers/virtualFileSystemWithWatch"; +import { createServerHost } from "../helpers/virtualFileSystemWithWatch"; describe("unittests:: tsserver:: with skipLibCheck", () => { it("should be turned on for js-only inferred projects", () => { diff --git a/src/testRunner/unittests/tsserver/symLinks.ts b/src/testRunner/unittests/tsserver/symLinks.ts index b35cf23e8242d..d80c8940a6033 100644 --- a/src/testRunner/unittests/tsserver/symLinks.ts +++ b/src/testRunner/unittests/tsserver/symLinks.ts @@ -1,10 +1,6 @@ import * as ts from "../../_namespaces/ts"; -import { - dedent, -} from "../../_namespaces/Utils"; -import { - jsonToReadableText, -} from "../helpers"; +import { dedent } from "../../_namespaces/Utils"; +import { jsonToReadableText } from "../helpers"; import { baselineTsserverLogs, closeFilesForSession, diff --git a/src/testRunner/unittests/tsserver/telemetry.ts b/src/testRunner/unittests/tsserver/telemetry.ts index dcbece49ecda5..6dab706cab254 100644 --- a/src/testRunner/unittests/tsserver/telemetry.ts +++ b/src/testRunner/unittests/tsserver/telemetry.ts @@ -1,7 +1,5 @@ import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { baselineTsserverLogs, closeFilesForSession, diff --git a/src/testRunner/unittests/tsserver/textStorage.ts b/src/testRunner/unittests/tsserver/textStorage.ts index 6b1d6fee89f10..e3a617e430760 100644 --- a/src/testRunner/unittests/tsserver/textStorage.ts +++ b/src/testRunner/unittests/tsserver/textStorage.ts @@ -4,9 +4,7 @@ import { openFilesForSession, TestSession, } from "../helpers/tsserver"; -import { - createServerHost, -} from "../helpers/virtualFileSystemWithWatch"; +import { createServerHost } from "../helpers/virtualFileSystemWithWatch"; describe("unittests:: tsserver:: Text storage", () => { const f = { diff --git a/src/testRunner/unittests/tsserver/typeAquisition.ts b/src/testRunner/unittests/tsserver/typeAquisition.ts index 7cd16e6795f01..f8f543a1511bb 100644 --- a/src/testRunner/unittests/tsserver/typeAquisition.ts +++ b/src/testRunner/unittests/tsserver/typeAquisition.ts @@ -1,6 +1,4 @@ -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { baselineTsserverLogs, openExternalProjectForSession, @@ -8,9 +6,7 @@ import { TestSession, toExternalFile, } from "../helpers/tsserver"; -import { - createServerHost, -} from "../helpers/virtualFileSystemWithWatch"; +import { createServerHost } from "../helpers/virtualFileSystemWithWatch"; describe("unittests:: tsserver:: typeAquisition:: autoDiscovery", () => { it("does not depend on extension", () => { diff --git a/src/testRunner/unittests/tsserver/typeReferenceDirectives.ts b/src/testRunner/unittests/tsserver/typeReferenceDirectives.ts index cd533f56bb918..af0757d12889f 100644 --- a/src/testRunner/unittests/tsserver/typeReferenceDirectives.ts +++ b/src/testRunner/unittests/tsserver/typeReferenceDirectives.ts @@ -1,6 +1,4 @@ -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { baselineTsserverLogs, openFilesForSession, diff --git a/src/testRunner/unittests/tsserver/typingsInstaller.ts b/src/testRunner/unittests/tsserver/typingsInstaller.ts index 9a869bd70ff4f..cc4c9633e5347 100644 --- a/src/testRunner/unittests/tsserver/typingsInstaller.ts +++ b/src/testRunner/unittests/tsserver/typingsInstaller.ts @@ -29,12 +29,8 @@ import { import validatePackageName = ts.JsTyping.validatePackageName; import NameValidationResult = ts.JsTyping.NameValidationResult; -import { - stringifyIndented, -} from "../../_namespaces/ts.server"; -import { - jsonToReadableText, -} from "../helpers"; +import { stringifyIndented } from "../../_namespaces/ts.server"; +import { jsonToReadableText } from "../helpers"; describe("unittests:: tsserver:: typingsInstaller:: local module", () => { it("should not be picked up", () => { diff --git a/src/testRunner/unittests/tsserver/watchEnvironment.ts b/src/testRunner/unittests/tsserver/watchEnvironment.ts index 10c79c8706cc1..58136c4aaa88a 100644 --- a/src/testRunner/unittests/tsserver/watchEnvironment.ts +++ b/src/testRunner/unittests/tsserver/watchEnvironment.ts @@ -3,9 +3,7 @@ import { LoggerWithInMemoryLogs, } from "../../../harness/tsserverLogger"; import * as ts from "../../_namespaces/ts"; -import { - jsonToReadableText, -} from "../helpers"; +import { jsonToReadableText } from "../helpers"; import { commonFile1, commonFile2, diff --git a/src/tsserver/server.ts b/src/tsserver/server.ts index a7966729aad97..3049187b8be1a 100644 --- a/src/tsserver/server.ts +++ b/src/tsserver/server.ts @@ -1,10 +1,6 @@ import * as ts from "../typescript/typescript"; -import { - StartInput, -} from "./common"; -import { - initializeNodeSystem, -} from "./nodeServer"; +import { StartInput } from "./common"; +import { initializeNodeSystem } from "./nodeServer"; function findArgumentStringArray(argName: string): readonly string[] { const arg = ts.server.findArgument(argName);