mirror of
https://github.com/microsoft/TypeScript.git
synced 2026-05-29 16:29:19 -05:00
Update dprint, don't force multiline imports for imports of single name (#58038)
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import {
|
||||
existsSync,
|
||||
} from "fs";
|
||||
import { existsSync } from "fs";
|
||||
import {
|
||||
dirname,
|
||||
join,
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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,
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
import assert from "assert";
|
||||
import {
|
||||
execFileSync,
|
||||
} from "child_process";
|
||||
import { execFileSync } from "child_process";
|
||||
import {
|
||||
readFileSync,
|
||||
writeFileSync,
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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");
|
||||
|
||||
@@ -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];
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import {
|
||||
XMLParser,
|
||||
} from "fast-xml-parser";
|
||||
import { XMLParser } from "fast-xml-parser";
|
||||
import fs from "fs";
|
||||
import path from "path";
|
||||
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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";
|
||||
|
||||
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user