Skip to content

Commit 25be841

Browse files
authored
chore(package): upgrade to prettier@3 (#754)
1 parent aff0d88 commit 25be841

30 files changed

+950
-127
lines changed

lib/error.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function error(
4545
current,
4646
message,
4747
kind,
48-
{ level = "error", autofix, ruleName } = {}
48+
{ level = "error", autofix, ruleName } = {},
4949
) {
5050
/**
5151
* @param {number} count
@@ -83,7 +83,7 @@ function error(
8383
: 1;
8484

8585
const precedingLastLine = lastLine(
86-
tokensToText(sliceTokens(-maxTokens), { precedes: true })
86+
tokensToText(sliceTokens(-maxTokens), { precedes: true }),
8787
);
8888

8989
const subsequentTokens = sliceTokens(maxTokens);
@@ -98,7 +98,7 @@ function error(
9898
const grammaticalContext =
9999
current && current.name
100100
? `, ${contextType} \`${current.partial ? "partial " : ""}${contextAsText(
101-
current
101+
current,
102102
)}\``
103103
: "";
104104
const context = `${kind} error at line ${line}${inSourceName}${grammaticalContext}:\n${sourceContext}`;
@@ -132,7 +132,7 @@ export function validationError(
132132
current,
133133
ruleName,
134134
message,
135-
options = {}
135+
options = {},
136136
) {
137137
options.ruleName = ruleName;
138138
return error(
@@ -141,6 +141,6 @@ export function validationError(
141141
current,
142142
message,
143143
"Validation",
144-
options
144+
options,
145145
);
146146
}

lib/productions/argument.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ export class Argument extends Base {
2323
/** @type {Base["tokens"]} */
2424
const tokens = {};
2525
const ret = autoParenter(
26-
new Argument({ source: tokeniser.source, tokens })
26+
new Argument({ source: tokeniser.source, tokens }),
2727
);
2828
ret.extAttrs = ExtendedAttributes.parse(tokeniser);
2929
tokens.optional = tokeniser.consume("optional");
@@ -73,7 +73,7 @@ export class Argument extends Base {
7373
this.tokens.name,
7474
this,
7575
"no-nullable-dict-arg",
76-
message
76+
message,
7777
);
7878
} else if (!this.optional) {
7979
if (
@@ -89,7 +89,7 @@ export class Argument extends Base {
8989
message,
9090
{
9191
autofix: autofixDictionaryArgumentOptionality(this),
92-
}
92+
},
9393
);
9494
}
9595
} else if (!this.default) {
@@ -101,7 +101,7 @@ export class Argument extends Base {
101101
message,
102102
{
103103
autofix: autofixOptionalDictionaryDefaultValue(this),
104-
}
104+
},
105105
);
106106
}
107107
}

lib/productions/attribute.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,12 @@ export class Attribute extends Base {
2020
*/
2121
static parse(
2222
tokeniser,
23-
{ special, noInherit = false, readonly = false } = {}
23+
{ special, noInherit = false, readonly = false } = {},
2424
) {
2525
const start_position = tokeniser.position;
2626
const tokens = { special };
2727
const ret = autoParenter(
28-
new Attribute({ source: tokeniser.source, tokens })
28+
new Attribute({ source: tokeniser.source, tokens }),
2929
);
3030
if (!special && !noInherit) {
3131
tokens.special = tokeniser.consume("inherit");
@@ -81,7 +81,7 @@ export class Attribute extends Base {
8181
this.tokens.name,
8282
this,
8383
"attr-invalid-type",
84-
message
84+
message,
8585
);
8686
}
8787

@@ -118,7 +118,7 @@ export class Attribute extends Base {
118118
w.name_token(this.tokens.name, { data: this, parent }),
119119
w.token(this.tokens.termination),
120120
]),
121-
{ data: this, parent }
121+
{ data: this, parent },
122122
);
123123
}
124124
}

lib/productions/callback-interface.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ export class CallbackInterface extends Container {
2424
[Constant.parse],
2525
[Operation.parse, { regular: true }],
2626
],
27-
}
27+
},
2828
);
2929
}
3030

lib/productions/callback.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ export class CallbackFunction extends Base {
1313
static parse(tokeniser, base) {
1414
const tokens = { base };
1515
const ret = autoParenter(
16-
new CallbackFunction({ source: tokeniser.source, tokens })
16+
new CallbackFunction({ source: tokeniser.source, tokens }),
1717
);
1818
tokens.name =
1919
tokeniser.consumeKind("identifier") ||
@@ -61,7 +61,7 @@ export class CallbackFunction extends Base {
6161
w.token(this.tokens.close),
6262
w.token(this.tokens.termination),
6363
]),
64-
{ data: this }
64+
{ data: this },
6565
);
6666
}
6767
}

lib/productions/constant.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ export class Constant extends Base {
6868
w.token(this.tokens.value),
6969
w.token(this.tokens.termination),
7070
]),
71-
{ data: this, parent }
71+
{ data: this, parent },
7272
);
7373
}
7474
}

lib/productions/constructor.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ export class Constructor extends Base {
4848
w.token(this.tokens.close),
4949
w.token(this.tokens.termination),
5050
]),
51-
{ data: this, parent }
51+
{ data: this, parent },
5252
);
5353
}
5454
}

lib/productions/container.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ export class Container extends Base {
102102
w.token(this.tokens.colon),
103103
w.ts.trivia(this.tokens.inheritance.trivia),
104104
w.ts.inheritance(
105-
w.reference(this.tokens.inheritance.value, { context: this })
105+
w.reference(this.tokens.inheritance.value, { context: this }),
106106
),
107107
]);
108108
};
@@ -121,7 +121,7 @@ export class Container extends Base {
121121
w.token(this.tokens.close),
122122
w.token(this.tokens.termination),
123123
]),
124-
{ data: this }
124+
{ data: this },
125125
);
126126
}
127127
}

lib/productions/dictionary.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ export class Dictionary extends Container {
2020
{
2121
inheritable: !partial,
2222
allowedMembers: [...extMembers, [Field.parse]],
23-
}
23+
},
2424
);
2525
}
2626

lib/productions/enum.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export class EnumValue extends WrappedToken {
2727
w.ts.trivia(this.tokens.value.trivia),
2828
w.ts.definition(
2929
w.ts.wrap(['"', w.ts.name(this.value, { data: this, parent }), '"']),
30-
{ data: this, parent }
30+
{ data: this, parent },
3131
),
3232
w.token(this.tokens.separator),
3333
]);
@@ -88,7 +88,7 @@ export class Enum extends Base {
8888
w.token(this.tokens.close),
8989
w.token(this.tokens.termination),
9090
]),
91-
{ data: this }
91+
{ data: this },
9292
);
9393
}
9494
}

0 commit comments

Comments
 (0)