Update dprint, don't force multiline imports for imports of single name (#58038)

This commit is contained in:
Jake Bailey
2024-04-02 10:58:16 -07:00
committed by GitHub
parent 66f5be9c0e
commit 4cedfe40b0
205 changed files with 388 additions and 1156 deletions

View File

@@ -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

View File

@@ -1,6 +1,4 @@
import {
existsSync,
} from "fs";
import { existsSync } from "fs";
import {
dirname,
join,

View File

@@ -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,

View File

@@ -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";

View File

@@ -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";

View File

@@ -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,

View File

@@ -1,7 +1,5 @@
import assert from "assert";
import {
execFileSync,
} from "child_process";
import { execFileSync } from "child_process";
import {
readFileSync,
writeFileSync,

View File

@@ -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";

View File

@@ -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");

View File

@@ -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];

View File

@@ -1,6 +1,4 @@
import {
XMLParser,
} from "fast-xml-parser";
import { XMLParser } from "fast-xml-parser";
import fs from "fs";
import path from "path";

View File

@@ -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);

View File

@@ -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";

View File

@@ -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);