Skip to content

Releases: SonarSource/SonarJS

10.2.0

28 Apr 14:04
2007aa0
Compare
Choose a tag to compare

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

This will be released in SonarQube 10.1

New rules

  1. Add rule S6606: Nullish coalescing should be preferred
  2. Add rule S6598: Function types should be preferred
  3. Add rule S6594: "RegExp.exec()" should be preferred over "String.match()"
  4. Add rule S6583: Enum members should not mix value types
  5. Add rule S6590: "as const" assertions should be preferred
  6. Add rule S6582: Optional chaining should be preferred
  7. Add rule S6578: Enum values should be unique
  8. Add rule S6572: Enum member values should be either all initialized or none
  9. Add rule S6571 (no-redundant-type-constituents): Redundant types should not be used
  10. Add rule S2094 (no-empty-class-check): Classes should not be empty
  11. Add rule S6565: prefer-return-this-type
  12. Add rule S6569: Unnecessary type constraints should be removed
  13. Add rule S6568 (no-confusing-non-null-assertion)
  14. Add rule S6564: Redundant type aliases should not be used
  15. Add rule S6551 (no-base-to-string): Objects and classes converted or coerced to strings should define a "toString()" method
  16. Add rule S6557: Ends of strings should be checked with "startsWith()" and "endsWith()"
  17. Add rule S6550 (prefer-literal-enum-member): All enum members should be literals

Improved rules

  1. Update S3402 (no-incorrect-string-concat): Consider the addition assignment operator
  2. Update rule S6544: add TypeScript/eslint's no-floating-promises rule
  3. Update rule S6544: add no-misused-promises cases
  4. Update S2871 (no-alphabetical-sort): Cover cases from require-array-sort-compare
  5. Update S4139 (no-for-in-array): Cover cases from TypeScript ESLint implementation
  6. Fix FP S131 (switch-without-default): Ignore exhaustive switches on unions and enums

10.1.0

24 Mar 11:00
5e1c02b
Compare
Choose a tag to compare

What's Changed

This release brings more advanced support for JavaScript built-ins with 8 new rules and 14 improved rules.

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

Part of SonarQube 10.0

10.0.1

17 Feb 10:54
f58ba51
Compare
Choose a tag to compare

10.0.0

10 Feb 14:16
e112541
Compare
Choose a tag to compare

What's Changed

Full Changelog: 9.13.0.20537...10.0.0.20728

Part of SonarQube 10.0

9.13.0

13 Jan 16:07
68ff765
Compare
Choose a tag to compare

https://github.com/SonarSource/SonarJS/issues?q=is%3Aclosed+milestone%3A9.13

What's Changed

Full Changelog: 9.12.1.20358...9.13.0.20537

9.12.1

13 Dec 15:08
b016c84
Compare
Choose a tag to compare

9.12.0

05 Dec 16:23
a7588a1
Compare
Choose a tag to compare

In this release:

  • We improved the precision of the Cognitive Complexity for JSX by ignoring shorthand such as short-circuit logic.

  • We added 6 new rules for detecting performance issues in React:

    • S6477: Mandatory keys in JSX list components
    • S6479: No array index for keys in JSX list components
    • S6486: No uniq values as keys for JSX list components
    • S6480: Disallow .bind() and arrow functions in JSX props
    • S6481: React Context Provider values should not have unstable identities
    • S6478: React components should not be nested

Milestone: https://github.com/SonarSource/SonarJS/issues?q=is%3Aclosed+milestone%3A9.12

Full Changelog: 9.11.1.20218...9.12.0.20319

9.11.1

25 Nov 09:48
3f2651c
Compare
Choose a tag to compare

Fix dependency injection of JavaScriptProjectChecker for SonarCloud

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

SonarQube version: 9.8

9.11.0

22 Nov 15:41
18fcf3b
Compare
Choose a tag to compare

This new version:

  • Improves the performance of slow rules
  • Brings a better experience for TSconfig with node_modules
  • Adds support for CSS analysis in SonarLint
  • Enables typed rules for JS in SonarLint
  • Support TypeScript 4.9

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

SonarQube version: 9.8

9.10.0

03 Nov 16:21
5a217f8
Compare
Choose a tag to compare

This new version adds 16 AWS CDK rules and includes fixes listed in the 9.10 milestone.