SonarSource Static Analyzer for JavaScript and TypeScript
no-table-as-layout
) by @vdiez in https://github.com/SonarSource/SonarJS/pull/4661
object-alt-content
) by @vdiez in https://github.com/SonarSource/SonarJS/pull/4665
Full Changelog: https://github.com/SonarSource/SonarJS/compare/10.13.2.25981...10.14.0.26080
This release will be part of SonarQube 10.6
milestone: https://github.com/SonarSource/SonarJS/milestone/89?closed=1
Full Changelog: https://github.com/SonarSource/SonarJS/compare/10.13.0.25911...10.13.1.25965
maxWorkers
to 8 (#cores-2) by @saberduck in https://github.com/SonarSource/SonarJS/pull/4583
commons-compress
version to 1.26 by @ericmorand-sonarsource in https://github.com/SonarSource/SonarJS/pull/4588
Failed to parse file ...
from error
to warn
by @ericmorand-sonarsource in https://github.com/SonarSource/SonarJS/pull/4602
package.json
after dropping Node.JS 16 support by @saberduck in https://github.com/SonarSource/SonarJS/pull/4607
sonar.nodejs.executable
is set by @ilia-kebets-sonarsource in https://github.com/SonarSource/SonarJS/pull/4616
Tests should include assertions
): global expect()
aren't detected by @ericmorand-sonarsource in https://github.com/SonarSource/SonarJS/pull/4628
eslint-plugin-react/no-deprecated
) extracted from S1874 (deprecation
) by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4619
hook-use-state
): Ignore state variables without a setter by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4637
assertions-in-tests
): Add support for supertest
by @ericmorand-sonarsource in https://github.com/SonarSource/SonarJS/pull/4636
Full Changelog: https://github.com/SonarSource/SonarJS/compare/10.12.0.25537...10.13.0.25911
This release will be part of SonarQube 10.5
Milestone: https://github.com/SonarSource/SonarJS/milestone/86
Improve Top Dismissed JS/TS Rules (https://sonarsource.atlassian.net/browse/MMF-2934)
no-invalid-await
): Improve documentation about edge cases and add test to confirm that S4123 honours JSDoc directives by @ericmorand-sonarsource in https://github.com/SonarSource/SonarJS/pull/4538
sonar-prefer-regexp-exec
): Ignore match count use case by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4540
no-alphabetical-sort
): Rework the rule to emit a dedicated message for arrays of strings by @ericmorand-sonarsource in https://github.com/SonarSource/SonarJS/pull/4539
use-type-alias
): Ignore nullable types by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4543
no-invalid-await
): Ignore function calls for functions whose definition have JSdoc with a returns
tag by @ilia-kebets-sonarsource in https://github.com/SonarSource/SonarJS/pull/4544
function-return-type
): Exception for sanitation functions by @ericmorand-sonarsource in https://github.com/SonarSource/SonarJS/pull/4548
constructor-for-side-effects
): Make exception for AWS CDK resources by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4554
prefer-object-spread
): Disable for projects that don't support the object spread syntax and improve rule description by @ilia-kebets-sonarsource in https://github.com/SonarSource/SonarJS/pull/4552
no-array-index-key
) - Allow keys combining index and other values by @ericmorand-sonarsource in https://github.com/SonarSource/SonarJS/pull/4556
no-useless-constructor
): Ignore decorated classes and classes inheriting protected constructors by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4546
no-empty-function
): Ignore noop-like functions, arrows, and constructors by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4557
prefer-optional-chain
): Update description and severity by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4562
no-misused-promises
) - Set checkVoidReturn.arguments=false by @ericmorand-sonarsource in https://github.com/SonarSource/SonarJS/pull/4561
cognitive-complexity
): Ignore nested functions and default values by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4566
no-nested-functions
): Increase default threshold to four nested functions by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4570
prefer-nullish-coalescing
): When the first argument s boolean | undefined by @ericmorand-sonarsource in https://github.com/SonarSource/SonarJS/pull/4565
Full Changelog: https://github.com/SonarSource/SonarJS/compare/10.11.1.25225...10.12.0.25537
This release will be part of SonarQube 10.5
https://github.com/SonarSource/SonarJS/milestone/84?closed=1
requiredForLanguages
metadata in manifestThis release will be part of SonarQube 10.4
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:
eslint-plugin-import/no-absolute-path
): Imports should not use absolute paths by @ilia-kebets-sonarsource in https://github.com/SonarSource/SonarJS/pull/4439
eslint-plugin-import/no-mutable-exports
): Mutable variables should not be exported by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4441
package.json
dependencies by @ilia-kebets-sonarsource in https://github.com/SonarSource/SonarJS/pull/4454
Full Changelog: https://github.com/SonarSource/SonarJS/compare/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
Added 17 new rules for React Accessibility
Added 5 new rules for React deprecated APIs
LGPL-3.0-only
by @ilia-kebets-sonarsource in https://github.com/SonarSource/SonarJS/pull/4354
react/no-find-dom-node
) by @vdiez in https://github.com/SonarSource/SonarJS/pull/4359
react/no-is-mounted
) by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4361
react/no-unsafe
) by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4362
jsx-a11y/tabindex-no-positive
): tabIndex
values should be non-positive by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4365
jsx-a11y/no-noninteractive-element-to-interactive-role
): Non-interactive DOM elements should not have interactive ARIA roles by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4366
jsx-a11y/autocomplete-valid
): DOM elements should use the autocomplete
attribute correctly by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4364
jsx-a11y/no-interactive-element-to-noninteractive -role
): Interactive DOM elements should not have non-interactive ARIA roles by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4369
package.json
on init-linter by @vdiez in https://github.com/SonarSource/SonarJS/pull/4363
jsx-a11y/anchor-is-valid
): Anchor tags should not be used as buttons by @saberduck in https://github.com/SonarSource/SonarJS/pull/4373
jsx-a11y/no-noninteractive-tabindex
): Non-interactive DOM elements should not have the tabIndex
property by @ilia-kebets-sonarsource in https://github.com/SonarSource/SonarJS/pull/4374
jsx-a11y/no-access-key
): DOM elements should not use the accesskey
property by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4372
package.json
shared methods by @vdiez in https://github.com/SonarSource/SonarJS/pull/4377
jsx-a11y/html-has-lang
) and (jsx-a11y/lang
): HTML elements should have a valid language property by @ilia-kebets-sonarsource in https://github.com/SonarSource/SonarJS/pull/4387
jsx-a11y/no-static-element-interactions
): Non-interactive DOM elements should not have an interactive handler by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4385
mergeRules()
example to DEV.md by @ilia-kebets-sonarsource in https://github.com/SonarSource/SonarJS/pull/4389
react/no-deprecated
by @vdiez in https://github.com/SonarSource/SonarJS/pull/4371
jsx-a11y/heading-has-content
): Header elements should have accessible content by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4390
jsx-a11y/alt-text
): Image, area, button with image and object elements should have an alternative text by @ilia-kebets-sonarsource in https://github.com/SonarSource/SonarJS/pull/4391
deprecation
): Remove references from React no-deprecated
messages by @vdiez in https://github.com/SonarSource/SonarJS/pull/4392
jsx-a11y/img-redundant-alt
): Images should have a non-redundant alternate description by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4394
html-has-lang
): raise issue on html
tag name instead of whole <html ...>
tag if the lang
attribute is missing by @ilia-kebets-sonarsource in https://github.com/SonarSource/SonarJS/pull/4395
jsx-a11y/no-noninteractive-element-interactions
): Non-interactive elements shouldn't have event handlers by @saberduck in https://github.com/SonarSource/SonarJS/pull/4388
jsx-a11y/interactive-supports-focus
): Elements with an interactive role should support focus by @saberduck in https://github.com/SonarSource/SonarJS/pull/4397
jsx-a11y/iframe-has-title
): iFrames must have a title by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4399
jsx-a11y/media-has-caption
): Media elements should have captions by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4404
jsx-a11y/label-has-associated-control
): Label elements should have a text label and an associated control by @ilia-kebets-sonarsource in https://github.com/SonarSource/SonarJS/pull/4396
alt-text
): Report on the name of the opening element by @ilia-kebets-sonarsource in https://github.com/SonarSource/SonarJS/pull/4407
label-has-associated-control
): Report on the name of the opening element by @ilia-kebets-sonarsource in https://github.com/SonarSource/SonarJS/pull/4408
media-has-caption
): Report on the name of the opening element by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4406
This release will be part of SonarQube 10.4
https://github.com/SonarSource/SonarJS/milestone/82?closed=1
no-misused-promises
): Report on the function's main token by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4313
function-return-type
): Make the exception of returning at least one this
instead of all this
by @ilia-kebets-sonarsource in https://github.com/SonarSource/SonarJS/pull/4320
sonar-max-lines-per-function
): Ignore React Functional Components implemented as arrow function by @ilia-kebets-sonarsource in https://github.com/SonarSource/SonarJS/pull/4318
at-rule-no-unknown
): Ignore "@contain" by default by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4319
no-unstable-nested-components
): Replace message and refine location by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4323
no-empty-interface
): Ignore when extending external interfaces by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4326
sonar-no-magic-numbers
by @saberduck in https://github.com/SonarSource/SonarJS/pull/4324
prefer-namespace-keyword
): Report on the "module" keyword by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4329
duplicates-in-character-class
): Mention character class escapes by @yassin-kammoun-sonarsource in https://github.com/SonarSource/SonarJS/pull/4331
assertions-in-tests
): add support for vitest
library by @ilia-kebets-sonarsource in https://github.com/SonarSource/SonarJS/pull/4335
This release will be part of SonarQube 10.3
Milestone: https://github.com/SonarSource/SonarJS/milestone/81?closed=1
mouse-events-a11y
): Mouse events should have corresponding keyboard events (#4301) by @saberduckno-unknown-property
): add jsx-a11y/aria-props
by @ilia-kebets-sonarsourcejsx-a11y/aria-proptypes
): ARIA properties in DOM elements should have valid values (#4265) by @ilia-kebets-sonarsourcejsx-a11y/role-supports-aria-props
): DOM elements with ARIA role should only have supported properties (#4264) by @alexander-kamushkin-sonarsourcejsx-a11y/prefer-tag-over-role
): Prefer tag over ARIA role (#4267) by @alexander-kamushkin-sonarsourcejsx-a11y/aria-role
): DOM elements with ARIA roles should have a valid non-abstract role (#4268) by @ilia-kebets-sonarsourcejsx-a11y/no-redundant-roles
): No redundant ARIA role (#4270) by @alexander-kamushkin-sonarsourcejsx-a11y/aria-activedescendant-has-tabindex
): DOM elements with the aria-activedescendant
property should be accessible via the tab key (#4277) by @ilia-kebets-sonarsourcejsx-a11y/aria-unsupported-elements
): No ARIA role or property for unsupported DOM elements (#4275) by @ilia-kebets-sonarsourcejsx-a11y/no-aria-hidden-on-focusable
): Focusable elements should not have aria-hidden
attribute (#4292) by @alexander-kamushkin-sonarsourcejsx-a11y/anchor-has-content
): Anchors should contain accessible content (#4296) by @ilia-kebets-sonarsourceThis release will be part of SonarQube 10.3
Full Changelog: https://github.com/SonarSource/SonarJS/compare/10.7.0.22914...10.8.0.24207