Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
ry committed May 14, 2018
1 parent 7828d7f commit 2da9893
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 11 deletions.
4 changes: 4 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,8 @@ lint: node_modules
yarn lint
go vet

fmt: node_modules
yarn fmt
go fmt

.PHONY: lint clean distclean
12 changes: 6 additions & 6 deletions main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ function load(argv: string[]): void {
V8Worker2.recv((ab: ArrayBuffer) => {
const msg = pb.Msg.decode(new Uint8Array(ab));
switch (msg.kind) {
case pb.Msg.MsgKind.LOAD:
load(msg.argv);
break;
default:
console.log("Unknown message", msg);
break;
case pb.Msg.MsgKind.LOAD:
load(msg.argv);
break;
default:
console.log("Unknown message", msg);
break;
}
});
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
{
"name": "deno",
"scripts": {
"lint": "tslint -p tsconfig.json"
"lint": "tslint -p tsconfig.json",
"fmt": "prettier --write *.ts* *.js *.json"
},
"devDependencies": {
"@types/text-encoding": "^0.0.32",
Expand Down
12 changes: 9 additions & 3 deletions tslint.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
"rules": {
"array-type": [true, "array-simple"],
"arrow-return-shorthand": true,
"ban": [true,
"ban": [
true,
["fit"],
["fdescribe"],
["xit"],
Expand All @@ -12,7 +13,8 @@
["fitFakeAsync"],
["xitFakeAsync"]
],
"ban-types": [true,
"ban-types": [
true,
["Object", "Use {} instead."],
["String", "Use 'string' instead."],
["Number", "Use 'number' instead."],
Expand Down Expand Up @@ -41,7 +43,11 @@
"no-unused-variable": true,
"no-var-keyword": true,
"object-literal-shorthand": true,
"only-arrow-functions": [true, "allow-declarations", "allow-named-functions"],
"only-arrow-functions": [
true,
"allow-declarations",
"allow-named-functions"
],
"prefer-const": true,
"quotemark": [true, "double"],
"radix": true,
Expand Down
2 changes: 1 addition & 1 deletion util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ _global["console"] = {
log(...args: any[]): void {
const out: string[] = [];
for (const a of args) {
if (typeof(a) === "string") {
if (typeof a === "string") {
out.push(a);
} else {
out.push(JSON.stringify(a));
Expand Down
4 changes: 4 additions & 0 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2816,6 +2816,10 @@ prepend-http@^1.0.0:
version "1.0.4"
resolved "https://registry.yarnpkg.com/prepend-http/-/prepend-http-1.0.4.tgz#d4f4562b0ce3696e41ac52d0e002e57a635dc6dc"

prettier@^1.12.1:
version "1.12.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.12.1.tgz#c1ad20e803e7749faf905a409d2367e06bbe7325"

private@^0.1.6, private@^0.1.8:
version "0.1.8"
resolved "https://registry.yarnpkg.com/private/-/private-0.1.8.tgz#2381edb3689f7a53d653190060fcf822d2f368ff"
Expand Down

0 comments on commit 2da9893

Please sign in to comment.