1
0
Fork 0
mirror of https://github.com/denoland/deno.git synced 2024-11-21 15:04:11 -05:00
This commit is contained in:
Ryan Dahl 2018-05-14 03:15:21 -04:00
parent 7828d7fd7a
commit 2da9893da3
6 changed files with 26 additions and 11 deletions

View file

@ -31,4 +31,8 @@ lint: node_modules
yarn lint
go vet
fmt: node_modules
yarn fmt
go fmt
.PHONY: lint clean distclean

12
main.ts
View file

@ -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;
}
});

View file

@ -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",

View file

@ -2,7 +2,8 @@
"rules": {
"array-type": [true, "array-simple"],
"arrow-return-shorthand": true,
"ban": [true,
"ban": [
true,
["fit"],
["fdescribe"],
["xit"],
@ -12,7 +13,8 @@
["fitFakeAsync"],
["xitFakeAsync"]
],
"ban-types": [true,
"ban-types": [
true,
["Object", "Use {} instead."],
["String", "Use 'string' instead."],
["Number", "Use 'number' instead."],
@ -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,

View file

@ -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));

View file

@ -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"