# SonarJS

SonarSource Static Analyzer for JavaScript and TypeScript

Repository: https://github.com/SonarSource/SonarJS
Canonical: https://ross.abutalabs.com/products/sonarjs
Homepage: https://community.sonarsource.com/
Language: TypeScript
License: NOASSERTION
License Family: other
Topics: sonarqube, javascript, static-analysis, static-code-analysis, static-analyzer, code-quality, language-team, sonarcloud, typescript
Last push: 2026-09-02T17:26:46+00:00
Link (homepage): https://community.sonarsource.com/
Link (site_page): https://community.sonarsource.com/c/sq/releases/24
Link (site_page): https://community.sonarsource.com/c/sl/sonarlint-releases/37
Link (site_page): https://docs.sonarsource.com/sonarcloud
Link (site_page): https://docs.sonarsource.com/sonarqube/latest

## Health v2 (maintenance only)
Score: 100/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 100, release rhythm 99, longevity 100
- inputs: {"age_days": 5223, "days_push": 0, "days_rel": 5, "gap_med": 11.5, "n_releases_24m": 41}
- flags: no_license
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1277, forks 191 (observed 2026-09-03T02:15:08.190099+00:00)

## What it is
SonarSource's static code analyzer for JavaScript, TypeScript, and CSS, providing hundreds of rules for code quality and security. It now also ships as eslint-plugin-sonarjs, an ESLint plugin integrating SonarSource rules into standard ESLint workflows.

## Use cases
- find bugs and code smells in JavaScript and TypeScript code
- run SonarSource rules as an ESLint plugin
- enforce code quality gates in CI for JS/TS projects
- analyze CSS, SCSS, and Less for quality issues
- measure complexity and code metrics for TypeScript projects
- detect security vulnerabilities in frontend JavaScript code

## When to choose
- you want SonarSource's battle-tested rules inside an existing ESLint setup
- your team uses SonarQube or SonarCloud and needs JS/TS/CSS analysis
- you need advanced rules based on control-flow and pattern analysis beyond core ESLint rules

## When to avoid
- you need a standalone linter without SonarQube/ESLint infrastructure
- you only want style/formatting enforcement (use Prettier instead)
- you analyze languages other than JavaScript, TypeScript, or CSS

## Facets
- artifact type: library
- maturity: active
- function: linter, static-site-generator, developer-tools, security
- domain: developer-tools, web-development, testing, security
- platform: cross-platform
- tags: static-analysis, eslint-plugin, sonarqube, code-quality, sonarcloud, css-linting, code-smells, nodejs, javascript, typescript

## Member repositories
- SonarSource/SonarJS (main) score 100
- SonarSource/eslint-plugin-sonarjs (plugin) score 10

## Provenance
- Observed fields: from GitHub, fetched 2026-09-03T02:15:08.190099+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T05:03:34.735902+00:00, confidence not recorded.
  - readme: https://github.com/SonarSource/SonarJS (fetched 2026-09-03T02:15:08.190099+00:00, sha 9c710027ce29)
  - homepage: https://community.sonarsource.com/ (fetched 2026-08-29T12:15:24.020357+00:00, sha efe1b526ce09)
  - site_page: https://docs.sonarsource.com/sonarcloud (fetched 2026-08-29T12:15:24.034788+00:00, sha 57c543cd5d3b)
  - site_page: https://docs.sonarsource.com/sonarqube/latest (fetched 2026-08-29T12:15:24.036894+00:00, sha 7ee9dada1177)
  - site_page: https://community.sonarsource.com/c/sq/releases/24 (fetched 2026-08-29T12:15:24.030363+00:00, sha 2402c5712134)
  - site_page: https://community.sonarsource.com/c/sl/sonarlint-releases/37 (fetched 2026-08-29T12:15:24.032578+00:00, sha ea4e90128fa8)
  - site_page: https://community.sonarsource.com/t/frequently-asked-questions/7204 (fetched 2026-08-29T12:15:24.038608+00:00, sha 62f95f0c592d)
  - site_page: https://community.sonarsource.com/c/suggestions/12 (fetched 2026-08-29T12:15:24.040558+00:00, sha 38cfb6ad8407)
- Data as of 2026-08-30T08:39:29.467469+00:00.
