From 33f7d7649a614daccc194b0f76caf8db13b7dc70 Mon Sep 17 00:00:00 2001 From: Paris Kasidiaris Date: Thu, 15 Dec 2016 13:53:26 +0200 Subject: [PATCH] Add tslint Fix #408 --- package.json | 2 ++ tslint.json | 53 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 55 insertions(+) create mode 100644 tslint.json diff --git a/package.json b/package.json index cd83738..e054545 100644 --- a/package.json +++ b/package.json @@ -29,10 +29,12 @@ "pty.js": "0.3.1", "sleep": "^3.0.1", "sorcery": "^0.10.0", + "tslint": "^4.0.2", "typescript": "^2.0.3" }, "scripts": { "start": "nodemon --watch src --watch addons --watch demo --exec bash -c './bin/build && node demo/app'", + "lint": "tslint src/**/*.ts", "test": "mocha --recursive ./lib", "build:docs": "jsdoc -c jsdoc.json", "build": "./bin/build", diff --git a/tslint.json b/tslint.json new file mode 100644 index 0000000..d571d9c --- /dev/null +++ b/tslint.json @@ -0,0 +1,53 @@ +{ + "rules": { + "class-name": true, + "comment-format": [ + true, + "check-space" + ], + "indent": [ + true, + "spaces" + ], + "eofline": true, + "no-eval": true, + "no-internal-module": true, + "no-trailing-whitespace": true, + "no-unsafe-finally": true, + "no-var-keyword": true, + "quotemark": [ + true, + "single" + ], + "semicolon": [ + true, + "always" + ], + "triple-equals": [ + true, + "allow-null-check" + ], + "typedef-whitespace": [ + true, + { + "call-signature": "nospace", + "index-signature": "nospace", + "parameter": "nospace", + "property-declaration": "nospace", + "variable-declaration": "nospace" + } + ], + "variable-name": [ + true, + "ban-keywords" + ], + "whitespace": [ + true, + "check-branch", + "check-decl", + "check-operator", + "check-separator", + "check-type" + ] + } +} -- 2.39.5