From b4d539258ec96540e33a8a2a037f6c1a95174163 Mon Sep 17 00:00:00 2001 From: Simon Marchi Date: Tue, 17 Jul 2018 18:45:43 -0400 Subject: [PATCH] tslint: Extend tslint:recommended Rather than take a whitelist approach to the rules, I think it would be better to start with some goal (for example, the tslint:recommended set of rules) and disable those that we don't follow. This way, it's easy to see which ones we could potentially enable. This doesn't mean that we have to follow all of them. If there are rules that we don't want, we can move them to a "Rules from tslint:recommended that we don't want" section. --- tslint.json | 45 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 42 insertions(+), 3 deletions(-) diff --git a/tslint.json b/tslint.json index 24ffabe..92c3442 100644 --- a/tslint.json +++ b/tslint.json @@ -1,8 +1,47 @@ { "defaultSeverity": "error", + "extends": "tslint:recommended", "rules": { - "no-var-keyword": true, - "prefer-const": true, - "no-null-keyword": true + "no-null-keyword": true, + /* Rules in tslint:recommended that we don't follow yet. */ + "array-type": false, + "arrow-parens": false, + "arrow-return-shorthand": false, + "ban-types": false, + "class-name": false, + "comment-format": false, + "curly": false, + "eofline": false, + "indent": false, + "interface-name": false, + "max-classes-per-file": false, + "max-line-length": false, + "member-access": false, + "member-ordering": false, + "no-angle-bracket-type-assertion": false, + "no-bitwise": false, + "no-conditional-assignment": false, + "no-consecutive-blank-lines": false, + "no-empty": false, + "no-shadowed-variable": false, + "no-trailing-whitespace": false, + "no-unnecessary-initializer": false, + "no-var-requires": false, + "object-literal-shorthand": false, + "object-literal-sort-keys": false, + "one-line": false, + "one-variable-per-declaration": false, + "only-arrow-functions": false, + "ordered-imports": false, + "prefer-for-of": false, + "quotemark": false, + "radix": false, + "semicolon": false, + "space-before-function-paren": false, + "trailing-comma": false, + "triple-equals": false, + "typedef-whitespace": false, + "variable-name": false, + "whitespace": false } }