Releases: SonarSource/SonarTS
SonarTS 2.1
The SonarJS analyzer now provides analysis for both JavaScript and TypeScript code.
This release disables TypeScript analysis, so that TypeScript code can now be analyzed by the JavaScript and TypeScript analyzer.
SonarTS 1.9
We are happy to announce SonarTS 1.9
This version includes:
- 9 new rules
- Empty collections should not be accessed or iterated (
no-empty-array
) - Promise rejections should not be caught by 'try' block (
no-try-promise
) - Parameters should be passed in the correct order (
arguments-order
) - Optional boolean parameters should have default value (
bool-param-default
) - "switch" statements should not have too many "case" clauses (
max-switch-cases
) - A compare function should be provided when using "Array.prototype.sort()" (
no-alphabetical-sort
) - "switch" statements should not be nested (
no-nested-switch
) - "catch" clauses should do more than rethrow (
no-useless-catch
) - Type guards should be used (
prefer-type-guard
)
- Empty collections should not be accessed or iterated (
- Some bug fixes to existing rules
You can find the details of this release in this milestone: https://github.com/SonarSource/SonarTS/milestone/15?closed=1
You can provide any feedback, as usual, on GitHub Issues.
SonarTS 1.8
We are happy to announce SonarTS 1.8
This version includes:
- Support of TypeScript 3
- 4 new rules
- Function returns should not be invariant (
no-invariant-return
) - Collapsible "if" statements should be merged (
no-collapsible-if
) - Boolean checks should not be inverted (
no-inverted-boolean-check
) - Optional property declarations should use '?' syntax (
prefer-optional
)
- Function returns should not be invariant (
- Several improvements to existing rules
For SonarQube users the version contains:
- Support analysis even when
tsconfig.json
file is missing - Possibility to specify path to a tsconfig JSON file (see
SonarTS documentation
)
You can find the details of this release in this milestone: https://github.com/SonarSource/SonarTS/milestone/14?closed=1
You can provide any feedback, as usual, on GitHub Issues.
SonarTS 1.7
We are happy to announce SonarTS 1.7
This version includes new rules and ability to import TSLint and ESLint issues reports into SonarQube (example project).
You can find the details of this release in this milestone: https://github.com/SonarSource/SonarTS/milestone/13?closed=1
You can provide any feedback, as usual, on GitHub Issues.
SonarTS 1.6
We are happy to announce SonarTS 1.6
This version includes 9 new rules:
- String literals should not be duplicated (
no-duplicate-string
) - Credentials should not be hard-coded (
no-hardcoded-credentials
) - "switch" statements should have at least 3 "case" clauses (
no-small-switch
) - Boolean literals should not be redundant (
no-redundant-boolean
) - Extra semicolons should be removed (
no-extra-semicolon
) - Increment (++) and decrement (--) operators should not be used in a method call or mixed with other operators in an expression (
no-nested-incdec
) - Functions should not have too many lines of code (
no-big-function
) - Statements should be on separate lines (
no-statements-same-line
) - Functions should not have too many parameters (
parameters-max-number
)
For SonarQube users the version contains even more rules:
- Private properties that are only assigned in the constructor or at declaration should be "readonly"
- Assignments should not be made from within conditions
- Unchanged variables should be marked "const"
- Comma operator should not be used
You can find the details of this release in this milestone: https://github.com/SonarSource/SonarTS/milestone/10?closed=1
You can provide any feedback, as usual, on GitHub Issues.
SonarTS 1.5
This version brings support for TypeScript analysis in SonarLint VS Code extension.
Stay tuned for the SonarLint VS Code extension update, which will follow soon.
This extension provides code linting while you code, including type-checking rules!
Sonar TS 1.4.1
Fix of support for Node 6 (#432)
❗ Release was done only for SonarTS SQ plugin (no new version for SonarTS for TSLint as this bug doesn't affect it)
SonarTS 1.4
We are happy to announce SonarTS 1.4.0 (New Year Edition 🍾 ).
This version includes 4 new rules:
- Sections of code should not be "commented out" (
no-commented-code
) - Wrapper objects should not be used for primitive types (
use-primitive-type
) - Logical OR should not be used in switch cases (
no-case-with-or
) - Local variables should not be declared and then immediately returned or thrown (
prefer-immediate-return
)
For SonarQube users the version contains new features:
- secondary locations for issues
- symbol highlighting
- effort to fix is computed dynamically
You can find the details of this release in this milestone: https://github.com/SonarSource/SonarTS/milestone/9?closed=1
You can provide any feedback, as usual, on GitHub Issues.
SonarTS 1.3.0
See 1.3.0-RC for details
SonarTS 1.3.0 RC
We are starting the feedback period for SonarTS 1.3.0.
This version includes both the Cognitive Complexity metric (#100) and McCabe's Cyclomatic Complexity metric (#99), along with the related rules.
Another rule to help newcomers (#281) to TypeScript, some rules improvements and a bugfix complete this release.
To try this RC with TSLint just npm install --dev tslint-sonarts@1.3.0-0
To try the RC in SonarQube install the attached jar.
The feedback period is open until Tuesday 26th 🎅
You can provide any feedback, as usual, on GitHub Issues.