From 4cedfe40b0d2a81b132b6ae2fcca77f0b036c274 Mon Sep 17 00:00:00 2001 From: Jake Bailey <5341706+jakebailey@users.noreply.github.com> Date: Tue, 2 Apr 2024 10:58:16 -0700 Subject: [PATCH] Update dprint, don't force multiline imports for imports of single name (#58038) --- .dprint.jsonc | 8 +++--- 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, 388 insertions(+), 1156 deletions(-) diff --git a/.dprint.jsonc b/.dprint.jsonc index 375cc8b2b1f..35ce92c54f4 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": "whenMultiple", "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" ] } diff --git a/Herebyfile.mjs b/Herebyfile.mjs index fd5e48752b5..10598bd1e65 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 1571abed883..f1fab43f221 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 44bbc658bed..7ee1544a56b 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 70e25766672..c2daf1c1d17 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 af7d401ddc2..d247694dcb3 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 35f8ca63568..aec939861bf 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 39919694722..ed33b5fb003 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 de0d48f0f65..32ad59ece0a 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 e76cad16553..e7ace12303e 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 164f056fef0..e7068a13fce 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 b4aff5913b4..ad116ef5a53 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 72b3e7febcf..531c0702bfa 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 61c39d242a3..05e1bfc0ddb 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 31ddd3f6ed4..fc62527650e 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 47630c43db5..3a71e990113 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 e788836d118..9493115ea1e 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 2815b22775d..d75ef8ef1a8 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 84310b22a55..23dd903c444 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 a10c41604c7..cc138546174 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 4cbd0f86388..20b1afe414e 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 08698bf8b27..fc544bc2e0e 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 122a102fff4..6f755bc02f9 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 fb332bab838..cff377dcb91 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 9f0a906ed32..4110c8032ad 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 32042bdd404..670eef99962 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 7416918ef87..1f81cca4ad7 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 ef332009189..ab163bccbc3 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 0baab10ac44..522bf0933d1 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 28449179243..e06c943aed1 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 5e6dd797556..ee01e0f00a4 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 bd8c13bf767..2a3e3126dd1 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 660f7199ba9..be23fe76439 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 176c0774c2c..ba429310264 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 d3148d5ae60..bec35fd7086 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 71759672452..368bd881096 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 6eccdbb06af..915b59077f8 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 e0d32869e58..164c725f7a9 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 a43121260aa..cd8fe2ad503 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 a84da0a381a..b2a04354e1a 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 b5115345cd5..4000e227a86 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 880f92f0c8e..755d353be1f 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 e1124af61ac..b84894cbc06 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 2187978de38..61736638843 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 1d6149bc1a2..99f2021c161 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 31d9ff664d3..684484c6c2c 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 22d346a7145..2a0e1f458af 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 40fe85fb6cc..f2359ca9922 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 1b050c6a20c..9c1693ac76a 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 2df76a14a40..04748463849 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 c40943be0d3..4019a021bb8 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 7dcf1e1f33a..4443dae958d 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 1c14cdcab23..3a5a979d489 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 e481e707838..d43e1eb8d68 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 47da75c4d93..21cf49ad95b 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 dc5ca993c22..c01f55d7d35 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 d6bf1741b2e..7189d5afbe2 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 88768c4cea0..0ab23e2bf36 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 983acc12325..aef17d25f81 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 31443193675..c0fda49bd28 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 a9ff459f434..7d417940e88 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 f11cbb95693..2e18c5b94e3 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 8a34b6a9099..958371ee25e 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 166aaca4f15..1a1c9154e1a 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 04e74a2977e..94a7acc6c16 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 d206ac66028..7d0667f2416 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 6c683f2c68f..a12caae2052 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 feb2a973f09..5b8a264f75f 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 356b6d67f1f..c5e10c486c7 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 f4afa5184ef..addcd9481da 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 325dcba5665..fe129d78a9a 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 359b2d98241..58df9dc8782 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 5f5c8b14197..c3065e0a0d5 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 ce0312d3f12..b5c27459503 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 96ea65170b6..9e4e7568bb6 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 05bf0d3db9c..4f22b123dc7 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 57b3e206ef2..00ad1d26943 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 f7c2430b9b1..6a21dbd6de0 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 f370d4edbb2..d4375b95ed0 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 5742fd0bed6..da33f6c8a72 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 213245d7119..1aa8cdb8daf 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 6e288575ded..4137e994757 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 87951370032..5f396a4296d 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 366d72699f7..0f9081be8ea 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 6ccc629bece..aee908cc055 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 174ccd1ce48..b486d2ecefe 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 03e9bd3b871..b1c2c0a425d 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 779f0a05186..77cbc6c2da3 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 1346f4e2514..933aa4a67f2 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 8605d1e8fbd..dbf2512e750 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 dbaf4a791c7..f360c588048 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 1b2adbb160e..75780224aa7 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 95cef8c1d24..78f292a10eb 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 5d560ddfaaf..64a7c32d917 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 e6b8d275bb9..61cb5d4aed5 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 4fe269a2ea0..ed854616c3a 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 7085ff7c0cb..9e37a5ce491 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 0a872a15f26..b22d9a61199 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 58e2a779fd3..97747b8bb3b 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 996ff3c3e3b..d52036dd6ad 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 ddf6b77c7e8..1a6b801db5c 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 d0547071413..0e856df73a0 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 6c710661aca..b75f378649e 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 1ad927b06b6..500ea68bf7a 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 b0b1bef064b..6cc71087a21 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 e8c3cb3a5c0..ba6255a2012 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 82e382845fa..396ed09741a 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 08cc01572f5..0b062d53733 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 2f18df2f91f..ebbc53b8a14 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 f67df1a2f70..1c83351fefb 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 dd2c4f0e2ac..a6391cdb9b7 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 3088691fcdb..8c72b41bdd2 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 dca46f0ecf1..2d74e68de27 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 8ef96500031..11d77047fb8 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 307399cb6e1..492172dc37e 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 f14506e74d6..67385b1c702 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 487b160a8f7..6739656e679 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 61088df8c86..168fc249a12 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 a8f730e1922..b431518ec8e 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 381bef09b27..a2df9298c5a 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 4b3ad541e8b..3b385290717 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 6655fcc0249..7cda1715657 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 ebc16575046..d1e82265170 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 0a765e6e3f1..24aa8f61df7 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 31f41193322..58c4055e25d 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 a2f7f49c05d..5a6bb2b29dd 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 efff95327fa..d4a2dd6eab7 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 81fabcfc89d..aee945ede18 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 18049687745..f0437860f0d 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 7d7331c28e4..819c777956f 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 37646f7479a..fc35d072ffb 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 d92f526aaf3..ed26b9a4853 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 3e759eb0b7a..6af2bb7d858 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 f29421b920a..849ad87f06a 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 1585ef391a7..9c9abf7cfd8 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 db8ff56cd72..86d3fdf2c21 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 c78a4ab1b6a..7c7361222e7 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 353eeabb007..27f3a435de3 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 a3778c4ef44..0efbe202e91 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 dc213e7a5c9..d11a142d876 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 820b83a82ed..2f753a4e051 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 0eea0079ca2..b583441801f 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 f860327328d..a6cc9f2ea89 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 36fb5dbede7..cb59a304996 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 c53e697927d..a5ba4c33c3d 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 c02a60e708d..ba76f6f73f2 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 1f8e6077b6f..9565b608b51 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 3cbe266763c..9fb9f51e628 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 ea95cc427b2..b223a287db3 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 cc14c79aeff..b030d174293 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 184da488e05..56854dd0589 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 8a41996a294..7feaac7c930 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 97ff4c4058c..3b22ca80a5c 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 ed3a9e23543..2d85bea12db 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 2743b52b56c..6b0148e3c1c 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 d5182830f2c..7973cef3b12 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 7e01ce4f79e..f46a08399d3 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 01f9dfc1242..449c076118a 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 8413022207d..2a507849312 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 a0cce09a039..f596808ad12 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 a66d4a76363..86b70c73a0d 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 b636a8008d6..928385c5d7d 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 abf1d24bcc3..853d503d864 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 bcb719106d3..d2aa99bb6da 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 d37b69aafba..a722c8a0dfb 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 84ed0c67622..a134fb28e55 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 485acd4c85f..f2be8e7887a 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 bb14ea25d7c..3bec79f5036 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 0415f416c4f..213ea404860 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 46367043986..54025265b27 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 ace602019cc..90d7fa870ed 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 09d147d1577..c08b827e752 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 2d340b4a9f1..95228dd4266 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 718ade5a374..bab2c00a0e1 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 ac84258c39e..2dcdb301916 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 7d4c779e089..72e972f67d3 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 b9fbccbe31b..23c912ec834 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 1bef59c14fb..1db62cbb5fe 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 b60521e3d49..fa40e5fdda6 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 5706ab92c80..82b8294afe6 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 82d885e748a..773d6c2c651 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 9346a0ef045..1df2f1e36e3 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 953e24e9079..f258be6cab4 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 d5985a0212d..9d24ecb3c1a 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 cc5a7e4f7ad..15de233b9ca 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 21c6548e42b..baf7ac07c89 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 004816c0a0a..80cf128b37c 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 584ea277b53..b6a5c0e3662 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 7ed29fa1f3a..c579eca556c 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 5880e2307c1..bec4bbbd070 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 f5928a63682..6dac7fa3763 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 d307a94aeb4..66e11ebcc91 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 665430ad0d8..5c0a8b4934a 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 c967cf05a6a..a46816203ec 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 4d61db308c3..507e236f6cd 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 6fb2fb4f4ed..b567c6d1d61 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 2591af7276b..e31d8103fbf 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 b35cf23e824..d80c8940a60 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 dcbece49ecd..6dab706cab2 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 6b1d6fee89f..e3a617e4307 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 7cd16e6795f..f8f543a1511 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 cd533f56bb9..af0757d1288 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 9a869bd70ff..cc4c9633e53 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 10c79c8706c..58136c4aaa8 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 a7966729aad..3049187b8be 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);