Skip to content

10.3.0

Compare
Choose a tag to compare
@alex-sonar alex-sonar released this 12 Jun 10:02
· 503 commits to master since this release
9c62289

milestone: https://github.com/SonarSource/SonarJS/milestone/72?closed=1

This brings 5 new and 7 improved rules for core JavaScript and TypeScript features.
Also, analysis now works with all TypeScript 5 code and compiler options.

The updates are available in SonarCloud, and will be included in SonarQube 10.1, and in the next release of SonarLint.

New rules

  1. S6643: Prototypes of builtin objects should not be modified
  2. S6638 (no-constant-binary-expression) Binary expressions should not always return the same value
  3. S6637 (no-extra-bind): Unnecessary calls to .bind() should not be used
  4. S6635 (no-constructor-return) Constructors should not return values
  5. S2430 (new-cap) Constructor names should start with an uppercase letter

Improved rules

  1. S3796 (array-callback-without-return): cover new array functions, typed arrays and bracket notation
  2. S1528 (array-constructor): add quickfix
  3. S4043 (no-misleading-array-reverse) to suggest using toReversed or toSorted
  4. S4622 (max-union-size): Ignore unions used with utility types
  5. S1128 (unused-import): Support usage in JSDoc comments
  6. S1128 (unused-import): Ignore imported symbols used as Vue.js directives
  7. S6544 (no-misused-promises): Don't flag Promise-returning function provided to attribute where a void return was expected in JSX attributes. Also do not flag not awaited, resolved or error-handled promises.

Rule descriptions

300+ small fixes to rule descriptions where there were small inconsistencies in casing, titles, etc.