# \#javascript

**URL:** https://community.sonarsource.com/tag/javascript/8.md

[Latest](https://community.sonarsource.com/latest.md) · [Categories](https://community.sonarsource.com/categories.md) · [Tags](https://community.sonarsource.com/tags.md)

---

## [JavaScript/TypeScript analysis does not complete in Bitbucket Pipeline](https://community.sonarsource.com/t/javascript-typescript-analysis-does-not-complete-in-bitbucket-pipeline/186802)

<div class="topic-metadata">

**Author:** [@kundan](https://community.sonarsource.com/u/kundan)\
**Replies:** 13\
**Last updated:** [October 16, 2026, 8:42am UTC](https://community.sonarsource.com/t/javascript-typescript-analysis-does-not-complete-in-bitbucket-pipeline/186802 "2026-10-16T08:42:20Z")

</div>

Hello SonarSource Community, We are experiencing an issue while running SonarQube Cloud analysis through Bitbucket Pipelines. Our SonarQube configuration is: -Dsonar.organization=wellnessconnection-1 -Dsonar.projectKe…

---

## [JsSecuritySensorV2 \[jasmin\] still stalls on React/Express entry points on SonarQube Server 2026.5.1](https://community.sonarsource.com/t/jssecuritysensorv2-jasmin-still-stalls-on-react-express-entry-points-on-sonarqube-server-2026-5-1/189862)

<div class="topic-metadata">

**Author:** [@dnelre](https://community.sonarsource.com/u/dnelre)\
**Replies:** 0\
**Last updated:** [October 15, 2026, 7:11am UTC](https://community.sonarsource.com/t/jssecuritysensorv2-jasmin-still-stalls-on-react-express-entry-points-on-sonarqube-server-2026-5-1/189862 "2026-10-15T07:11:34Z")

</div>

Hi, Following up on JavaScript/TypeScript analysis does not complete in Bitbucket Pipeline. I was told the fix should already be included in the release we are running, so I’m opening a new topic as requested. Must-sha…

---

## [\`typescript:S2699\` raises false positives on \`supertest\` (with reproducer)](https://community.sonarsource.com/t/typescript-s2699-raises-false-positives-on-supertest-with-reproducer/189102)

<div class="topic-metadata">

**Author:** [@JB.L](https://community.sonarsource.com/u/JB.L)\
**Replies:** 2\
**Last updated:** [October 6, 2026, 7:44am UTC](https://community.sonarsource.com/t/typescript-s2699-raises-false-positives-on-supertest-with-reproducer/189102 "2026-10-06T07:44:53Z")

</div>

Hello friends at Sonar :waving\_hand: I came across a lot of FP with typescript:S2699 on tests that rely on the supertest library. What language is this for? TypeScript (probably also JavaScript) Which rule? typesc…

---

## [Vue SFC: defineModel() compiler macro flagged as undeclared variable (S3827)](https://community.sonarsource.com/t/vue-sfc-definemodel-compiler-macro-flagged-as-undeclared-variable-s3827/188232)

<div class="topic-metadata">

**Author:** [@Paulo\_Pontes](https://community.sonarsource.com/u/Paulo_Pontes)\
**Replies:** 1\
**Last updated:** [September 30, 2026, 9:52pm UTC](https://community.sonarsource.com/t/vue-sfc-definemodel-compiler-macro-flagged-as-undeclared-variable-s3827/188232 "2026-09-30T21:52:54Z")

</div>

What language is this for? JavaScript — Vue.js Single File Component (\<script setup\>) Which rule? javascript:S3827 (“undeclared variable”) Why do you believe it’s a false-positive/false-negative? defineModel() is a …

---

## [Slow analysis due to JsSecuritySensorV2 \[jasmin\]](https://community.sonarsource.com/t/slow-analysis-due-to-jssecuritysensorv2-jasmin/186907)

<div class="topic-metadata">

**Author:** [@Mike\_H](https://community.sonarsource.com/u/Mike_H)\
**Replies:** 3\
**Last updated:** [August 31, 2026, 8:37am UTC](https://community.sonarsource.com/t/slow-analysis-due-to-jssecuritysensorv2-jasmin/186907 "2026-08-31T08:37:33Z")

</div>

Scanner command used: sonar-scanner-npm via Jekins pipeline script Language: pure JS (no TS) Project LOC: ~12k Scanner gets stuck for 10 minutes on one file, (apparently src/index.js): \[2026-07-31T11:22:57.420Z\] \[DEBU…

---

## [Eslint-plugin-sonarjs: S125 (no-commented-code) never reports under parserOptions.projectService](https://community.sonarsource.com/t/eslint-plugin-sonarjs-s125-no-commented-code-never-reports-under-parseroptions-projectservice/186866)

<div class="topic-metadata">

**Author:** [@stevensacks](https://community.sonarsource.com/u/stevensacks)\
**Replies:** 2\
**Last updated:** [August 7, 2026, 3:44pm UTC](https://community.sonarsource.com/t/eslint-plugin-sonarjs-s125-no-commented-code-never-reports-under-parseroptions-projectservice/186866 "2026-08-07T15:44:03Z")

</div>

What language is this for? TypeScript (the same applies to JavaScript). Which rule? S125 — sonarjs/no-commented-code, “sections of code should not be commented out”. Why do you believe it’s a false-negative? sonarjs…

---

## [SonarQube for Eclipse 12.6 - Performance improvement, analyzers updates and LTA support update](https://community.sonarsource.com/t/sonarqube-for-eclipse-12-6-performance-improvement-analyzers-updates-and-lta-support-update/186295)

<div class="topic-metadata">

**Author:** [@Farah](https://community.sonarsource.com/u/Farah)\
**Replies:** 0\
**Last updated:** [July 20, 2026, 8:06pm UTC](https://community.sonarsource.com/t/sonarqube-for-eclipse-12-6-performance-improvement-analyzers-updates-and-lta-support-update/186295 "2026-07-20T20:06:03Z")

</div>

Hello Eclipse community, The SonarQube for IDE: Eclipse version 12.6 is now available! For those of you that are in connected mode with SonarQube Server, we would like to inform you that support for LTA version SQS 9.9…

---

## [SonarQube for VS Code 5.6 - Analyzers update and end of support for SQS 9.9 LTA](https://community.sonarsource.com/t/sonarqube-for-vs-code-5-6-analyzers-update-and-end-of-support-for-sqs-9-9-lta/186294)

<div class="topic-metadata">

**Author:** [@Farah](https://community.sonarsource.com/u/Farah)\
**Replies:** 0\
**Last updated:** [July 20, 2026, 7:59pm UTC](https://community.sonarsource.com/t/sonarqube-for-vs-code-5-6-analyzers-update-and-end-of-support-for-sqs-9-9-lta/186294 "2026-07-20T19:59:23Z")

</div>

Hello VSCode community, The SonarQube for IDE: Visual Studio version 5.6 is now available! For those of you that are in connected mode with SonarQube Server, we would like to inform you that support for LTA version SQS…

---

## [@sonar/scan 5.0 requires Node.js 22.12+ and moves to ES modules](https://community.sonarsource.com/t/sonar-scan-5-0-requires-node-js-22-12-and-moves-to-es-modules/185876)

<div class="topic-metadata">

**Author:** [@michal.zgliczynski](https://community.sonarsource.com/u/michal.zgliczynski)\
**Replies:** 1\
**Last updated:** [July 20, 2026, 12:03pm UTC](https://community.sonarsource.com/t/sonar-scan-5-0-requires-node-js-22-12-and-moves-to-es-modules/185876 "2026-07-20T12:03:45Z")

</div>

Hey folks, The upcoming @sonar/scan 5.0 release introduces two breaking changes. First, @sonar/scan will require Node.js 22.12.0 or later. Version 5 will no longer run in environments using an older Node.js version. I…

---

## [New Testing Rules for JS/TS](https://community.sonarsource.com/t/new-testing-rules-for-js-ts/186247)

<div class="topic-metadata">

**Author:** [@jean.jimbo](https://community.sonarsource.com/u/jean.jimbo)\
**Replies:** 0\
**Last updated:** [July 20, 2026, 8:28am UTC](https://community.sonarsource.com/t/new-testing-rules-for-js-ts/186247 "2026-07-20T08:28:08Z")

</div>

We’ve added eight new JavaScript and TypeScript rules to help teams write more reliable, maintainable tests and modernize utility-library usage. New rules: S8907: Replace Lodash/underscore.js methods with native APIs …

---

## [New JavaScript + TypeScript rules targeting Vue and testing frameworks](https://community.sonarsource.com/t/new-javascript-typescript-rules-targeting-vue-and-testing-frameworks/186080)

<div class="topic-metadata">

**Author:** [@adam.wilson](https://community.sonarsource.com/u/adam.wilson)\
**Replies:** 0\
**Last updated:** [July 17, 2026, 10:31am UTC](https://community.sonarsource.com/t/new-javascript-typescript-rules-targeting-vue-and-testing-frameworks/186080 "2026-07-17T10:31:43Z")

</div>

Hi JavaScript + TypeScript developers, The JavaScript and TypeScript analyzer adds sonar-resolve support and detection of generated code. New rules also target testing frameworks and four rules import Vue checks. New r…

---

## [Adjustments to the "Sonar way" quality profile](https://community.sonarsource.com/t/adjustments-to-the-sonar-way-quality-profile/184062)

<div class="topic-metadata">

**Author:** [@Geoffray](https://community.sonarsource.com/u/Geoffray)\
**Replies:** 1\
**Last updated:** [July 3, 2026, 2:35pm UTC](https://community.sonarsource.com/t/adjustments-to-the-sonar-way-quality-profile/184062 "2026-07-03T14:35:16Z")

</div>

Hi everyone, We removed a few rules from our “Sonar way” quality profiles to ensure they remain an optimal default in our products: Java:S1104: Class variable fields should not have public accessibility Java:S1149: Sy…

---

## [Unresolvable javascript:S7766 when using Date arguments](https://community.sonarsource.com/t/unresolvable-javascript-s7766-when-using-date-arguments/183561)

<div class="topic-metadata">

**Author:** [@obones](https://community.sonarsource.com/u/obones)\
**Replies:** 1\
**Last updated:** [June 18, 2026, 9:36am UTC](https://community.sonarsource.com/t/unresolvable-javascript-s7766-when-using-date-arguments/183561 "2026-06-18T09:36:24Z")

</div>

Hello, I have a problem with the following javascript code: /\*\* \* Get the most recent date from the given array. \* \* @param { Date\[\] } dates \* @returns { Date } \*/ function getMostRecentDate(dates) { return dat…

---

## [False positive in S4782](https://community.sonarsource.com/t/false-positive-in-s4782/182361)

<div class="topic-metadata">

**Author:** [@unblocker](https://community.sonarsource.com/u/unblocker)\
**Replies:** 7\
**Last updated:** [June 11, 2026, 6:56am UTC](https://community.sonarsource.com/t/false-positive-in-s4782/182361 "2026-06-11T06:56:43Z")

</div>

I’m also seeing this, using SonarQube for VSCode. The parameter type is Omit\<MyComplexObjectType, 'specificAttribute'\> & { specificAttribute?: undefined } which means “the same as MyComplexObjectType, but if the specific…

---

## [Updated: Open-Source JS/TS Client for the Sonar API](https://community.sonarsource.com/t/updated-open-source-js-ts-client-for-the-sonar-api/183021)

<div class="topic-metadata">

**Author:** [@titan](https://community.sonarsource.com/u/titan)\
**Replies:** 0\
**Last updated:** [May 31, 2026, 3:05pm UTC](https://community.sonarsource.com/t/updated-open-source-js-ts-client-for-the-sonar-api/183021 "2026-05-31T15:05:33Z")

</div>

Hey Sonar Community! If anyone is building custom automation, reporting tools, or dashboards using Node.js or TypeScript, I wanted to share an update to my Web API wrapper: sonarqube-api-client. The library has been ar…

---

## [Npm audit results in SonarCloud](https://community.sonarsource.com/t/npm-audit-results-in-sonarcloud/27341)

<div class="topic-metadata">

**Author:** [@Jordan\_Duggan](https://community.sonarsource.com/u/Jordan_Duggan)\
**Replies:** 6\
**Last updated:** [May 26, 2026, 4:11am UTC](https://community.sonarsource.com/t/npm-audit-results-in-sonarcloud/27341 "2026-05-26T04:11:45Z")

</div>

Template for a good new topic, formatted with Markdown: Bitbucket Cloud AWS Codepipline for CI Language: Javascript React/Node We’ve connected a React/Node project to SonarCloud. I’d like to import the results from n…

---

## [Sonarjasmine takes almost 30 minutes to scan 273 files in GitHub actions](https://community.sonarsource.com/t/sonarjasmine-takes-almost-30-minutes-to-scan-273-files-in-github-actions/147501)

<div class="topic-metadata">

**Author:** [@OZoneGuy](https://community.sonarsource.com/u/OZoneGuy)\
**Replies:** 5\
**Last updated:** [May 4, 2026, 9:51am UTC](https://community.sonarsource.com/t/sonarjasmine-takes-almost-30-minutes-to-scan-273-files-in-github-actions/147501 "2026-05-04T09:51:02Z")

</div>

As the title describes. We are hosting our code on GitHub and and are using GitHub actions. Previously, it used to take less than 10 minutes to complete the step. I know there is a similar thread here, but I was not …

---

## [Svelte language coverage support help/request](https://community.sonarsource.com/t/svelte-language-coverage-support-help-request/181627)

<div class="topic-metadata">

**Author:** [@cflex](https://community.sonarsource.com/u/cflex)\
**Replies:** 1\
**Last updated:** [April 23, 2026, 10:39am UTC](https://community.sonarsource.com/t/svelte-language-coverage-support-help-request/181627 "2026-04-23T10:39:20Z")

</div>

Hello, I am looking for some help on how to get test coverage for my .svelte files. I have tried using the generic test coverage format with this library however still no luck. Is there any movement on possible support…

---

## [Expected sourceFile.imports\[0\] to be the synthesized JSX runtime import (sonarjs/S1874)](https://community.sonarsource.com/t/expected-sourcefile-imports-0-to-be-the-synthesized-jsx-runtime-import-sonarjs-s1874/180225)

<div class="topic-metadata">

**Author:** [@riddleit](https://community.sonarsource.com/u/riddleit)\
**Replies:** 3\
**Last updated:** [March 25, 2026, 5:02pm UTC](https://community.sonarsource.com/t/expected-sourcefile-imports-0-to-be-the-synthesized-jsx-runtime-import-sonarjs-s1874/180225 "2026-03-25T17:02:14Z")

</div>

I’m running a code analysis with npm sonar-scanner command in a bitbucket pipeline script over a react typescript monorepo that is using the automatic JSX runtime (jsx: "react-jsx") Since a couple of days I started havi…

---

## [javascript:S4030 no-unused-collection crashes on Svelte use: directive](https://community.sonarsource.com/t/javascript-s4030-no-unused-collection-crashes-on-svelte-use-directive/179385)

<div class="topic-metadata">

**Author:** [@valerio27](https://community.sonarsource.com/u/valerio27)\
**Replies:** 3\
**Last updated:** [March 13, 2026, 9:35pm UTC](https://community.sonarsource.com/t/javascript-s4030-no-unused-collection-crashes-on-svelte-use-directive/179385 "2026-03-13T21:35:11Z")

</div>

Language: JavaScript / TypeScript (Svelte) Rule: S4030 (sonarjs/no-unused-collection) Product: eslint-plugin-sonarjs 4.0.2 (standalone ESLint plugin, not via SonarQube/Cloud/IDE) Description More of a crash than a fal…

---

## [Code Coverage Merge Discrepancy Between Unit and Integration Tests](https://community.sonarsource.com/t/code-coverage-merge-discrepancy-between-unit-and-integration-tests/144946)

<div class="topic-metadata">

**Author:** [@Sheikh\_Khurram](https://community.sonarsource.com/u/Sheikh_Khurram)\
**Replies:** 12\
**Last updated:** [March 13, 2026, 5:41pm UTC](https://community.sonarsource.com/t/code-coverage-merge-discrepancy-between-unit-and-integration-tests/144946 "2026-03-13T17:41:35Z")

</div>

Code Coverage Merge Discrepancy Between Unit and Integration Tests Must-share information: SonarQube Version: Developer Edition 10.3 Deployment: Helm Project Setup: Repository: React with TypeScript Unit tests: Vitest I…

---

## [typescript:S7778 incorrectly reporting on methods that don't accept multiple arguments](https://community.sonarsource.com/t/typescript-s7778-incorrectly-reporting-on-methods-that-dont-accept-multiple-arguments/179057)

<div class="topic-metadata">

**Author:** [@d-ellis](https://community.sonarsource.com/u/d-ellis)\
**Replies:** 1\
**Last updated:** [March 9, 2026, 9:40am UTC](https://community.sonarsource.com/t/typescript-s7778-incorrectly-reporting-on-methods-that-dont-accept-multiple-arguments/179057 "2026-03-09T09:40:42Z")

</div>

What language is this for? JavaScript/TypeScript Which rule? Multiple consecutive calls to methods that accept multiple arguments should be combined (typescript:S7778) Why do you believe it’s a false-positive/f…

---

## [S2004 (\`sonarjs/no-nested-functions\`) triggers in describe()/it() test files](https://community.sonarsource.com/t/s2004-sonarjs-no-nested-functions-triggers-in-describe-it-test-files/131292)

<div class="topic-metadata">

**Author:** [@DamienCassou](https://community.sonarsource.com/u/DamienCassou)\
**Replies:** 6\
**Last updated:** [February 9, 2026, 2:42pm UTC](https://community.sonarsource.com/t/s2004-sonarjs-no-nested-functions-triggers-in-describe-it-test-files/131292 "2026-02-09T14:42:46Z")

</div>

The sonarjs/no-nested-functions of eslint-plugin-sonarjs 2.0.4 complains about code like: import { describe, expect, it } from "vitest"; describe("Foo", () =\> { describe("visiting", () =\> { describe("accept()", (…

---

## [10-40% faster JavaScript and TypeScript analysis](https://community.sonarsource.com/t/10-40-faster-javascript-and-typescript-analysis/177178)

<div class="topic-metadata">

**Author:** [@gab](https://community.sonarsource.com/u/gab)\
**Replies:** 0\
**Last updated:** [February 3, 2026, 3:57pm UTC](https://community.sonarsource.com/t/10-40-faster-javascript-and-typescript-analysis/177178 "2026-02-03T15:57:29Z")

</div>

Hello community, Speed is a crucial aspect of the analysis experience for developers, and Sonar has consistently invested in this area. We are excited to share significant advancements in the speed of JavaScript and Ty…

---

## [FP: S6819 - The ARIA "img" role should be allowed on SVG images](https://community.sonarsource.com/t/fp-s6819-the-aria-img-role-should-be-allowed-on-svg-images/115306)

<div class="topic-metadata">

**Author:** [@dougw](https://community.sonarsource.com/u/dougw)\
**Replies:** 8\
**Last updated:** [February 3, 2026, 8:26am UTC](https://community.sonarsource.com/t/fp-s6819-the-aria-img-role-should-be-allowed-on-svg-images/115306 "2026-02-03T08:26:46Z")

</div>

What language is this for? HTML & JS/TS Which rule? S6819 Why do you believe it’s a false-positive/false-negative? Quoting from ARIA: img role - Accessibility | MDN: If you are using embedded SVG images in your…

---

## [Error in npm sonar-scanner with pnpm catalog (sonarjs/S6957)](https://community.sonarsource.com/t/error-in-npm-sonar-scanner-with-pnpm-catalog-sonarjs-s6957/177008)

<div class="topic-metadata">

**Author:** [@riddleit](https://community.sonarsource.com/u/riddleit)\
**Replies:** 4\
**Last updated:** [January 30, 2026, 9:19am UTC](https://community.sonarsource.com/t/error-in-npm-sonar-scanner-with-pnpm-catalog-sonarjs-s6957/177008 "2026-01-30T09:19:48Z")

</div>

I’m running a code analysis with npm sonar-scanner command in a bitbucket pipeline script over a react typescript monorepo. Since a couple of days I started having an error without any infrastructure change. Node versi…

---

## [Description of rule javascript:S1192 exceptions is vague](https://community.sonarsource.com/t/description-of-rule-javascript-s1192-exceptions-is-vague/176880)

<div class="topic-metadata">

**Author:** [@MisterPi](https://community.sonarsource.com/u/MisterPi)\
**Replies:** 3\
**Last updated:** [January 29, 2026, 7:09pm UTC](https://community.sonarsource.com/t/description-of-rule-javascript-s1192-exceptions-is-vague/176880 "2026-01-29T19:09:20Z")

</div>

Some confusion in the description ( SonarQube ) about exceptions: “The same goes for statement-like string literals, e.g. 'use strict';.” – Most exception lists are explicit and complete; could we have one here, if it’…

---

## [Frontend JavaScript coverage is 0% after SonarQube upgrade in multi-module Maven project](https://community.sonarsource.com/t/frontend-javascript-coverage-is-0-after-sonarqube-upgrade-in-multi-module-maven-project/172637)

<div class="topic-metadata">

**Author:** [@ShilpaBiswas](https://community.sonarsource.com/u/ShilpaBiswas)\
**Replies:** 3\
**Last updated:** [January 27, 2026, 1:33pm UTC](https://community.sonarsource.com/t/frontend-javascript-coverage-is-0-after-sonarqube-upgrade-in-multi-module-maven-project/172637 "2026-01-27T13:33:44Z")

</div>

We have a multi-module Maven project with backend (Java + JaCoCo) and frontend (React + Jest). Backend coverage is reported correctly, but frontend JavaScript coverage is always 0% after upgrading SonarQube. Project st…

---

## [80+ new Quick Fixes for JavaScript and TypeScript](https://community.sonarsource.com/t/80-new-quick-fixes-for-javascript-and-typescript/176680)

<div class="topic-metadata">

**Author:** [@gab](https://community.sonarsource.com/u/gab)\
**Replies:** 2\
**Last updated:** [January 22, 2026, 5:30pm UTC](https://community.sonarsource.com/t/80-new-quick-fixes-for-javascript-and-typescript/176680 "2026-01-22T17:30:24Z")

</div>

Hello community, We have some sweet news for JavaScript and TypeScript developers! To help you fix code issues even more easily and quickly, we’ve just added 80+ new Quick Fixes in SonarQube for IDE. Most of these are …

---

## [javascript:S2486 should not be applied to unit tests](https://community.sonarsource.com/t/javascript-s2486-should-not-be-applied-to-unit-tests/172444)

<div class="topic-metadata">

**Author:** [@ArianeBouchardConfor](https://community.sonarsource.com/u/ArianeBouchardConfor)\
**Replies:** 8\
**Last updated:** [January 21, 2026, 7:35pm UTC](https://community.sonarsource.com/t/javascript-s2486-should-not-be-applied-to-unit-tests/172444 "2026-01-21T19:35:31Z")

</div>

This rule: Handle this exception or don’t catch it at all. Exceptions should not be ignoredjavascript:S2486  should not be applied to unit tests by default. Ignoring errors in tests is a perfectly normal thing to do…

[Next page](https://community.sonarsource.com/tag/javascript/8.md?match_all_tags=true&page=1&tags%5B%5D=javascript)
