diff --git a/src/main/resources/tslint/tslint-rules.properties b/src/main/resources/tslint/tslint-rules.properties index 853e671..6ee28bf 100644 --- a/src/main/resources/tslint/tslint-rules.properties +++ b/src/main/resources/tslint/tslint-rules.properties @@ -40,9 +40,16 @@ ban=true ban.name=Use of this method is banned by current configuration ban.severity=CRITICAL ban.debtFunc=CONSTANT_ISSUE -ban.debtScalar=60min +ban.debtScalar=30min ban.debtType=BUG +ban-types=true +ban-types.name=Use of this type is banned by current configuration +ban-types.severity=CRITICAL +ban-types.debtFunc=CONSTANT_ISSUE +ban-types.debtScalar=30min +ban-types.debtType=BUG + callable-types=true callable-types.name=Rewrite interfaces or literal types with just a call signature to be function types callable-types.severity=MAJOR @@ -157,6 +164,12 @@ linebreak-style.severity=MINOR linebreak-style.debtFunc=CONSTANT_ISSUE linebreak-style.debtScalar=5min +match-default-export-name=true +match-default-export-name.name=Requires a default import have the same name as the declaration it imports - ignores anonymous default exports +match-default-export-name.severity=MINOR +match-default-export-name.debtFunc=CONSTANT_ISSUE +match-default-export-name.debtScalar=5min + max-classes-per-file=true max-classes-per-file.name=A file may not contain more than a specified number of classes max-classes-per-file.severity=MAJOR @@ -195,6 +208,12 @@ new-parens.debtFunc=CONSTANT_ISSUE new-parens.debtScalar=1min new-parens.debtType=BUG +newline-before-return=true +newline-before-return.name=Enforces a blank line before return when not the only line in the block +newline-before-return.severity=MINOR +newline-before-return.debtFunc=CONSTANT_ISSUE +newline-before-return.debtScalar=1min + no-angle-bracket-type-assertion=true no-angle-bracket-type-assertion.name=Enforces use of the 'as' operator for type assertions no-angle-bracket-type-assertion.severity=MAJOR @@ -283,6 +302,13 @@ no-duplicate-key.debtFunc=CONSTANT_ISSUE no-duplicate-key.debtScalar=5min no-duplicate-key.debtType=BUG +no-duplicate-super=true +no-duplicate-super.name=Disallows appearance of super() twice in a constructor +no-duplicate-super.severity=MAJOR +no-duplicate-super.debtFunc=CONSTANT_ISSUE +no-duplicate-super.debtScalar=10min +no-duplicate-super.debtType=BUG + no-duplicate-variable=true no-duplicate-variable.name=Duplicate variable definitions are not allowed no-duplicate-variable.severity=MAJOR @@ -324,6 +350,13 @@ no-for-in-array.debtFunc=CONSTANT_ISSUE no-for-in-array.debtScalar=10min no-for-in-array.debtType=BUG +no-import-side-effect=true +no-import-side-effect.name=Disallows import statements with side-effects +no-import-side-effect.severity=MAJOR +no-import-side-effect.debtFunc=CONSTANT_ISSUE +no-import-side-effect.debtScalar=30min +no-import-side-effect.debtType=BUG + no-inferrable-types=true no-inferrable-types.name=Disallows explicit type declarations for variables or parameters initialised to a number, string or boolean no-inferrable-types.severity=MAJOR @@ -374,6 +407,13 @@ no-namespace.severity=MAJOR no-namespace.debtFunc=CONSTANT_ISSUE no-namespace.debtScalar=30min +no-non-null-assertion=true +no-non-null-assertion.name=Disallows non-null assertions +no-non-null-assertion.severity=MAJOR +no-non-null-assertion.debtFunc=CONSTANT_ISSUE +no-non-null-assertion.debtScalar=5min +no-non-null-assertion.debtType=BUG + no-null-keyword=true no-null-keyword.name=Disallows use of the null keyword literal no-null-keyword.severity=MAJOR diff --git a/src/test/java/com/pablissimo/sonar/TypeScriptRuleProfileTest.java b/src/test/java/com/pablissimo/sonar/TypeScriptRuleProfileTest.java index c103b97..1223b3b 100644 --- a/src/test/java/com/pablissimo/sonar/TypeScriptRuleProfileTest.java +++ b/src/test/java/com/pablissimo/sonar/TypeScriptRuleProfileTest.java @@ -31,6 +31,7 @@ public void setUp() throws Exception { "arrow-parens", "await-promise", "ban", + "ban-types", "callable-types", "class-name", "comment-format", @@ -49,11 +50,13 @@ public void setUp() throws Exception { "label-position", "label-undefined", "linebreak-style", + "match-default-export-name", "max-classes-per-file", "max-file-line-count", "max-line-length", "member-access", "member-ordering", + "newline-before-return", "new-parens", "no-angle-bracket-type-assertion", "no-any", @@ -68,12 +71,15 @@ public void setUp() throws Exception { "no-debugger", "no-default-export", "no-duplicate-key", + "no-duplicate-super", "no-duplicate-variable", "no-empty", "no-empty-interface", "no-eval", "no-for-in-array", "no-floating-promises", + "no-import-side-effect", + "no-non-null-assertion", "no-inferrable-types", "no-inferred-empty-object-type", "no-internal-module",