10.3.0
·
755 commits
to master
since this release
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
- S6643: Prototypes of builtin objects should not be modified
- S6638 (no-constant-binary-expression) Binary expressions should not always return the same value
- S6637 (no-extra-bind): Unnecessary calls to .bind() should not be used
- S6635 (no-constructor-return) Constructors should not return values
- S2430 (new-cap) Constructor names should start with an uppercase letter
Improved rules
- S3796 (array-callback-without-return): cover new array functions, typed arrays and bracket notation
- S1528 (array-constructor): add quickfix
- S4043 (no-misleading-array-reverse) to suggest using toReversed or toSorted
- S4622 (max-union-size): Ignore unions used with utility types
- S1128 (unused-import): Support usage in JSDoc comments
- S1128 (unused-import): Ignore imported symbols used as Vue.js directives
- 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.