diff --git a/package.json b/package.json index 23c1117943..6eb6e1c3eb 100644 --- a/package.json +++ b/package.json @@ -9,7 +9,7 @@ "contributors": "node ./tools/contributors.js", "less": "node ./tools/lessc.js", "lint:style": "stylelint ./src/less/*.less --fix", - "lint:ts": "tslint -c tslint.json -p tsconfig.json -e \"node_modules/**/*.ts\"", + "lint:ts": "tslint -c tslint.json -p tsconfig.json -e \"node_modules/**/*.ts\" --fix", "lint": "npm-run-all lint:*", "make": "electron-forge make", "package": "electron-forge package", diff --git a/tslint.json b/tslint.json index e6ec3a47e3..2546cbe6db 100644 --- a/tslint.json +++ b/tslint.json @@ -1,30 +1,34 @@ { "extends": ["tslint:latest", "tslint-react", "tslint:recommended"], "rules": { - "curly": false, - "eofline": false, "align": [true, "parameters"], "array-type": [true, "generic"], "arrow-parens": true, "class-name": true, - "comment-format": [false], + "comment-format": [true, "check-space"], + "curly": [true, "ignore-same-line"], + "eofline": true, "indent": [true, "spaces"], "max-line-length": [true, 150], "no-angle-bracket-type-assertion": true, + "no-bitwise": false, "no-consecutive-blank-lines": [true, 2], - "no-trailing-whitespace": true, + "no-console": false, + "no-construct": true, "no-default-export": true, "no-duplicate-variable": true, - "no-bitwise": false, - "no-var-keyword": true, - "no-var-requires": false, - "no-empty": true, - "no-console": false, "no-empty-interface": false, - "no-unused-expression": true, + "no-empty": true, + "no-eval": true, + "no-floating-promises": false, + "no-implicit-dependencies": false, "no-reference": true, + "no-trailing-whitespace": true, + "no-unused-expression": true, "no-use-before-declare": true, - "no-implicit-dependencies": false, + "no-var-keyword": true, + "no-var-requires": false, + "prefer-const": true, "interface-name": [ false ], @@ -32,8 +36,8 @@ "object-literal-sort-keys": false, "object-literal-key-quotes": [true, "as-needed"], "only-arrow-functions": [false], - "ordered-imports": [false], - "one-variable-per-declaration": [false], + "ordered-imports": [true], + "one-variable-per-declaration": [true], "one-line": [false, "check-else", "check-whitespace", @@ -46,7 +50,7 @@ ], "max-classes-per-file": [false], "semicolon": [true, "always"], - "switch-default": false, + "switch-default": true, "trailing-comma": [false], "typedef": [ true, @@ -73,6 +77,6 @@ ] }, "rulesDirectory": [ - "node_modules/tslint-microsoft-contrib" + "node_modules/tslint-microsoft-contrib" ] } \ No newline at end of file