Skip to content

Commit 4cedfe4

Browse files
authored
Update dprint, don't force multiline imports for imports of single name (microsoft#58038)
1 parent 66f5be9 commit 4cedfe4

File tree

205 files changed

+388
-1156
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

205 files changed

+388
-1156
lines changed

.dprint.jsonc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"arrowFunction.useParentheses": "preferNone",
2020
"conditionalExpression.linePerExpression": false, // Keep our "match/case"-ish conditionals.
2121
"functionExpression.spaceAfterFunctionKeyword": true,
22-
"importDeclaration.forceMultiLine": true,
22+
"importDeclaration.forceMultiLine": "whenMultiple",
2323
"constructorType.spaceAfterNewKeyword": true,
2424
"constructSignature.spaceAfterNewKeyword": true,
2525

@@ -57,8 +57,8 @@
5757
],
5858
// Note: if adding new languages, make sure settings.template.json is updated too.
5959
"plugins": [
60-
"https://plugins.dprint.dev/typescript-0.88.9.wasm",
61-
"https://plugins.dprint.dev/json-0.19.1.wasm",
62-
"https://plugins.dprint.dev/prettier-0.35.0.json@0df49c4d878bb1051af2fa1d1f69ba6400f4b78633f49baa1f38954a6fd32b40"
60+
"https://plugins.dprint.dev/typescript-0.90.0.wasm",
61+
"https://plugins.dprint.dev/json-0.19.2.wasm",
62+
"https://plugins.dprint.dev/prettier-0.39.0.json@896b70f29ef8213c1b0ba81a93cee9c2d4f39ac2194040313cd433906db7bc7c"
6363
]
6464
}

Herebyfile.mjs

Lines changed: 5 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,16 @@
11
// @ts-check
2-
import {
3-
CancelToken,
4-
} from "@esfx/canceltoken";
2+
import { CancelToken } from "@esfx/canceltoken";
53
import assert from "assert";
64
import chalk from "chalk";
75
import chokidar from "chokidar";
86
import esbuild from "esbuild";
9-
import {
10-
EventEmitter,
11-
} from "events";
7+
import { EventEmitter } from "events";
128
import fs from "fs";
13-
import {
14-
glob,
15-
} from "glob";
16-
import {
17-
task,
18-
} from "hereby";
9+
import { glob } from "glob";
10+
import { task } from "hereby";
1911
import path from "path";
2012

21-
import {
22-
localizationDirectories,
23-
} from "./scripts/build/localization.mjs";
13+
import { localizationDirectories } from "./scripts/build/localization.mjs";
2414
import cmdLineOptions from "./scripts/build/options.mjs";
2515
import {
2616
buildProject,

scripts/browserIntegrationTest.mjs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
11
import chalk from "chalk";
2-
import {
3-
readFileSync,
4-
} from "fs";
5-
import {
6-
join,
7-
} from "path";
2+
import { readFileSync } from "fs";
3+
import { join } from "path";
84
import playwright from "playwright";
95

106
// Turning this on will leave the Chromium browser open, giving you the

scripts/build/findUpDir.mjs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import {
2-
existsSync,
3-
} from "fs";
1+
import { existsSync } from "fs";
42
import {
53
dirname,
64
join,

scripts/build/projects.mjs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,6 @@
1-
import {
2-
resolve,
3-
} from "path";
1+
import { resolve } from "path";
42

5-
import {
6-
findUpRoot,
7-
} from "./findUpDir.mjs";
3+
import { findUpRoot } from "./findUpDir.mjs";
84
import cmdLineOptions from "./options.mjs";
95
import {
106
Debouncer,

scripts/build/tests.mjs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
import {
2-
CancelError,
3-
} from "@esfx/canceltoken";
1+
import { CancelError } from "@esfx/canceltoken";
42
import chalk from "chalk";
53
import fs from "fs";
64
import os from "os";

scripts/build/utils.mjs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,7 @@
1-
import {
2-
CancelError,
3-
} from "@esfx/canceltoken";
1+
import { CancelError } from "@esfx/canceltoken";
42
import assert from "assert";
53
import chalk from "chalk";
6-
import {
7-
spawn,
8-
} from "child_process";
4+
import { spawn } from "child_process";
95
import fs from "fs";
106
import JSONC from "jsonc-parser";
117
import which from "which";

scripts/checkModuleFormat.mjs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,9 @@
1-
import {
2-
createRequire,
3-
} from "module";
1+
import { createRequire } from "module";
42
import {
53
__importDefault,
64
__importStar,
75
} from "tslib";
8-
import {
9-
pathToFileURL,
10-
} from "url";
6+
import { pathToFileURL } from "url";
117

128
// This script tests that TypeScript's CJS API is structured
139
// as expected. It calls "require" as though it were in CWD,

scripts/configurePrerelease.mjs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import assert from "assert";
2-
import {
3-
execFileSync,
4-
} from "child_process";
2+
import { execFileSync } from "child_process";
53
import {
64
readFileSync,
75
writeFileSync,

scripts/dtsBundler.mjs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,7 @@
55
* bundle as namespaces again, even though the project is modules.
66
*/
77

8-
import assert, {
9-
fail,
10-
} from "assert";
8+
import assert, { fail } from "assert";
119
import cp from "child_process";
1210
import fs from "fs";
1311
import minimist from "minimist";

0 commit comments

Comments
 (0)