Skip to content

chore: resolve the Sonar findings in the docs scripts - #334

Merged
kurkle merged 1 commit into
mainfrom
chore/docs-sonar
Nov 21, 2026
Merged

kurkle merged 1 commit into
mainfrom
chore/docs-sonar

Conversation

@kurkle

@kurkle kurkle commented Nov 21, 2026

Copy link
Copy Markdown
Owner

Resolves two SonarCloud findings in the docs scripts:

  • S7780 in docs/scripts/write-docs-version.cjs: use String.raw for the backslash escapes instead of escaped backslashes in string literals. The statement is wrapped over three lines to satisfy the Biome formatter.
  • S7723 in docs/scripts/utils.js: replace [...Array(count)].map(...) with Array.from({ length: count }, ...). The result has the same shape (count points, x equal to the index).

The change is limited to the docs scripts; nothing in the published package is affected.

Verification: ran the version script on main and on this branch with DOCS_VERSION=v1.2.3 and with values containing backslashes and single quotes; the generated docs/src/generated/version.js is byte-identical in all cases. The docs build (npm run docs) completes.

@sonarqubecloud

Copy link
Copy Markdown

@github-actions

Copy link
Copy Markdown

Size Change: 0 B

Total Size: 12.7 kB

ℹ️ View Unchanged
Filename Size
dist/chartjs-plugin-gradient.cjs 3.63 kB
dist/chartjs-plugin-gradient.esm.js 3.47 kB
dist/chartjs-plugin-gradient.js 3.63 kB
dist/chartjs-plugin-gradient.min.js 2.02 kB

compressed-size-action

@cloudflare-workers-and-pages

Copy link
Copy Markdown

Deploying chartjs-plugin-gradient with  Cloudflare Pages  Cloudflare Pages

Latest commit: d4b62f0
Status: ✅  Deploy successful!
Preview URL: https://be60ed12.chartjs-plugin-gradient.pages.dev
Branch Preview URL: https://chore-docs-sonar.chartjs-plugin-gradient.pages.dev

View logs

@kurkle
kurkle merged commit 78087a4 into main Nov 21, 2026
6 checks passed
@kurkle
kurkle deleted the chore/docs-sonar branch November 21, 2026 21:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant