Skip to content

Commit 61bfda5

Browse files
authored
chore: Update prettier v3.9 (#18147)
1 parent 57585c0 commit 61bfda5

49 files changed

Lines changed: 129 additions & 319 deletions

File tree

Some content is hidden

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

‎Gulpfile.ts‎

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,11 +109,7 @@ async function generateHelpers(
109109
}
110110

111111
type TypesHelperKind =
112-
| "asserts"
113-
| "ast-types"
114-
| "builders"
115-
| "constants"
116-
| "validators";
112+
"asserts" | "ast-types" | "builders" | "constants" | "validators";
117113

118114
function generateTypeHelpers(
119115
helperKind: TypesHelperKind,

‎babel.config.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -364,7 +364,7 @@ function pluginPackageJsonMacro({ types: t }: PluginAPI) {
364364
// instead of looping through the folders hierarchy
365365

366366
let pkg;
367-
for (let dir = pathUtils.dirname(this.filename!); ; ) {
367+
for (let dir = pathUtils.dirname(this.filename!); ;) {
368368
try {
369369
pkg = fs.readFileSync(pathUtils.join(dir, "package.json"), "utf8");
370370
break;

‎eslint/babel-eslint-plugin-development/src/rules/no-deprecated-clone.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,10 @@ export default {
1414
const scope = context.sourceCode.getScope(node);
1515

1616
const origin = getReferenceOrigin(callee, scope);
17-
if (
18-
!(origin && (origin.kind === "import" || origin.kind === "property"))
19-
)
17+
if (!(
18+
origin &&
19+
(origin.kind === "import" || origin.kind === "property")
20+
))
2021
return;
2122

2223
const { name } = origin;

‎eslint/babel-eslint-plugin-development/src/rules/no-undefined-identifier.ts‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,10 @@ export default {
2424
const scope = context.sourceCode.getScope(node);
2525

2626
const origin = getReferenceOrigin(callee, scope);
27-
if (
28-
!(origin && (origin.kind === "import" || origin.kind === "property"))
29-
)
27+
if (!(
28+
origin &&
29+
(origin.kind === "import" || origin.kind === "property")
30+
))
3031
return;
3132

3233
const { name } = origin;

‎eslint/babel-eslint-plugin-development/src/rules/plugin-name.ts‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,7 @@ export default {
4444

4545
function functionVisitor(
4646
node: (
47-
| FunctionDeclaration
48-
| FunctionExpression
49-
| ArrowFunctionExpression
47+
FunctionDeclaration | FunctionExpression | ArrowFunctionExpression
5048
) &
5149
Rule.NodeParentExtension,
5250
) {

‎eslint/babel-eslint-plugin-development/src/utils/get-reference-origin.ts‎

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -91,9 +91,7 @@ export default function getReferenceOrigin(
9191
// @ts-expect-error upstream typing issue: https://github.com/eslint/eslint/pull/20798
9292
index: definition.index,
9393
functionNode: definition.node as (
94-
| ArrowFunctionExpression
95-
| FunctionDeclaration
96-
| FunctionExpression
94+
ArrowFunctionExpression | FunctionDeclaration | FunctionExpression
9795
) &
9896
Rule.NodeParentExtension,
9997
name: "",
@@ -188,8 +186,7 @@ function getPatternPath(node: Identifier & Rule.NodeParentExtension) {
188186
}
189187
} while (
190188
(current = current.parent.parent as
191-
| (Node & Rule.NodeParentExtension)
192-
| null)
189+
(Node & Rule.NodeParentExtension) | null)
193190
);
194191

195192
return path;

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@
7777
"open": "^11.0.0",
7878
"p-limit": "^7.2.0",
7979
"pkg-pr-new": "^0.0.54",
80-
"prettier": "^3.8.1",
80+
"prettier": "^3.9.5",
8181
"publint": "^0.3.17",
8282
"rollup": "^4.18.0",
8383
"rollup-plugin-dts": "patch:rollup-plugin-dts@npm%3A6.1.0#~/.yarn/patches/rollup-plugin-dts-npm-6.1.0-6d41e665a7.patch",

‎packages/babel-core/src/config/caching.ts‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -371,12 +371,7 @@ function makeSimpleConfigurator(
371371
// Types are limited here so that in the future these values can be used
372372
// as part of Babel's caching logic.
373373
export type SimpleType =
374-
| string
375-
| boolean
376-
| number
377-
| null
378-
| undefined
379-
| Promise<SimpleType>;
374+
string | boolean | number | null | undefined | Promise<SimpleType>;
380375
export function assertSimpleType(value: unknown): SimpleType {
381376
if (isThenable(value)) {
382377
throw new Error(

‎packages/babel-core/src/config/validation/options.ts‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -316,9 +316,7 @@ export type RootInputSourceMapOption = InputSourceMap | boolean;
316316
export type RootMode = "root" | "upward" | "upward-optional";
317317

318318
export type TargetsListOrObject =
319-
| Targets
320-
| InputTargets
321-
| InputTargets["browsers"];
319+
Targets | InputTargets | InputTargets["browsers"];
322320

323321
export type OptionsSource =
324322
| "arguments"

‎packages/babel-generator/src/buffer.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ export default class Buffer {
289289
}
290290

291291
hasContent(): boolean {
292-
return this._last !== 0 /*|| this._queuedChar !== 0*/;
292+
return this._last !== 0; /*|| this._queuedChar !== 0*/
293293
}
294294

295295
/**

0 commit comments

Comments
 (0)