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

**I want to request a feature.** In TypeScript you can use JSDoc: ```typescript /** * Gets the weekday for a given date * @param date * @param {Language} language *...

See #482, Reported in #828 ```ts const right = { error: true as true // cast is flagged as unnecessary } typeof right.error // true const wrong = { error:...

false positive
hardening

**I want to request a feature.** Typescript noUnusedParameters option ignores params beginning with underscore (understand that some people dislike this, but this is how it is). For such params that...

false positive

https://palantir.github.io/tslint/rules/no-namespace/ RSPEC to be defined

new-rule
plugin
hardening

``` const message = "Hello, world!"; console.log("Hello, world!"); // Noncompliant, use constant ```

enhancement
hardening

Current implementation of [RSPEC-3801](https://jira.sonarsource.com/browse/RSPEC-3801) should cover [union types](https://www.typescriptlang.org/docs/handbook/advanced-types.html#union-types) when using switch, as described in specification about [exhaustiveness checking](https://www.typescriptlang.org/docs/handbook/advanced-types.html#exhaustiveness-checking). For instance: ```typescript type Shape = Square | Rectangle | Circle |...

false positive
hardening

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

plugin
common-rule
hardening

**I want to request a feature.** **Rule key:** S122/no-statements-same-line Would be nice if the rule above had a configuration allowing to disable it for some statements like this: ```json …...

enhancement
hardening

**I want to report a bug.** The bug is about "magic numbers" inside of strings written in backticks ( `) **SonarTS version:** 1.8 **Node.js version:** 10.11.0 **TypeScript version:** 3.1.6 **Reproducer**...

When defining a `enum`, its properties can be defined using any format, some examples ```ts enum UpperCamelCase { FooBar, Baz } enum CamelCase { fooBar, Baz } enum Caps {...

new-rule
in specification