Ilia Kebets
Ilia Kebets
porting work of https://github.com/SonarSource/SonarJS/pull/3295 due to it being hard to recover after squash and merge of big refactor PR (https://github.com/SonarSource/SonarJS/commit/e4bf3eb89f65b2eb66d60916b8eb0e0d192adc83)
The rule S1848 raises an issue when instantiating a Notification object: ```javascript new Notification('msg') ``` However, the [Notification API](https://developer.mozilla.org/en-US/docs/Web/API/notification) is meant to be used this way to send a message....
The rule S4138 can raise issues when `for...of` is not available for the iterable. The [typescript-eslint rule implementation](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/src/rules/prefer-for-of.ts) does not check the type, so we could add a extend the...
We have lockfiles in fixtures in `its/plugin/projects/` which get flagged by dependabot like here: - https://github.com/SonarSource/SonarJS/pull/3328 - https://github.com/SonarSource/SonarJS/pull/3327 - https://github.com/SonarSource/SonarJS/pull/3326 - https://github.com/SonarSource/SonarJS/pull/3325 They are not relevant and provide unwanted noise....
## Why During the installation of Visual Studio's SonarLint extension, they unpack the `eslint-bridge` tarball which was created with `npm pack`: https://github.com/SonarSource/SonarJS/blob/293e62f81fb328e816ac66198682f700612c666d/eslint-bridge/package.json#L13 Since it contains many files (>14k as of...
Using the information in the `package.json` `engine` property, disable the rule if it is unsupported.
According to feedback, users seem to intentionally add redundant types for “readability” or documentation, e.g., unions of string literals and the type string, same for numbers
Examples: - https://peach.aws-prd.sonarsource.com/issues?resolved=false&rules=javascript%3AS3403&open=AYfLCI8V8rsgv4ohPCTc - https://peach.aws-prd.sonarsource.com/issues?resolved=false&rules=javascript%3AS3403&open=AYfLCwbC8rsgv4ohPC25 - https://peach.aws-prd.sonarsource.com/issues?resolved=false&rules=javascript%3AS3403&open=AYfLCwbD8rsgv4ohPC26 - https://peach.aws-prd.sonarsource.com/issues?resolved=false&rules=javascript%3AS3403&open=AYfLDJOU8rsgv4ohPPir - https://peach.aws-prd.sonarsource.com/issues?resolved=false&rules=javascript%3AS3403&open=AYpEPL6JA8vuoRjT2MwJ - https://peach.aws-prd.sonarsource.com/issues?resolved=false&rules=javascript%3AS3403&open=AYpEPLyCA8vuoRjT2MUf - https://peach.aws-prd.sonarsource.com/issues?resolved=false&rules=javascript%3AS3403&open=AYpEPLyCA8vuoRjT2MUg - https://peach.aws-prd.sonarsource.com/issues?resolved=false&rules=javascript%3AS3403&open=AYpEPLsuA8vuoRjT2MCq - https://peach.aws-prd.sonarsource.com/issues?resolved=false&rules=javascript%3AS3403&open=AYpEPLsuA8vuoRjT2MCr - https://peach.aws-prd.sonarsource.com/issues?resolved=false&rules=javascript%3AS3403&open=AYtK6aGR4lU6anUcOmw8
Capture case where we assign to an existing (already declared) variable, while mutating the first parameter like: ```js foo = Object.assign(bar, baz); // Noncompliant foo = { ...bar, ...baz };...