summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Dahl <ry@tinyclouds.org>2018-12-18 18:56:12 -0500
committerRyan Dahl <ry@tinyclouds.org>2018-12-18 18:56:59 -0500
commite249378fdfebdb0e513cc692b581dad49efd9af1 (patch)
treeed7bee33f28d293b87ba43940032b35e5f7d6de6
parent968d50842512a007dc9c2e4ae31b1970fdc6e6a2 (diff)
Add format script.
Original: https://github.com/denoland/deno_std/commit/85ff88b0cc076d1a79fd15ddf4475270765bcfda
-rwxr-xr-xformat.ts13
-rw-r--r--net/bufio.ts1
2 files changed, 13 insertions, 1 deletions
diff --git a/format.ts b/format.ts
new file mode 100755
index 000000000..251cba1ed
--- /dev/null
+++ b/format.ts
@@ -0,0 +1,13 @@
+#!/usr/bin/env deno --allow-run
+
+import { exit, run } from "deno";
+
+async function main() {
+ const prettier = run({
+ args: ["bash", "-c", "prettier --write *.ts **/*.ts"]
+ });
+ const s = await prettier.status();
+ exit(s.code);
+}
+
+main();
diff --git a/net/bufio.ts b/net/bufio.ts
index b412cbce8..0dd2b94b4 100644
--- a/net/bufio.ts
+++ b/net/bufio.ts
@@ -185,7 +185,6 @@ export class BufReader implements Reader {
return [nread, nread < p.length ? "EOF" : null];
}
-
/** Returns the next byte [0, 255] or -1 if EOF. */
async readByte(): Promise<number> {
while (this.r === this.w) {