SonarSource Static Analyzer for JavaScript and TypeScript
react/no-direct-mutation-state
): In React this.state
should not be mutated directly by @alexander-kamushkin-sonarsource in https://github.com/SonarSource/SonarJS/pull/4145
no-unknown-property
): JSX elements should not use unknown properties and attributes by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4146
jsx-no-useless-fragment
): Redundant React fragments should be removed by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4147
react/no-children-prop
): React children
should not be passed as prop by @alexander-kamushkin-sonarsource in https://github.com/SonarSource/SonarJS/pull/4149
no-render-return-value
): The return value of "ReactDOM.render" should not be used by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4148
no-access-state-in-setstate
): "setState" should use a callback when referencing the previous state by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4154
hook-use-state
): The return value of "useState" should be destructured and named symmetrically by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4152
react/no-this-in-sfc
): this
should not be used in functional components by @alexander-kamushkin-sonarsource in https://github.com/SonarSource/SonarJS/pull/4155
prefer-read-only-props
): React props should be read-only by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4157
no-redundant-should-component-update
): "shouldComponentUpdate" should not be defined when extending "React.PureComponent" by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4160
react/no-danger-with-children
): children
and dangerouslySetInnerHTML
should not be used together by @alexander-kamushkin-sonarsource in https://github.com/SonarSource/SonarJS/pull/4163
no-unused-prop-types
): Unused React typed props should be removed by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4165
react/no-unescaped-entities
): JSX special characters should be escaped by @alexander-kamushkin-sonarsource in https://github.com/SonarSource/SonarJS/pull/4166
jsx-pascal-case
): User-defined JSX components should use Pascal case by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4169
react/jsx-child-element-spacing
): Spacing between inline elements should be explicit by @alexander-kamushkin-sonarsource in https://github.com/SonarSource/SonarJS/pull/4171
react/default-props-match-prop-types
): All defaultProps should have non-required PropType by @alexander-kamushkin-sonarsource in https://github.com/SonarSource/SonarJS/pull/4176
prop-types
): React components should validate prop types by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4174
react/no-unescaped-entities
): Remove '
and "
from the list of forbidden entitiles by @alexander-kamushkin-sonarsource in https://github.com/SonarSource/SonarJS/pull/4181
prefer-read-only-props
): Restrict the scope to functional components by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4182
jsx-no-useless-fragment
): Ignore empty React fragments by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4193
This release will be part of SonarQube 10.3
Full Changelog: https://github.com/SonarSource/SonarJS/compare/10.6.0.22520...10.7.0.22914
*.fixture.<ext>
instead of cb.fixture.<ext>
by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4099
assertions-in-tests
): Support Sinon.JS assertion statements by @ilia-kebets-sonarsource in https://github.com/SonarSource/SonarJS/pull/4095
no-redeclare
) for TypeScript by @ilia-kebets-sonarsource in https://github.com/SonarSource/SonarJS/pull/4098
assertions-in-tests
): infinite loop by @ilia-kebets-sonarsource in https://github.com/SonarSource/SonarJS/pull/4119
deprecation
): Report deprecations from TypeScript compiler by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4122
no-invalid-await
): Improve thenable type detection by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4123
Full Changelog: https://github.com/SonarSource/SonarJS/compare/10.5.1.22382...10.6.0.22520
Part of SonarQube 10.3
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
milestone: https://github.com/SonarSource/SonarJS/milestone/76?closed=1
This release will be part of SonarQube 10.2
prefer-object-has-own
): Use Object.hasOwn static method instead of hasOwnProperty by @alexander-kamushkin-sonarsource in https://github.com/SonarSource/SonarJS/pull/4018
no-lonely-if
): If
statements should not be the only statement in else
blocks by @alexander-kamushkin-sonarsource in https://github.com/SonarSource/SonarJS/pull/4022
prefer-object-spread
): Object spread syntax should be used instead of Object.assign
by @alexander-kamushkin-sonarsource in https://github.com/SonarSource/SonarJS/pull/4024
prefer-spread
): Spread syntax should be used instead of apply() by @alexander-kamushkin-sonarsource in https://github.com/SonarSource/SonarJS/pull/4029
prefer-promise-reject-errors
): Literals should not be used for promise rejection by @alexander-kamushkin-sonarsource in https://github.com/SonarSource/SonarJS/pull/4030
no-lone-block
): Nested code blocks should not be used by @alexander-kamushkin-sonarsource in https://github.com/SonarSource/SonarJS/pull/4032
no-useless-call
): Calls to .call() and .apply() methods should not be redundant by @alexander-kamushkin-sonarsource in https://github.com/SonarSource/SonarJS/pull/4033
no-unused-private-class-members
): Unused private class members should be removed by @alexander-kamushkin-sonarsource in https://github.com/SonarSource/SonarJS/pull/4034
code-eval
): merge ESLint no-script-url
by @alexander-kamushkin-sonarsource in https://github.com/SonarSource/SonarJS/pull/4037
no-self-compare
): Number.isNaN()
should be used to check for NaN
value by @alexander-kamushkin-sonarsource in https://github.com/SonarSource/SonarJS/pull/4040
no-duplicate-string
): Add ignoreStrings
rule property by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/3959
Full Changelog: https://github.com/SonarSource/SonarJS/compare/10.3.2.22047...10.4.0.22160
Part of SonarQube 10.2
Bugfix release to fix performance regression on projects with many tsconfig.json
files.
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.
300+ small fixes to rule descriptions where there were small inconsistencies in casing, titles, etc.
https://github.com/SonarSource/SonarJS/milestone/71?closed=1
This will be released in SonarQube 10.1
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