https://github.com/SonarSource/SonarJS/milestone/71?closed=1
This will be released in SonarQube 10.1
New rules
- Add rule S6606: Nullish coalescing should be preferred
- Add rule S6598: Function types should be preferred
- Add rule S6594: "RegExp.exec()" should be preferred over "String.match()"
- Add rule S6583: Enum members should not mix value types
- Add rule S6590: "as const" assertions should be preferred
- Add rule S6582: Optional chaining should be preferred
- Add rule S6578: Enum values should be unique
- Add rule S6572: Enum member values should be either all initialized or none
- Add rule S6571 (no-redundant-type-constituents): Redundant types should not be used
- Add rule S2094 (no-empty-class-check): Classes should not be empty
- Add rule S6565: prefer-return-this-type
- Add rule S6569: Unnecessary type constraints should be removed
- Add rule S6568 (no-confusing-non-null-assertion)
- Add rule S6564: Redundant type aliases should not be used
- Add rule S6551 (no-base-to-string): Objects and classes converted or coerced to strings should define a "toString()" method
- Add rule S6557: Ends of strings should be checked with "startsWith()" and "endsWith()"
- Add rule S6550 (prefer-literal-enum-member): All enum members should be literals
Improved rules
- Update S3402 (no-incorrect-string-concat): Consider the addition assignment operator
- Update rule S6544: add TypeScript/eslint's no-floating-promises rule
- Update rule S6544: add no-misused-promises cases
- Update S2871 (no-alphabetical-sort): Cover cases from require-array-sort-compare
- Update S4139 (no-for-in-array): Cover cases from TypeScript ESLint implementation
- Fix FP S131 (switch-without-default): Ignore exhaustive switches on unions and enums