SonarTS icon indicating copy to clipboard operation
SonarTS copied to clipboard

Static code analyzer for TypeScript

Results 59 SonarTS issues
Sort by recently updated
recently updated
newest added

[RSPEC-3562](https://jira.sonarsource.com/browse/RSPEC-3562) The new proposed rule should always check for exhaustiveness wherever there is a switch on a union type. ``` type Shape = Square | Rectangle | Circle | Triangle;...

new-rule
in specification

These 2 lines doing the same thing, while second line should be preferred ```ts console.log("Hello " + name); // Noncompliant console.log(name + " is my friend"); // Noncompliant // OK...

new-rule
in specification

https://www.typescriptlang.org/docs/handbook/classes.html ``` class A { public prop: number constructor(prop:number) { this.prop = prop; // Noncompliant } } ``` ``` class A { constructor(public prop:number) { } } ```

new-rule

`arr.split()` without argument will return `arr`

new-rule

``` function foo(p1, p2) { var a = p1 + p2; return a * 42; } function bar(p3, p4) { var b = p3 + p4; return b * 42;...

enhancement

Implements [RSPEC-1109](https://jira.sonarsource.com/browse/RSPEC-1109) Community input [here](https://community.sonarsource.com/t/a-close-curly-brace-should-be-located-at-the-beginning-of-a-line-for-all-languages/476)

new-rule

**I want to request a feature.** Please support the template rule “Track uses of disallowed classes” in the same manner as how it is done for Java. Note that this...

**I want to request a feature.** Please support the template rule “Track uses of disallowed methods” in the same manner as how it is done for Java. Here is a...

**I want to request a feature.** In the `no-identical-functions` rule, the user should be able to configure the number-of-lines threshold below which two functions will never be counted as identical....

Implements [RSPEC-3973](https://jira.sonarsource.com/browse/RSPEC-3973)

new-rule
common-rule