Skip to content

Commit 1da74d2

Browse files
committed
Run prettier (one-off) on all files
1 parent 869e06a commit 1da74d2

File tree

9 files changed

+31
-32
lines changed

9 files changed

+31
-32
lines changed
File renamed without changes.

.travis.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
language: node_js
22
node_js:
3-
- '18'
4-
- '20'
5-
- '22'
6-
- '23'
3+
- '18'
4+
- '20'
5+
- '22'
6+
- '23'
77
os: linux
88
addons:
99
chrome: stable
1010
firefox: latest
1111
env:
12-
- PARALLEL_BUILD=false PARALLEL_E2E=false EXPLICIT_WAIT_TIMEOUT=20000 TEST_TIMEOUT=60000
12+
- PARALLEL_BUILD=false PARALLEL_E2E=false EXPLICIT_WAIT_TIMEOUT=20000 TEST_TIMEOUT=60000
1313
cache:
1414
directories:
15-
- backend/node_modules
16-
- frontend/node_modules
17-
- e2e/node_modules
18-
- build/node_modules
15+
- backend/node_modules
16+
- frontend/node_modules
17+
- e2e/node_modules
18+
- build/node_modules

docs/SECURITY.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ be sure to specify these as well:
7474
node --disable-proto delete index.js
7575
```
7676

77-
Note that these must be included *before* the `index.js` argument.
77+
Note that these must be included _before_ the `index.js` argument.
7878

7979
If you do not need to specify custom flags, it is recommended to
8080
stick with using `./index.js` to launch the application instead of

docs/SERVICES.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ apt install mongodb
3939
The configuration file will be created at `/usr/local/etc/mongod.conf`
4040
on macOS and `/etc/mongod.conf` on Ubuntu.
4141

42-
*Note: MongoDB's default security model is enough for local
42+
_Note: MongoDB's default security model is enough for local
4343
development, but you should lock it down further in deployments. See
44-
the [security documentation](./SECURITY.md) for details.*
44+
the [security documentation](./SECURITY.md) for details._
4545

4646
### Redis
4747

e2e/.prettierrc.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

frontend/.prettierrc.json

Lines changed: 0 additions & 4 deletions
This file was deleted.

scripts/build.mjs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -88,13 +88,13 @@ if (preserveBuildModules) {
8888
}
8989

9090
log('Compressing static resources...');
91-
const staticFiles = await Promise.all((await findFiles(staticdir)).map(compressFile));
91+
const staticFiles = await Promise.all(
92+
(await findFiles(staticdir)).map(compressFile),
93+
);
9294

9395
const isCode = hasExt('.js', '.css', '.html');
9496

95-
const codeTotals = staticFiles
96-
.filter(isCode)
97-
.reduce(sumSize, SIZE0);
97+
const codeTotals = staticFiles.filter(isCode).reduce(sumSize, SIZE0);
9898

9999
const resourceTotals = staticFiles
100100
.filter((v) => !isCode(v))

scripts/helpers/io.mjs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,10 @@ export async function compressFile(file) {
103103
return { file, size, brSize, gzSize };
104104
}
105105

106-
export const hasExt = (...exts) => ({ file }) => exts.some((ext) => file.endsWith(ext));
106+
export const hasExt =
107+
(...exts) =>
108+
({ file }) =>
109+
exts.some((ext) => file.endsWith(ext));
107110

108111
export const SIZE0 = { size: 0, brSize: 0, gzSize: 0 };
109112

@@ -114,7 +117,9 @@ export const sumSize = (a, b) => ({
114117
});
115118

116119
export const printSize = ({ size, brSize, gzSize }) =>
117-
`${prettyBytes(size)} / ${prettyBytes(gzSize)} gzip / ${prettyBytes(brSize)} brotli`;
120+
`${prettyBytes(size)} / ${prettyBytes(gzSize)} gzip / ${prettyBytes(
121+
brSize,
122+
)} brotli`;
118123

119124
function prettyBytes(bytes) {
120125
if (bytes < 2000) {

scripts/helpers/proc.mjs

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@ export async function exitWithCode(code, message) {
1515
if (message) {
1616
process.stderr.write(`\n${message}\n`);
1717
}
18-
// process.exit may lose stream data which has been buffered in NodeJS - wait for it all to be flushed before exiting
19-
await Promise.all([
20-
new Promise((resolve) => process.stdout.write('', resolve)),
21-
new Promise((resolve) => process.stderr.write('', resolve)),
22-
]);
18+
// process.exit may lose stream data which has been buffered in NodeJS - wait for it all to be flushed before exiting
19+
await Promise.all([
20+
new Promise((resolve) => process.stdout.write('', resolve)),
21+
new Promise((resolve) => process.stderr.write('', resolve)),
22+
]);
2323
process.exit(code);
2424
}
2525

@@ -239,7 +239,9 @@ export function runTask({
239239
}
240240
handled = true;
241241
await streamsClosed;
242-
output.write(`${failureMessage} - ${e instanceof Error ? e.message : e}\n`);
242+
output.write(
243+
`${failureMessage} - ${e instanceof Error ? e.message : e}\n`,
244+
);
243245
if (outputMode === 'atomic' || outputMode === 'fail_atomic') {
244246
printInfo();
245247
}

0 commit comments

Comments
 (0)