Skip to content
This repository has been archived by the owner on Jul 8, 2019. It is now read-only.

Commit

Permalink
Adding rules (#129)
Browse files Browse the repository at this point in the history
  • Loading branch information
Pablissimo committed Mar 11, 2017
1 parent 37de552 commit 4efb1d3
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 1 deletion.
42 changes: 41 additions & 1 deletion src/main/resources/tslint/tslint-rules.properties
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ public void setUp() throws Exception {
"arrow-parens",
"await-promise",
"ban",
"ban-types",
"callable-types",
"class-name",
"comment-format",
Expand All @@ -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",
Expand All @@ -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",
Expand Down

0 comments on commit 4efb1d3

Please sign in to comment.