Skip to content

Commit 73bbc06

Browse files
committed
run prettier on everything
1 parent e2312c0 commit 73bbc06

119 files changed

Lines changed: 1118 additions & 1072 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.

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ if (isWorkingTreeDirty) {
5757
for (const filePath of jsFiles) {
5858
// filePath is an instance of the Path class: https://github.com/suchipi/yavascript/blob/main/meta/generated-docs/path.md#path-class
5959
const dtsFilePath = filePath.replaceLast(
60-
filePath.basename().replace(/\.js$/, ".d.ts")
60+
filePath.basename().replace(/\.js$/, ".d.ts"),
6161
);
6262
if (!exists(dtsFilePath)) {
6363
const displayPath = quote(dtsFilePath.relativeTo(repoRoot));

meta/examples/custom-repl.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,5 +13,5 @@ startRepl(
1313
// Variables to make available to the repl as globals. Optional
1414
{ TOKEN_SEPARATOR, tokens },
1515
// Which language repl input should be interpreted as, ie. typescript, coffeescript, jsx, etc. Defaults to "javascript".
16-
"typescript"
16+
"typescript",
1717
);

meta/examples/script-args.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const { flags, args, metadata } = parseScriptArgs(
1212
// This second argument is optional; in unspecified, it defaults to
1313
// `scriptArgs.slice(2)`. It's only shown here to demonstrate that it's
1414
// possible to pass different args here, if desired.
15-
scriptArgs.slice(2)
15+
scriptArgs.slice(2),
1616
);
1717

1818
console.log({ flags, args, metadata });

meta/generated-docs/quickjs-extensions.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -349,8 +349,9 @@ right?: undefined;
349349
# RightOperators (interface)
350350

351351
```ts
352-
interface RightOperators<T, Right>
353-
extends Partial<OperatorFunctions<T, Right>> {
352+
interface RightOperators<T, Right> extends Partial<
353+
OperatorFunctions<T, Right>
354+
> {
354355
left?: undefined;
355356
right: {};
356357
}

meta/kame/kame-config.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ exports.resolve = (id, fromFilePath) => {
5757
return (
5858
defaultResolver.resolve(
5959
id.replace(/\?contentString$/, ""),
60-
fromFilePath
60+
fromFilePath,
6161
) + "?contentString"
6262
);
6363
}
@@ -66,7 +66,7 @@ exports.resolve = (id, fromFilePath) => {
6666
return (
6767
defaultResolver.resolve(
6868
id.replace(/\?evalAtBuildTime$/, ""),
69-
fromFilePath
69+
fromFilePath,
7070
) + "?evalAtBuildTime"
7171
);
7272
}

meta/ninja/generated-docs.ninja.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const newlineFile = rel("../scripts/lib/newline.txt");
88
function dtsToMd(
99
inputFile,
1010
outputFile,
11-
name = path.basename(inputFile).replace(/(?:\.inc)?\.d\.ts$/, "")
11+
name = path.basename(inputFile).replace(/(?:\.inc)?\.d\.ts$/, ""),
1212
) {
1313
const mdWithoutToc = build({
1414
rule: "dtsmd",
@@ -42,7 +42,7 @@ for (const dtsFile of dtsIncFiles) {
4242
const inputFile = dtsFile;
4343
const outputFile = rel(
4444
"../generated-docs/" +
45-
path.basename(inputFile).replace(/\.inc\.d\.ts$/, ".md")
45+
path.basename(inputFile).replace(/\.inc\.d\.ts$/, ".md"),
4646
);
4747

4848
dtsToMd(inputFile, outputFile);

meta/ninja/programs.ninja.js

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ function program(programName, target, base, input) {
99
BASE: base,
1010
},
1111
output: builddir(
12-
`bin/${target}/${programName}${base.endsWith(".exe") ? ".exe" : ""}`
12+
`bin/${target}/${programName}${base.endsWith(".exe") ? ".exe" : ""}`,
1313
),
1414
});
1515
}
@@ -20,33 +20,33 @@ program(
2020
"yavascript",
2121
"x86_64-apple-darwin",
2222
"qjsbootstrap-bytecode",
23-
"dist/bytecode/index-x86_64.bin"
23+
"dist/bytecode/index-x86_64.bin",
2424
);
2525
program(
2626
"yavascript",
2727
"x86_64-unknown-linux-gnu",
2828
"qjsbootstrap-bytecode",
29-
"dist/bytecode/index-x86_64.bin"
29+
"dist/bytecode/index-x86_64.bin",
3030
);
3131
program(
3232
"yavascript",
3333
"x86_64-unknown-linux-musl",
3434
"qjsbootstrap-bytecode",
35-
"dist/bytecode/index-x86_64.bin"
35+
"dist/bytecode/index-x86_64.bin",
3636
);
3737
program(
3838
"yavascript",
3939
"x86_64-unknown-linux-static",
4040
"qjsbootstrap-bytecode",
41-
"dist/bytecode/index-x86_64.bin"
41+
"dist/bytecode/index-x86_64.bin",
4242
);
4343

4444
// bytecode stuff wasn't working properly on windows; endianness?
4545
program(
4646
"yavascript",
4747
"x86_64-pc-windows-static",
4848
"qjsbootstrap.exe",
49-
"dist/bundles/index-x86_64.js"
49+
"dist/bundles/index-x86_64.js",
5050
);
5151

5252
// --- aarch64 binaries ---
@@ -55,81 +55,81 @@ program(
5555
"yavascript",
5656
"aarch64-apple-darwin",
5757
"qjsbootstrap-bytecode",
58-
"dist/bytecode/index-arm64.bin"
58+
"dist/bytecode/index-arm64.bin",
5959
);
6060
program(
6161
"yavascript",
6262
"aarch64-unknown-linux-gnu",
6363
"qjsbootstrap-bytecode",
64-
"dist/bytecode/index-arm64.bin"
64+
"dist/bytecode/index-arm64.bin",
6565
);
6666
program(
6767
"yavascript",
6868
"aarch64-unknown-linux-musl",
6969
"qjsbootstrap-bytecode",
70-
"dist/bytecode/index-arm64.bin"
70+
"dist/bytecode/index-arm64.bin",
7171
);
7272
program(
7373
"yavascript",
7474
"aarch64-unknown-linux-static",
7575
"qjsbootstrap-bytecode",
76-
"dist/bytecode/index-arm64.bin"
76+
"dist/bytecode/index-arm64.bin",
7777
);
7878

7979
// --- yavascript-bootstrap ---
8080
program(
8181
"yavascript-bootstrap",
8282
"x86_64-apple-darwin",
8383
"qjsbootstrap",
84-
"dist/bundles/primordials-x86_64.js"
84+
"dist/bundles/primordials-x86_64.js",
8585
);
8686
program(
8787
"yavascript-bootstrap",
8888
"x86_64-unknown-linux-gnu",
8989
"qjsbootstrap",
90-
"dist/bundles/primordials-x86_64.js"
90+
"dist/bundles/primordials-x86_64.js",
9191
);
9292
program(
9393
"yavascript-bootstrap",
9494
"x86_64-unknown-linux-musl",
9595
"qjsbootstrap",
96-
"dist/bundles/primordials-x86_64.js"
96+
"dist/bundles/primordials-x86_64.js",
9797
);
9898
program(
9999
"yavascript-bootstrap",
100100
"x86_64-unknown-linux-static",
101101
"qjsbootstrap",
102-
"dist/bundles/primordials-x86_64.js"
102+
"dist/bundles/primordials-x86_64.js",
103103
);
104104
program(
105105
"yavascript-bootstrap",
106106
"x86_64-pc-windows-static",
107107
"qjsbootstrap.exe",
108-
"dist/bundles/primordials-x86_64.js"
108+
"dist/bundles/primordials-x86_64.js",
109109
);
110110
program(
111111
"yavascript-bootstrap",
112112
"aarch64-apple-darwin",
113113
"qjsbootstrap",
114-
"dist/bundles/primordials-arm64.js"
114+
"dist/bundles/primordials-arm64.js",
115115
);
116116
program(
117117
"yavascript-bootstrap",
118118
"aarch64-unknown-linux-gnu",
119119
"qjsbootstrap",
120-
"dist/bundles/primordials-arm64.js"
120+
"dist/bundles/primordials-arm64.js",
121121
);
122122
program(
123123
"yavascript-bootstrap",
124124
"aarch64-unknown-linux-musl",
125125
"qjsbootstrap",
126-
"dist/bundles/primordials-arm64.js"
126+
"dist/bundles/primordials-arm64.js",
127127
);
128128
program(
129129
"yavascript-bootstrap",
130130
"aarch64-unknown-linux-static",
131131
"qjsbootstrap",
132-
"dist/bundles/primordials-arm64.js"
132+
"dist/bundles/primordials-arm64.js",
133133
);
134134

135135
const qjsPlatform = require("@suchipi/quickjs").identifyCurrentPlatform();
@@ -144,7 +144,7 @@ build({
144144
rule: "copy",
145145
inputs: [
146146
builddir(
147-
`bin/${qjsPlatform.name}/yavascript-bootstrap${qjsPlatform.programSuffix}`
147+
`bin/${qjsPlatform.name}/yavascript-bootstrap${qjsPlatform.programSuffix}`,
148148
),
149149
],
150150
output: builddir("yavascript-bootstrap" + qjsPlatform.programSuffix),

meta/tests/fixtures/scripts/toplevel-await.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@ import * as std from "quickjs:std";
22

33
type Something = { yeah: string | number };
44

5-
const someElement = await <a />;
5+
const someElement = await (<a />);
66
console.log(someElement);
77
console.log(std.open);

meta/tests/fixtures/scripts/type-coercion-via-assert.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ const logThrowMessage = (val, type) => {
88
console.log(
99
"no error message from",
1010
val,
11-
is(type, Function) ? type.name : type
11+
is(type, Function) ? type.name : type,
1212
);
1313
};
1414

meta/tests/src/__filename-and-__dirname.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ test("__filename and __dirname", async () => {
66
echo(__filename);
77
echo(__dirname);
88
`,
9-
{ cwd: __dirname }
9+
{ cwd: __dirname },
1010
);
1111
expect(result).toMatchInlineSnapshot(`
1212
{

0 commit comments

Comments
 (0)