Add tslint

Fix #408
This commit is contained in:
Paris Kasidiaris 2016-12-15 13:53:26 +02:00
parent fb4d263211
commit 33f7d7649a
2 changed files with 55 additions and 0 deletions

View File

@ -29,10 +29,12 @@
"pty.js": "0.3.1", "pty.js": "0.3.1",
"sleep": "^3.0.1", "sleep": "^3.0.1",
"sorcery": "^0.10.0", "sorcery": "^0.10.0",
"tslint": "^4.0.2",
"typescript": "^2.0.3" "typescript": "^2.0.3"
}, },
"scripts": { "scripts": {
"start": "nodemon --watch src --watch addons --watch demo --exec bash -c './bin/build && node demo/app'", "start": "nodemon --watch src --watch addons --watch demo --exec bash -c './bin/build && node demo/app'",
"lint": "tslint src/**/*.ts",
"test": "mocha --recursive ./lib", "test": "mocha --recursive ./lib",
"build:docs": "jsdoc -c jsdoc.json", "build:docs": "jsdoc -c jsdoc.json",
"build": "./bin/build", "build": "./bin/build",

53
tslint.json Normal file
View File

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