diff --git a/sonar-plugin/sonar-javascript-plugin/src/main/resources/org/sonar/l10n/typescript/rules/tslint-sonarts/rules.json b/sonar-plugin/sonar-javascript-plugin/src/main/resources/org/sonar/l10n/typescript/rules/tslint-sonarts/rules.json deleted file mode 100644 index 434eeac7157..00000000000 --- a/sonar-plugin/sonar-javascript-plugin/src/main/resources/org/sonar/l10n/typescript/rules/tslint-sonarts/rules.json +++ /dev/null @@ -1,428 +0,0 @@ -[ - { - "key": "arguments-order", - "name": "Parameters should be passed in the correct order", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/arguments-order.md" - }, - { - "key": "bool-param-default", - "name": "Optional boolean parameters should have default value", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/bool-param-default.md" - }, - { - "key": "cognitive-complexity", - "name": "Cognitive Complexity of functions should not be too high", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/cognitive-complexity.md" - }, - { - "key": "consecutive-overloads", - "name": "Method overloads should be grouped together", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/consecutive-overloads.md" - }, - { - "key": "max-switch-cases", - "name": "\"switch\" statements should not have too many \"case\" clauses", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/max-switch-cases.md" - }, - { - "key": "max-union-size", - "name": "Union types should not have too many elements", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/max-union-size.md" - }, - { - "key": "mccabe-complexity", - "name": "Functions should not be too complex", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/mccabe-complexity.md" - }, - { - "key": "no-accessor-field-mismatch", - "name": "Getters and setters should access the expected fields", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-accessor-field-mismatch.md" - }, - { - "key": "no-all-duplicated-branches", - "name": "All branches in a conditional structure should not have exactly the same implementation", - "type": "BUG", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-all-duplicated-branches.md" - }, - { - "key": "no-alphabetical-sort", - "name": "A compare function should be provided when using \"Array.prototype.sort()\"", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-alphabetical-sort.md" - }, - { - "key": "no-array-delete", - "name": "\"delete\" should not be used on arrays", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-array-delete.md" - }, - { - "key": "no-big-function", - "name": "Functions should not have too many lines of code", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-big-function.md" - }, - { - "key": "no-case-with-or", - "name": "Logical OR should not be used in switch cases", - "type": "BUG", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-case-with-or.md" - }, - { - "key": "no-collapsible-if", - "name": "Collapsible \"if\" statements should be merged", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-collapsible-if.md" - }, - { - "key": "no-collection-size-mischeck", - "name": "Collection sizes and array length comparisons should make sense", - "type": "BUG", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-collection-size-mischeck.md" - }, - { - "key": "no-commented-code", - "name": "Sections of code should not be \"commented out\"", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-commented-code.md" - }, - { - "key": "no-dead-store", - "name": "Dead stores should be removed", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-dead-store.md" - }, - { - "key": "no-duplicate-in-composite", - "name": "Union and intersection types should not be defined with duplicated elements", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-duplicate-in-composite.md" - }, - { - "key": "no-duplicate-string", - "name": "String literals should not be duplicated", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-duplicate-string.md" - }, - { - "key": "no-duplicated-branches", - "name": "Two branches in a conditional structure should not have exactly the same implementation", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-duplicated-branches.md" - }, - { - "key": "no-element-overwrite", - "name": "Collection elements should not be replaced unconditionally", - "type": "BUG", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-element-overwrite.md" - }, - { - "key": "no-empty-array", - "name": "Empty collections should not be accessed or iterated", - "type": "BUG", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-empty-array.md" - }, - { - "key": "no-empty-destructuring", - "name": "Destructuring patterns should not be empty", - "type": "BUG", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-empty-destructuring.md" - }, - { - "key": "no-empty-nested-blocks", - "name": "Nested blocks of code should not be left empty", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-empty-nested-blocks.md" - }, - { - "key": "no-extra-semicolon", - "name": "Extra semicolons should be removed", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-extra-semicolon.md" - }, - { - "key": "no-gratuitous-expressions", - "name": "Conditions should not always evaluate to \"true\" or to \"false\"", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-gratuitous-expressions.md" - }, - { - "key": "no-hardcoded-credentials", - "name": "Credentials should not be hard-coded", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-hardcoded-credentials.md" - }, - { - "key": "no-identical-conditions", - "name": "Related \"if/else if\" statements and \"cases\" in a \"switch\" should not have the same condition", - "type": "BUG", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-identical-conditions.md" - }, - { - "key": "no-identical-expressions", - "name": "Identical expressions should not be used on both sides of a binary operator", - "type": "BUG", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-identical-expressions.md" - }, - { - "key": "no-identical-functions", - "name": "Functions should not have identical implementations", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-identical-functions.md" - }, - { - "key": "no-ignored-initial-value", - "name": "Function parameters, caught exceptions and foreach variables' initial values should not be ignored", - "type": "BUG", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-ignored-initial-value.md" - }, - { - "key": "no-ignored-return", - "name": "Return values should not be ignored when function calls don't have any side effects", - "type": "BUG", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-ignored-return.md" - }, - { - "key": "no-in-misuse", - "name": "\"in\" operator should not be used on array", - "type": "BUG", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-in-misuse.md" - }, - { - "key": "no-inconsistent-return", - "name": "Functions should use \"return\" consistently", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-inconsistent-return.md" - }, - { - "key": "no-invalid-await", - "name": "\"await\" should only be used with promises", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-invalid-await.md" - }, - { - "key": "no-invariant-return", - "name": "Function returns should not be invariant", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-invariant-return.md" - }, - { - "key": "no-inverted-boolean-check", - "name": "Boolean checks should not be inverted", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-inverted-boolean-check.md" - }, - { - "key": "no-misleading-array-reverse", - "name": "Array-mutating methods should not be used misleadingly", - "type": "BUG", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-misleading-array-reverse.md" - }, - { - "key": "no-misspelled-operator", - "name": "Non-existent operators '=+', '=-' and '=!' should not be used", - "type": "BUG", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-misspelled-operator.md" - }, - { - "key": "no-multiline-string-literals", - "name": "Multiline string literals should not be used", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-multiline-string-literals.md" - }, - { - "key": "no-nested-incdec", - "name": "Increment (++) and decrement (--) operators should not be used in a method call or mixed with other operators in an expression", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-nested-incdec.md" - }, - { - "key": "no-nested-switch", - "name": "\"switch\" statements should not be nested", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-nested-switch.md" - }, - { - "key": "no-nested-template-literals", - "name": "Template literals should not be nested", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-nested-template-literals.md" - }, - { - "key": "no-redundant-boolean", - "name": "Boolean literals should not be redundant", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-redundant-boolean.md" - }, - { - "key": "no-redundant-jump", - "name": "Jump statements should not be redundant", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-redundant-jump.md" - }, - { - "key": "no-redundant-parentheses", - "name": "Redundant pairs of parentheses should be removed", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-redundant-parentheses.md" - }, - { - "key": "no-return-type-any", - "name": "Primitive return types should be used", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-return-type-any.md" - }, - { - "key": "no-same-line-conditional", - "name": "Conditionals should start on new lines", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-same-line-conditional.md" - }, - { - "key": "no-self-assignment", - "name": "Variables should not be self-assigned", - "type": "BUG", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-self-assignment.md" - }, - { - "key": "no-small-switch", - "name": "\"switch\" statements should have at least 3 \"case\" clauses", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-small-switch.md" - }, - { - "key": "no-statements-same-line", - "name": "Statements should be on separate lines", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-statements-same-line.md" - }, - { - "key": "no-try-promise", - "name": "Promise rejections should not be caught by 'try' block", - "type": "BUG", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-try-promise.md" - }, - { - "key": "no-unconditional-jump", - "name": "Loops with at most one iteration should be refactored", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-unconditional-jump.md" - }, - { - "key": "no-undefined-argument", - "name": "\"undefined\" should not be passed as the value of optional parameters", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-undefined-argument.md" - }, - { - "key": "no-unenclosed-multiline-block", - "name": "Multiline blocks should be enclosed in curly braces", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-unenclosed-multiline-block.md" - }, - { - "key": "no-unthrown-error", - "name": "Errors should not be created without being thrown", - "type": "BUG", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-unthrown-error.md" - }, - { - "key": "no-unused-array", - "name": "Array contents should be used", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-unused-array.md" - }, - { - "key": "no-use-of-empty-return-value", - "name": "The output of functions that don't return anything should not be used", - "type": "BUG", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-use-of-empty-return-value.md" - }, - { - "key": "no-useless-cast", - "name": "Redundant casts and not-null assertions should be avoided", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-useless-cast.md" - }, - { - "key": "no-useless-catch", - "name": "\"catch\" clauses should do more than rethrow", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-useless-catch.md" - }, - { - "key": "no-useless-increment", - "name": "Values should not be uselessly incremented", - "type": "BUG", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-useless-increment.md" - }, - { - "key": "no-useless-intersection", - "name": "Types without members, 'any' and 'never' should not be used in type intersections", - "type": "BUG", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-useless-intersection.md" - }, - { - "key": "no-variable-usage-before-declaration", - "name": "Variables should be declared before they are used", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/no-variable-usage-before-declaration.md" - }, - { - "key": "parameters-max-number", - "name": "Functions should not have too many parameters", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/parameters-max-number.md" - }, - { - "key": "prefer-default-last", - "name": "\"default\" clauses should be last", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/prefer-default-last.md" - }, - { - "key": "prefer-immediate-return", - "name": "Local variables should not be declared and then immediately returned or thrown", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/prefer-immediate-return.md" - }, - { - "key": "prefer-optional", - "name": "Optional property declarations should use '?' syntax", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/prefer-optional.md" - }, - { - "key": "prefer-promise-shorthand", - "name": "Shorthand promises should be used", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/prefer-promise-shorthand.md" - }, - { - "key": "prefer-type-guard", - "name": "Type guards should be used", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/prefer-type-guard.md" - }, - { - "key": "use-primitive-type", - "name": "Wrapper objects should not be used for primitive types", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/use-primitive-type.md" - }, - { - "key": "use-type-alias", - "name": "Type aliases should be used", - "type": "CODE_SMELL", - "url": "https://github.com/SonarSource/SonarTS/tree/1.9.0.3766/sonarts-core/docs/rules/use-type-alias.md" - } -] diff --git a/sonar-plugin/sonar-javascript-plugin/src/main/resources/org/sonar/l10n/typescript/rules/tslint/rules.json b/sonar-plugin/sonar-javascript-plugin/src/main/resources/org/sonar/l10n/typescript/rules/tslint/rules.json deleted file mode 100644 index 06a17b7e487..00000000000 --- a/sonar-plugin/sonar-javascript-plugin/src/main/resources/org/sonar/l10n/typescript/rules/tslint/rules.json +++ /dev/null @@ -1,866 +0,0 @@ -[ - { - "key": "adjacent-overload-signatures", - "name": "Enforces function overloads to be consecutive.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/adjacent-overload-signatures" - }, - { - "key": "align", - "name": "Enforces vertical alignment.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/align" - }, - { - "key": "array-type", - "name": "Requires using either \u0027T[]\u0027 or \u0027Array\u003cT\u003e\u0027 for arrays.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/array-type" - }, - { - "key": "arrow-parens", - "name": "Requires parentheses around the parameters of arrow function definitions.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/arrow-parens" - }, - { - "key": "arrow-return-shorthand", - "name": "Suggests to convert `() \u003d\u003e { return x; }` to `() \u003d\u003e x`.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/arrow-return-shorthand" - }, - { - "key": "await-promise", - "name": "Warns for an awaited value that is not a Promise.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/await-promise" - }, - { - "key": "ban-comma-operator", - "name": "Disallows the comma operator to be used.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/ban-comma-operator" - }, - { - "key": "ban", - "name": "Bans the use of specific functions or global methods.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/ban" - }, - { - "key": "ban-types", - "name": "Bans specific types from being used", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/ban-types" - }, - { - "key": "binary-expression-operand-order", - "name": "In a binary expression, a literal should always be on the right-hand side if possible", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/binary-expression-operand-order" - }, - { - "key": "callable-types", - "name": "An interface or literal type with just a call signature can be written as a function type.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/callable-types" - }, - { - "key": "class-name", - "name": "Enforces PascalCased class and interface names.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/class-name" - }, - { - "key": "comment-format", - "name": "Enforces formatting rules for single-line comments.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/comment-format" - }, - { - "key": "completed-docs", - "name": "Enforces JSDoc comments for important items be filled out.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/completed-docs" - }, - { - "key": "curly", - "name": "Enforces braces for `if`/`for`/`do`/`while` statements.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/curly" - }, - { - "key": "cyclomatic-complexity", - "name": "Enforces a threshold of cyclomatic complexity.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/cyclomatic-complexity" - }, - { - "key": "deprecation", - "name": "Warns when deprecated APIs are used.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/deprecation" - }, - { - "key": "encoding", - "name": "Enforces UTF-8 file encoding.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/encoding" - }, - { - "key": "eofline", - "name": "Ensures the file ends with a newline.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/eofline" - }, - { - "key": "file-header", - "name": "Enforces a certain header comment for all files, matched by a regular expression.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/file-header" - }, - { - "key": "forin", - "name": "Requires a `for ... in` statement to be filtered with an `if` statement.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/forin" - }, - { - "key": "import-blacklist", - "name": "Disallows importing the specified modules directly via `import` and `require`", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/import-blacklist" - }, - { - "key": "import-spacing", - "name": "Ensures proper spacing between import statement keywords", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/import-spacing" - }, - { - "key": "indent", - "name": "Enforces indentation with tabs or spaces.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/indent" - }, - { - "key": "interface-name", - "name": "Requires interface names to begin with a capital \u0027I\u0027", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/interface-name" - }, - { - "key": "interface-over-type-literal", - "name": "Prefer an interface declaration over a type literal (`type T \u003d { ... }`)", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/interface-over-type-literal" - }, - { - "key": "jsdoc-format", - "name": "Enforces basic format rules for JSDoc comments.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/jsdoc-format" - }, - { - "key": "label-position", - "name": "Only allows labels in sensible locations.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/label-position" - }, - { - "key": "linebreak-style", - "name": "Enforces a consistent linebreak style.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/linebreak-style" - }, - { - "key": "match-default-export-name", - "name": "Requires that a default import have the same name as the declaration it imports", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/match-default-export-name" - }, - { - "key": "max-classes-per-file", - "name": "A file may not contain more than the specified number of classes", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/max-classes-per-file" - }, - { - "key": "max-file-line-count", - "name": "Requires files to remain under a certain number of lines", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/max-file-line-count" - }, - { - "key": "max-line-length", - "name": "Requires lines to be under a certain max length.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/max-line-length" - }, - { - "key": "member-access", - "name": "Requires explicit visibility declarations for class members.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/member-access" - }, - { - "key": "member-ordering", - "name": "Enforces member ordering.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/member-ordering" - }, - { - "key": "new-parens", - "name": "Requires parentheses when invoking a constructor via the `new` keyword.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/new-parens" - }, - { - "key": "newline-before-return", - "name": "Enforces blank line before return when not the only line in the block.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/newline-before-return" - }, - { - "key": "newline-per-chained-call", - "name": "Requires that chained method calls be broken apart onto separate lines.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/newline-per-chained-call" - }, - { - "key": "no-angle-bracket-type-assertion", - "name": "Requires the use of `as Type` for type assertions instead of `\u003cType\u003e`.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/no-angle-bracket-type-assertion" - }, - { - "key": "no-any", - "name": "Disallows usages of `any` as a type declaration.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/no-any" - }, - { - "key": "no-arg", - "name": "Disallows use of `arguments.callee`.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/no-arg" - }, - { - "key": "no-bitwise", - "name": "Disallows bitwise operators.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/no-bitwise" - }, - { - "key": "no-boolean-literal-compare", - "name": "Warns on comparison to a boolean literal, as in `x \u003d\u003d\u003d true`.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/no-boolean-literal-compare" - }, - { - "key": "no-conditional-assignment", - "name": "Disallows any type of assignment in conditionals.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/no-conditional-assignment" - }, - { - "key": "no-consecutive-blank-lines", - "name": "Disallows one or more blank lines in a row.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/no-consecutive-blank-lines" - }, - { - "key": "no-console", - "name": "Bans the use of specified `console` methods.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/no-console" - }, - { - "key": "no-construct", - "name": "Disallows access to the constructors of `String`, `Number`, and `Boolean`.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/no-construct" - }, - { - "key": "no-debugger", - "name": "Disallows `debugger` statements.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/no-debugger" - }, - { - "key": "no-default-export", - "name": "Disallows default exports in ES6-style modules.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/no-default-export" - }, - { - "key": "no-duplicate-imports", - "name": "Disallows multiple import statements from the same module.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/no-duplicate-imports" - }, - { - "key": "no-duplicate-super", - "name": "Warns if \u0027super()\u0027 appears twice in a constructor.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/no-duplicate-super" - }, - { - "key": "no-duplicate-switch-case", - "name": "Prevents duplicate cases in switch statements.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/no-duplicate-switch-case" - }, - { - "key": "no-duplicate-variable", - "name": "Disallows duplicate variable declarations in the same block scope.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/no-duplicate-variable" - }, - { - "key": "no-dynamic-delete", - "name": "Bans usage of the delete operator with computed key expressions.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/no-dynamic-delete" - }, - { - "key": "no-empty-interface", - "name": "Forbids empty interfaces.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/no-empty-interface" - }, - { - "key": "no-empty", - "name": "Disallows empty blocks.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/no-empty" - }, - { - "key": "no-eval", - "name": "Disallows `eval` function invocations.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/no-eval" - }, - { - "key": "no-floating-promises", - "name": "Promises returned by functions must be handled appropriately.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/no-floating-promises" - }, - { - "key": "no-for-in-array", - "name": "Disallows iterating over an array with a for-in loop.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/no-for-in-array" - }, - { - "key": "no-implicit-dependencies", - "name": "Disallows importing modules that are not listed as dependency in the project\u0027s package.json", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/no-implicit-dependencies" - }, - { - "key": "no-import-side-effect", - "name": "Avoid import statements with side-effect.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/no-import-side-effect" - }, - { - "key": "no-inferrable-types", - "name": "Disallows explicit type declarations for variables or parameters initialized to a number, string, or boolean.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/no-inferrable-types" - }, - { - "key": "no-inferred-empty-object-type", - "name": "Disallow type inference of {} (empty object type) at function and constructor call sites", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/no-inferred-empty-object-type" - }, - { - "key": "no-internal-module", - "name": "Disallows internal `module`", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/no-internal-module" - }, - { - "key": "no-invalid-template-strings", - "name": "Warns on use of `${` in non-template strings.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/no-invalid-template-strings" - }, - { - "key": "no-invalid-this", - "name": "Disallows using the `this` keyword outside of classes.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/no-invalid-this" - }, - { - "key": "no-irregular-whitespace", - "name": "Disallow irregular whitespace within a file, including strings and comments.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/no-irregular-whitespace" - }, - { - "key": "no-magic-numbers", - "name": "Disallows the use constant number values outside of variable assignments", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/no-magic-numbers" - }, - { - "key": "no-mergeable-namespace", - "name": "Disallows mergeable namespaces in the same file.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/no-mergeable-namespace" - }, - { - "key": "no-misused-new", - "name": "Warns on apparent attempts to define constructors for interfaces or `new` for classes.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/no-misused-new" - }, - { - "key": "no-namespace", - "name": "Disallows use of internal `module`s and `namespace`s.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/no-namespace" - }, - { - "key": "no-non-null-assertion", - "name": "Disallows non-null assertions using the `!` postfix operator.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/no-non-null-assertion" - }, - { - "key": "no-null-keyword", - "name": "Disallows use of the `null` keyword literal.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/no-null-keyword" - }, - { - "key": "no-object-literal-type-assertion", - "name": "Forbids an object literal to appear in a type assertion expression", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/no-object-literal-type-assertion" - }, - { - "key": "no-parameter-properties", - "name": "Disallows parameter properties in class constructors.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/no-parameter-properties" - }, - { - "key": "no-parameter-reassignment", - "name": "Disallows reassigning parameters.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/no-parameter-reassignment" - }, - { - "key": "no-redundant-jsdoc", - "name": "Forbids JSDoc which duplicates TypeScript functionality.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/no-redundant-jsdoc" - }, - { - "key": "no-reference-import", - "name": "Don\u0027t `\u003creference types\u003d\"foo\" /\u003e` if you import `foo` anyway.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/no-reference-import" - }, - { - "key": "no-reference", - "name": "Disallows `/// \u003creference path\u003d\u003e` imports (use ES6-style imports instead).", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/no-reference" - }, - { - "key": "no-require-imports", - "name": "Disallows invocation of `require()`.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/no-require-imports" - }, - { - "key": "no-return-await", - "name": "Disallows unnecessary `return await`.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/no-return-await" - }, - { - "key": "no-shadowed-variable", - "name": "Disallows shadowing variable declarations.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/no-shadowed-variable" - }, - { - "key": "no-sparse-arrays", - "name": "Forbids array literals to contain missing elements.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/no-sparse-arrays" - }, - { - "key": "no-string-literal", - "name": "Forbids unnecessary string literal property access", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/no-string-literal" - }, - { - "key": "no-string-throw", - "name": "Flags throwing plain strings or concatenations of strings.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/no-string-throw" - }, - { - "key": "no-submodule-imports", - "name": "Disallows importing any submodule.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/no-submodule-imports" - }, - { - "key": "no-switch-case-fall-through", - "name": "Disallows falling through case statements.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/no-switch-case-fall-through" - }, - { - "key": "no-this-assignment", - "name": "Disallows unnecessary references to `this`.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/no-this-assignment" - }, - { - "key": "no-trailing-whitespace", - "name": "Disallows trailing whitespace at the end of a line.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/no-trailing-whitespace" - }, - { - "key": "no-unbound-method", - "name": "Warns when a method is used outside of a method call.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/no-unbound-method" - }, - { - "key": "no-unnecessary-callback-wrapper", - "name": "Replaces `x \u003d\u003e f(x)` with just `f`", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/no-unnecessary-callback-wrapper" - }, - { - "key": "no-unnecessary-class", - "name": "Disallows classes that are not strictly necessary.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/no-unnecessary-class" - }, - { - "key": "no-unnecessary-initializer", - "name": "Forbids a \u0027var\u0027/\u0027let\u0027 statement or destructuring initializer to be initialized to \u0027undefined\u0027.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/no-unnecessary-initializer" - }, - { - "key": "no-unnecessary-qualifier", - "name": "Warns when a namespace qualifier (`A.x`) is unnecessary.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/no-unnecessary-qualifier" - }, - { - "key": "no-unnecessary-type-assertion", - "name": "Warns if a type assertion does not change the type of an expression.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/no-unnecessary-type-assertion" - }, - { - "key": "no-unsafe-any", - "name": "Warns when using an expression of type \u0027any\u0027 in a dynamic way", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/no-unsafe-any" - }, - { - "key": "no-unsafe-finally", - "name": "Disallows control flow statements, such as `return`, `continue`, `break` and `throws` in finally blocks.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/no-unsafe-finally" - }, - { - "key": "no-unused-expression", - "name": "Disallows unused expression statements.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/no-unused-expression" - }, - { - "key": "no-unused-variable", - "name": "Disallows unused imports, variables, functions and private class members", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/no-unused-variable" - }, - { - "key": "no-use-before-declare", - "name": "Disallows usage of variables before their declaration.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/no-use-before-declare" - }, - { - "key": "no-var-keyword", - "name": "Disallows usage of the `var` keyword.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/no-var-keyword" - }, - { - "key": "no-var-requires", - "name": "Disallows the use of require statements except in import statements.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/no-var-requires" - }, - { - "key": "no-void-expression", - "name": "Requires expressions of type `void` to appear in statement position.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/no-void-expression" - }, - { - "key": "number-literal-format", - "name": "Checks that decimal literals should begin with \u00270.\u0027 instead of just \u0027.\u0027, and should not end with a trailing \u00270\u0027.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/number-literal-format" - }, - { - "key": "object-literal-key-quotes", - "name": "Enforces consistent object literal property quote style.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/object-literal-key-quotes" - }, - { - "key": "object-literal-shorthand", - "name": "Enforces/disallows use of ES6 object literal shorthand.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/object-literal-shorthand" - }, - { - "key": "object-literal-sort-keys", - "name": "Checks ordering of keys in object literals", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/object-literal-sort-keys" - }, - { - "key": "one-line", - "name": "Requires the specified tokens to be on the same line as the expression preceding them.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/one-line" - }, - { - "key": "one-variable-per-declaration", - "name": "Disallows multiple variable definitions in the same declaration statement.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/one-variable-per-declaration" - }, - { - "key": "only-arrow-functions", - "name": "Disallows traditional (non-arrow) function expressions.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/only-arrow-functions" - }, - { - "key": "ordered-imports", - "name": "Requires that import statements be alphabetized and grouped.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/ordered-imports" - }, - { - "key": "prefer-conditional-expression", - "name": "Recommends to use a conditional expression instead of assigning to the same thing in each branch of an if statement.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/prefer-conditional-expression" - }, - { - "key": "prefer-const", - "name": "Requires that variable declarations use `const` instead of `let` and `var` if possible.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/prefer-const" - }, - { - "key": "prefer-for-of", - "name": "Recommends a \u0027for-of\u0027 loop over a standard \u0027for\u0027 loop if the index is only used to access the array being iterated.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/prefer-for-of" - }, - { - "key": "prefer-function-over-method", - "name": "Warns for class methods that do not use \u0027this\u0027.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/prefer-function-over-method" - }, - { - "key": "prefer-method-signature", - "name": "Prefer `foo(): void` over `foo: () \u003d\u003e void` in interfaces and types.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/prefer-method-signature" - }, - { - "key": "prefer-object-spread", - "name": "Enforces the use of the ES2015 object spread operator over `Object.assign()` where appropriate.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/prefer-object-spread" - }, - { - "key": "prefer-readonly", - "name": "Requires that private variables are marked as `readonly` if they\u0027re never modified outside of the constructor.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/prefer-readonly" - }, - { - "key": "prefer-switch", - "name": "Prefer a `switch` statement to an `if` statement with simple `\u003d\u003d\u003d` comparisons.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/prefer-switch" - }, - { - "key": "prefer-template", - "name": "Prefer a template expression over string literal concatenation.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/prefer-template" - }, - { - "key": "prefer-while", - "name": "Prefer `while` loops instead of `for` loops without an initializer and incrementor.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/prefer-while" - }, - { - "key": "promise-function-async", - "name": "Requires any function or method that returns a promise to be marked async.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/promise-function-async" - }, - { - "key": "quotemark", - "name": "Requires single or double quotes for string literals.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/quotemark" - }, - { - "key": "radix", - "name": "Requires the radix parameter to be specified when calling `parseInt`.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/radix" - }, - { - "key": "restrict-plus-operands", - "name": "When adding two variables, operands must both be of type number or of type string.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/restrict-plus-operands" - }, - { - "key": "return-undefined", - "name": "Prefer `return;` in void functions and `return undefined;` in value-returning functions.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/return-undefined" - }, - { - "key": "semicolon", - "name": "Enforces consistent semicolon usage at the end of every statement.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/semicolon" - }, - { - "key": "space-before-function-paren", - "name": "Require or disallow a space before function parenthesis", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/space-before-function-paren" - }, - { - "key": "space-within-parens", - "name": "Enforces spaces within parentheses or disallow them", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/space-within-parens" - }, - { - "key": "strict-boolean-expressions", - "name": "Restricts the types allowed in boolean expressions", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/strict-boolean-expressions" - }, - { - "key": "strict-type-predicates", - "name": "Warns for type predicates that are always true or always false", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/strict-type-predicates" - }, - { - "key": "switch-default", - "name": "Require a `default` case in all `switch` statements.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/switch-default" - }, - { - "key": "switch-final-break", - "name": "Checks whether the final clause of a switch statement ends in `break;`.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/switch-final-break" - }, - { - "key": "trailing-comma", - "name": "Requires or disallows trailing commas in array and object literals, destructuring assignments, function typings, named imports and exports and function parameters.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/trailing-comma" - }, - { - "key": "triple-equals", - "name": "Requires `\u003d\u003d\u003d` and `!\u003d\u003d` in place of `\u003d\u003d` and `!\u003d`.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/triple-equals" - }, - { - "key": "type-literal-delimiter", - "name": "Checks that type literal members are separated by semicolons", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/type-literal-delimiter" - }, - { - "key": "typedef", - "name": "Requires type definitions to exist.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/typedef" - }, - { - "key": "typedef-whitespace", - "name": "Requires or disallows whitespace for type definitions.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/typedef-whitespace" - }, - { - "key": "typeof-compare", - "name": "Makes sure result of `typeof` is compared to correct string values", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/typeof-compare" - }, - { - "key": "unified-signatures", - "name": "Warns for any two overloads that could be unified into one by using a union or an optional/rest parameter.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/unified-signatures" - }, - { - "key": "use-default-type-parameter", - "name": "Warns if an explicitly specified type argument is the default for that type parameter.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/use-default-type-parameter" - }, - { - "key": "use-isnan", - "name": "Enforces use of the `isNaN()` function to check for NaN references instead of a comparison to the `NaN` constant.", - "type": "BUG", - "url": "https://palantir.github.io/tslint/rules/use-isnan" - }, - { - "key": "variable-name", - "name": "Checks variable names for various errors.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/variable-name" - }, - { - "key": "whitespace", - "name": "Enforces whitespace style conventions.", - "type": "CODE_SMELL", - "url": "https://palantir.github.io/tslint/rules/whitespace" - } -] diff --git a/sonar-plugin/sonar-javascript-plugin/src/main/resources/static/documentation.md b/sonar-plugin/sonar-javascript-plugin/src/main/resources/static/documentation.md deleted file mode 100644 index 51d2553ed02..00000000000 --- a/sonar-plugin/sonar-javascript-plugin/src/main/resources/static/documentation.md +++ /dev/null @@ -1,76 +0,0 @@ ---- -title: JavaScript/TypeScript/CSS -key: javascript ---- - - - - - -## Prerequisites - -In order to analyze JavaScript, TypeScript or CSS code, you need to have supported version of Node.js installed on the -machine running the scan. We recommend using the [active LTS version of Node.js](https://nodejs.org/en/about/releases/) for optimal stability and performance, which is currently v20 or v18. v16 is still supported, but it already reached end-of-life and -is deprecated. - -If `node` is not available in the PATH, you can use property `sonar.nodejs.executable` to set an absolute path to -Node.js executable. - -If you have a community plugin for CSS analysis installed on your SonarQube instance it will conflict with analysis of CSS, so it should be removed. - -## Language-Specific Properties - -Discover and update the JavaScript / TypeScript [properties](/analysis/analysis-parameters/) in: **Project [Administration > General Settings > JavaScript / TypeScript](/#sonarqube-admin#/admin/settings?category=javascript+%2F+typescript)**. - -Discover and update the CSS [properties](/analysis/analysis-parameters/) in: **Project [Administration > General Settings > CSS](/#sonarqube-admin#/admin/settings?category=css)**. - -## Supported Frameworks, Versions and Languages - -- ECMAScript 3 - 2022 -- TypeScript 5.0.4 -- React JSX, Vue.js, Angular -- Flow -- CSS, SCSS, Less, also 'style' inside PHP, HTML, and VueJS files - -## Troubleshooting - -### Slow or unresponsive analysis - -On a big project, more memory may need to be allocated to analyze the project. This would be manifested by analysis getting stuck and the following stacktrace might appear in the logs - -``` -ERROR: Failed to get response while analyzing [file].ts -java.io.InterruptedIOException: timeout -``` - -You can use `sonar.javascript.node.maxspace` property to allow the analysis to use more memory. Set this property to `4096` or `8192` for big projects. This property should be set in `sonar-project.properties` file or on command line for scanner (with `-Dsonar.javascript.node.maxspace=4096`). - -### Default exclusions for JS/TS - -By default, analysis will exclude files from dependencies in usual directories, such as `node_modules`, -`bower_components`, `dist`, `vendor`, and `external`. It will also ignore `.d.ts` files. If for some reason analysis of files in these directories -is desired, it can be configured by setting `sonar.javascript.exclusions` property to empty value, i.e. -`sonar.javascript.exclusions=""`, or to comma separated list of paths to be excluded. This property will exclude only JavaScript/TypeScript files, while `sonar.exclusions` property will exclude all files. `sonar.exclusions` property should be -preferred to configure general exclusions for the project. - -### Detection of code bundles - -The analyzer will attempt to detect bundled code or generated code. This means code that was automatically transformed -and optimized with tools such as Webpack and similar. We consider generated code out of scope of the analysis since -developers are not able to act upon the findings in such code. Whenever generated code is detected, the analysis will -print a log message: once per the whole project on `INFO` level, and for each file on the `DEBUG` level. If you want to -opt-in for analyzing the generated code or in case the detection is incorrect, you can disable it by setting -`sonar.javascript.detectBundles=false`. - -### Custom rules for JS/TS - -Custom rules are not supported by the analyzer. As an alternative we suggest you to have a look at [ESLint](https://eslint.org/docs/developer-guide/), it provides custom rules that you can then import thanks to the [External Issues](/analysis/external-issues/) feature. - -## Related Pages - -- [Importing External Issues](/analysis/external-issues/) (ESLint, TSLint, StyleLint) -- [Test Coverage & Execution](/analysis/coverage/) (LCOV format) -- [SonarJS Plugin for ESLint](https://github.com/SonarSource/eslint-plugin-sonarjs) - -- [Adding Coding Rules](/extend/adding-coding-rules/) -