summaryrefslogtreecommitdiff
path: root/cli/js/web/console_table.ts
diff options
context:
space:
mode:
authorDavid Sherret <dsherret@users.noreply.github.com>2020-07-14 15:24:17 -0400
committerGitHub <noreply@github.com>2020-07-14 15:24:17 -0400
commitcde4dbb35132848ffece59ef9cfaccff32347124 (patch)
treecc7830968c6decde704c8cfb83c9185193dc698f /cli/js/web/console_table.ts
parent9eca71caa1674c31f9cc5d4e86c03f10b59e0a00 (diff)
Use dprint for internal formatting (#6682)
Diffstat (limited to 'cli/js/web/console_table.ts')
-rw-r--r--cli/js/web/console_table.ts12
1 files changed, 5 insertions, 7 deletions
diff --git a/cli/js/web/console_table.ts b/cli/js/web/console_table.ts
index ba2d763b7..42667d998 100644
--- a/cli/js/web/console_table.ts
+++ b/cli/js/web/console_table.ts
@@ -28,8 +28,8 @@ function isFullWidthCodePoint(code: number): boolean {
return (
code >= 0x1100 &&
(code <= 0x115f || // Hangul Jamo
- code === 0x2329 || // LEFT-POINTING ANGLE BRACKET
- code === 0x232a || // RIGHT-POINTING ANGLE BRACKET
+ code === 0x2329 || // LEFT-POINTING ANGLE BRACKET
+ code === 0x232a || // RIGHT-POINTING ANGLE BRACKET
// CJK Radicals Supplement .. Enclosed CJK Letters and Months
(code >= 0x2e80 && code <= 0x3247 && code !== 0x303f) ||
// Enclosed CJK Letters and Months .. CJK Unified Ideographs Extension A
@@ -94,7 +94,7 @@ export function cliTable(head: string[], columns: string[][]): string {
const columnWidths = head.map((h: string): number => getStringWidth(h));
const longestColumn = columns.reduce(
(n: number, a: string[]): number => Math.max(n, a.length),
- 0
+ 0,
);
for (let i = 0; i < head.length; i++) {
@@ -114,8 +114,7 @@ export function cliTable(head: string[], columns: string[][]): string {
tableChars.middleMiddle.repeat(i + 2)
);
- let result =
- `${tableChars.topLeft}${divider.join(tableChars.topMiddle)}` +
+ let result = `${tableChars.topLeft}${divider.join(tableChars.topMiddle)}` +
`${tableChars.topRight}\n${renderRow(head, columnWidths)}\n` +
`${tableChars.leftMiddle}${divider.join(tableChars.rowMiddle)}` +
`${tableChars.rightMiddle}\n`;
@@ -124,8 +123,7 @@ export function cliTable(head: string[], columns: string[][]): string {
result += `${renderRow(row, columnWidths)}\n`;
}
- result +=
- `${tableChars.bottomLeft}${divider.join(tableChars.bottomMiddle)}` +
+ result += `${tableChars.bottomLeft}${divider.join(tableChars.bottomMiddle)}` +
tableChars.bottomRight;
return result;