diff --git a/package.json b/package.json index d0401bfd88..4c84b8c9d8 100644 --- a/package.json +++ b/package.json @@ -10,6 +10,7 @@ "scripts": { "clean": "rm -rf ./dist", "build": "npm run clean && tsc && cp -r ./src/artifacts ./dist/src/ && cp ./src/*.json ./dist/src/ && cp -r ./src/lib ./dist/src/", + "lint": "tslint src/**/*.ts", "test": "npm run build && node ./dist/test/test", "testunit": "npm run build && mocha --timeout 15000 dist/test/unit/*.js ", "testdeploy": "npm run build && node ./dist/test/deploy", @@ -25,6 +26,7 @@ "dirty-chai": "^2.0.1", "mocha": "^4.0.1", "ts-node": "^3.3.0", + "tslint": "^5.8.0", "typings": "^2.1.1" }, "dependencies": { diff --git a/tslint.json b/tslint.json new file mode 100644 index 0000000000..e5230063f7 --- /dev/null +++ b/tslint.json @@ -0,0 +1,14 @@ +{ + "defaultSeverity": "error", + "extends": [ + "tslint:recommended" + ], + "jsRules": {}, + "rules": { + "indent": [true, "spaces", 4], + "quotemark": [true, "single"], + "curly": [true, "ignore-same-line"], + "variable-name": [true, "ban-keywords", "check-format", "allow-leading-underscore"] + }, + "rulesDirectory": [] +}