Skip to content

Releases: SonarSource/SonarJS

10.11.1

16 Jan 12:59
b377dc9
Compare
Choose a tag to compare
  • Fix missing requiredForLanguages metadata in manifest

This release will be part of SonarQube 10.4

10.11.0

22 Dec 11:46
a69c26f
Compare
Choose a tag to compare

This release

1/ Fail-fast
Misconfigurations now cause analysis failure, this includes missing or incompatible Node.js runtime.
There are also new and more detailed warnings, including new warnings in the UI.

2/ Added support for TypeScript 5.3

3/ Drop support for Node.js v14

4/ Added 5 new adaptability rules:

  • S6859: Imports should not use absolute paths
  • S6861: Mutable variables should not be exported
  • S2187: Test files should contain at least one test case
  • S1444: Public "static" fields should be read-only
  • S5973: Tests should be stable

What's Changed

Full Changelog: 10.10.0.24774...10.11.0.25043

This release will be part of SonarQube 10.4

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

10.10.0

23 Nov 08:52
8167e5b
Compare
Choose a tag to compare

This release

Added 17 new rules for React Accessibility

  • S6841 tabIndex values should be non-positive
  • S6842 Non-interactive DOM elements should not have interactive ARIA roles
  • S6840 DOM elements should use the autocomplete attribute correctly
  • S6843 Interactive DOM elements should not have non-interactive ARIA roles
  • S6844 Anchor tags should not be used as buttons
  • S6846 DOM elements should not use the accesskey property
  • S6850 Header elements should have accessible content
  • S6851 Images should have a non-redundant alternate description
  • S6847 Non-interactive elements shouldn't have event handlers
  • S6854 iFrames must have a title
  • S6855 Media elements should have captions
  • S6845 Non-interactive DOM elements should not have the tabIndex property
  • S6849 HTML elements should have a valid language property
  • S6848 Non-interactive DOM elements should not have an interactive handler
  • S1077 Image, area, button with image and object elements should have an alternative text
  • S6852 Elements with an interactive role should support focus
  • S6853 Label elements should have a text label and an associated control

Added 5 new rules for React deprecated APIs

  • S6788 Disallow usage of findDOMNode
  • S6789 Disallow usage of isMounted
  • S6790 Disallow using string references
  • S6791 Disallow usage of unsafe lifecycle methods
  • S1874 Disable older React deprecated APIs

What's Changed

This release will be part of SonarQube 10.4

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

10.9.0

01 Nov 12:07
11173bb
Compare
Choose a tag to compare

What's Changed

This release will be part of SonarQube 10.3

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

10.8.0

23 Oct 09:11
9dc9703
Compare
Choose a tag to compare

What's Changed

MMF-2996: First-class React: Accessibility (part 1 of 2)

  • Add rule S1082 (mouse-events-a11y): Mouse events should have corresponding keyboard events (#4301) by @saberduck
  • Modify rule S6747 (no-unknown-property): add jsx-a11y/aria-props by @ilia-kebets-sonarsource
  • Add rule S6793 (jsx-a11y/aria-proptypes): ARIA properties in DOM elements should have valid values (#4265) by @ilia-kebets-sonarsource
  • Add rule S6807 (jsx-a11y/role-has-required-aria-props): DOM elements with ARIA roles should have the required properties by @alexander-kamushkin-sonarsource
  • Add rule S6811 (jsx-a11y/role-supports-aria-props): DOM elements with ARIA role should only have supported properties (#4264) by @alexander-kamushkin-sonarsource
  • Add rule S6819 (jsx-a11y/prefer-tag-over-role): Prefer tag over ARIA role (#4267) by @alexander-kamushkin-sonarsource
  • Add rule S6821 (jsx-a11y/aria-role): DOM elements with ARIA roles should have a valid non-abstract role (#4268) by @ilia-kebets-sonarsource
  • Add rule S6822 (jsx-a11y/no-redundant-roles): No redundant ARIA role (#4270) by @alexander-kamushkin-sonarsource
  • Add rule S6823 (jsx-a11y/aria-activedescendant-has-tabindex): DOM elements with the aria-activedescendant property should be accessible via the tab key (#4277) by @ilia-kebets-sonarsource
  • Add rule S6824 (jsx-a11y/aria-unsupported-elements): No ARIA role or property for unsupported DOM elements (#4275) by @ilia-kebets-sonarsource
  • Add rule S6825 (jsx-a11y/no-aria-hidden-on-focusable): Focusable elements should not have aria-hidden attribute (#4292) by @alexander-kamushkin-sonarsource
  • Add rule S6827 (jsx-a11y/anchor-has-content): Anchors should contain accessible content (#4296) by @ilia-kebets-sonarsource

MMF-3393: Better diagnostics of memory issues

Miscellaneous

This release will be part of SonarQube 10.3

Full Changelog: 10.7.0.22914...10.8.0.24207

10.7.0

28 Sep 09:27
31754d5
Compare
Choose a tag to compare

What's Changed

  • Add rule S6746 (react/no-direct-mutation-state): In React this.state should not be mutated directly by @alexander-kamushkin-sonarsource in #4145
  • Add rule S6747 (no-unknown-property): JSX elements should not use unknown properties and attributes by @yassin-kammoun-sonarsource in #4146
  • Add rule S6749 (jsx-no-useless-fragment): Redundant React fragments should be removed by @yassin-kammoun-sonarsource in #4147
  • Create rule S6748 (react/no-children-prop): React children should not be passed as prop by @alexander-kamushkin-sonarsource in #4149
  • Add rule S6750 (no-render-return-value): The return value of "ReactDOM.render" should not be used by @yassin-kammoun-sonarsource in #4148
  • Add rule S6756 (no-access-state-in-setstate): "setState" should use a callback when referencing the previous state by @yassin-kammoun-sonarsource in #4154
  • Add rule S6754 (hook-use-state): The return value of "useState" should be destructured and named symmetrically by @yassin-kammoun-sonarsource in #4152
  • Create rule S6757 (react/no-this-in-sfc​​): this should not be used in functional components by @alexander-kamushkin-sonarsource in #4155
  • Add rule S6759 (prefer-read-only-props): React props should be read-only by @yassin-kammoun-sonarsource in #4157
  • Add rule S6763 (no-redundant-should-component-update): "shouldComponentUpdate" should not be defined when extending "React.PureComponent" by @yassin-kammoun-sonarsource in #4160
  • Add rule S6761 (react/no-danger-with-children​): children and dangerouslySetInnerHTML should not be used together by @alexander-kamushkin-sonarsource in #4163
  • Add rule S6767 (no-unused-prop-types): Unused React typed props should be removed by @yassin-kammoun-sonarsource in #4165
  • Add rule S6766 (react/no-unescaped-entities​): JSX special characters should be escaped by @alexander-kamushkin-sonarsource in #4166
  • Add rule S6770 (jsx-pascal-case): User-defined JSX components should use Pascal case by @yassin-kammoun-sonarsource in #4169
  • Add rule S6772 (react/jsx-child-element-spacing​): Spacing between inline elements should be explicit by @alexander-kamushkin-sonarsource in #4171
  • Add rule S6775 (react/default-props-match-prop-types​): All defaultProps should have non-required PropType by @alexander-kamushkin-sonarsource in #4176
  • Add rule S6774 (prop-types): React components should validate prop types by @yassin-kammoun-sonarsource in #4174
  • Fix FP S6766 (react/no-unescaped-entities​): Remove ' and " from the list of forbidden entitiles by @alexander-kamushkin-sonarsource in #4181
  • Fix FP S6759 (prefer-read-only-props): Restrict the scope to functional components by @yassin-kammoun-sonarsource in #4182
  • Fix windows build issues by @alexander-kamushkin-sonarsource in #4189
  • [MMF-2861] Embed Node.js runtime in analyzer by @saberduck in #4150
  • Fix FP S6749 (jsx-no-useless-fragment): Ignore empty React fragments by @yassin-kammoun-sonarsource in #4193
  • Bundled Node.js runtime: add MacOS x64 support by @ilia-kebets-sonarsource in #4194

New Contributors

This release will be part of SonarQube 10.3

Full Changelog: 10.6.0.22520...10.7.0.22914

10.6.0

01 Sep 13:29
c164782
Compare
Choose a tag to compare

What's Changed

Full Changelog: 10.5.1.22382...10.6.0.22520

Part of SonarQube 10.3

10.5.1

23 Aug 15:18
aee0b6e
Compare
Choose a tag to compare

Small fix release, because we forgot to include the eslint-plugin-sonarjs update in 10.5.0

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

This release will be part of SonarQube 10.2

10.5.0

23 Aug 13:28
9b387ed
Compare
Choose a tag to compare

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

This release will be part of SonarQube 10.2

10.4.0

04 Aug 14:56
29853cc
Compare
Choose a tag to compare

What's Changed

  • Prepare next development iteration by @saberduck in #4023
  • Add rule S6653 (prefer-object-has-own): Use Object.hasOwn static method instead of hasOwnProperty by @alexander-kamushkin-sonarsource in #4018
  • Add rule S6660 (no-lonely-if): If statements should not be the only statement in else blocks by @alexander-kamushkin-sonarsource in #4022
  • Upgrade sonar-lits-plugin to 0.11.0.2659 by @Godin in #4017
  • Add rule S6661 (prefer-object-spread): Object spread syntax should be used instead of Object.assign by @alexander-kamushkin-sonarsource in #4024
  • Update ruling results formatting due to sonar-lits-plugin change by @alexander-kamushkin-sonarsource in #4026
  • Add rule S6666 (prefer-spread): Spread syntax should be used instead of apply() by @alexander-kamushkin-sonarsource in #4029
  • Add rule S6671 (prefer-promise-reject-errors): Literals should not be used for promise rejection by @alexander-kamushkin-sonarsource in #4030
  • Add rule S1199 (no-lone-block): Nested code blocks should not be used by @alexander-kamushkin-sonarsource in #4032
  • Add rule S6676 (no-useless-call): Calls to .call() and .apply() methods should not be redundant by @alexander-kamushkin-sonarsource in #4033
  • Add rule S1068 (no-unused-private-class-members): Unused private class members should be removed by @alexander-kamushkin-sonarsource in #4034
  • Update "submit review" and "request review" actions to work for projectsV2 by @ilia-kebets-sonarsource in #4012
  • Update S1523 (code-eval): merge ESLint no-script-url by @alexander-kamushkin-sonarsource in #4037
  • Add rule S6679 (no-self-compare): Number.isNaN() should be used to check for NaN value by @alexander-kamushkin-sonarsource in #4040
  • Update rule descriptions after migration to LAYC by @victor-diez-sonarsource in #4041
  • Actions point to production branch by @ilia-kebets-sonarsource in #4039
  • Update S1192 (no-duplicate-string): Add ignoreStrings rule property by @yassin-kammoun-sonarsource in #3959
  • Update rule metadata by @yassin-kammoun-sonarsource in #4044

Full Changelog: 10.3.2.22047...10.4.0.22160

Part of SonarQube 10.2