diff --git a/package.json b/package.json index 2311fee6b8..9b29daffb7 100644 --- a/package.json +++ b/package.json @@ -6,7 +6,8 @@ "scripts": { "pretest": "rimraf ./build-tests && tsc -p ts/test-tsconfig.json", "test": "mocha ./build-tests --recursive", - "prepublish": "tsc -p ts" + "prepublish": "tsc -p ts", + "lint": "tslint --project ./ts" }, "repository": { "type": "git", @@ -43,6 +44,7 @@ "chai": "^3.5.0", "mocha": "^3.2.0", "rimraf": "^2.5.2", + "tslint": "^4.5.1", "typescript": "^2.2.1" } } diff --git a/ts/tslint.json b/ts/tslint.json new file mode 100644 index 0000000000..b16499406f --- /dev/null +++ b/ts/tslint.json @@ -0,0 +1,35 @@ +{ + "extends": "tslint:latest", + "rules": { + "curly": true, + "one-variable-per-declaration": [ + true + ], + "no-any": true, + "no-consecutive-blank-lines": [ + true + ], + "no-require-imports": true, + "member-access": [ + true + ], + "indent": [ + true, + "spaces" + ], + "object-literal-sort-keys": false, + "object-literal-shorthand": false, + "typedef": [ + true, + "call-signature", + "parameter", + "property-declaration" + ], + "max-line-length": [ + false + ], + "max-classes-per-file": [ + false + ] + } +} \ No newline at end of file