From d7f62d0283cfa6c06e6c7e918d08a242193bc80d Mon Sep 17 00:00:00 2001 From: samnyan <4137880+samnyan@users.noreply.github.com> Date: Sat, 18 Jul 2020 23:53:33 +0900 Subject: [PATCH] @angular/cli migration - tslint-version-6 Update tslint to version 6 and adjust rules to maintain existing behavior. --- tslint.json | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 65 insertions(+), 1 deletion(-) diff --git a/tslint.json b/tslint.json index c8d70f1..58a97b0 100644 --- a/tslint.json +++ b/tslint.json @@ -1,8 +1,16 @@ { "extends": "tslint:recommended", "rules": { + "align": { + "options": [ + "parameters", + "statements" + ] + }, "array-type": false, "arrow-parens": false, + "arrow-return-shorthand": true, + "curly": true, "deprecation": { "severity": "warning" }, @@ -21,10 +29,17 @@ "app", "kebab-case" ], + "eofline": true, "import-blacklist": [ true, "rxjs/Rx" ], + "import-spacing": true, + "indent": { + "options": [ + "spaces" + ] + }, "interface-name": false, "max-classes-per-file": false, "max-line-length": [ @@ -71,6 +86,20 @@ true, "single" ], + "semicolon": { + "options": [ + "always" + ] + }, + "space-before-function-paren": { + "options": { + "anonymous": "never", + "asyncArrow": "always", + "constructor": "never", + "method": "never", + "named": "never" + } + }, "trailing-comma": false, "no-conflicting-lifecycle": true, "no-host-metadata-property": true, @@ -82,9 +111,44 @@ "no-outputs-metadata-property": true, "template-banana-in-box": true, "template-no-negated-async": true, + "typedef-whitespace": { + "options": [ + { + "call-signature": "nospace", + "index-signature": "nospace", + "parameter": "nospace", + "property-declaration": "nospace", + "variable-declaration": "nospace" + }, + { + "call-signature": "onespace", + "index-signature": "onespace", + "parameter": "onespace", + "property-declaration": "onespace", + "variable-declaration": "onespace" + } + ] + }, "use-lifecycle-interface": true, "use-pipe-transform-interface": true - }, + , "variable-name": { + "options": [ + "ban-keywords", + "check-format", + "allow-pascal-case" + ] + }, + "whitespace": { + "options": [ + "check-branch", + "check-decl", + "check-operator", + "check-separator", + "check-type", + "check-typecast" + ] + } +}, "rulesDirectory": [ "codelyzer" ]