-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix eslint error @typescript-eslint/no-base-to-string
in common.ts
#6115
base: develop
Are you sure you want to change the base?
Fix eslint error @typescript-eslint/no-base-to-string
in common.ts
#6115
Conversation
|
✅ Deploy Preview for mermaid-js ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
commit: |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #6115 +/- ##
=======================================
Coverage 4.48% 4.48%
=======================================
Files 383 383
Lines 54038 54038
Branches 596 596
=======================================
Hits 2425 2425
Misses 51613 51613
Flags with carried forward coverage won't be shown. Click here to find out more.
|
The latest updates on your projects. Learn more about Argos notifications ↗︎ Waiting for the first build to start… |
📑 Summary
This PR fixes the eslint error
@typescript-eslint/no-base-to-string
caused by the use of.toString()
in the file/packages/mermaid/src/diagrams/common/common.ts
on line 86. The error preventedpnpm test
from running successfully. The issue is resolved by explicitly converting the sanitized text to a string using theString()
method.Resolves #6113
📏 Design Decisions
.toString()
method withString()
to explicitly convert the result ofDOMPurify.sanitize
to a string, adhering to the eslint rule@typescript-eslint/no-base-to-string
.([object Object])
, which was causing the issue.📋 Tasks
Make sure you
MERMAID_RELEASE_VERSION
is used for all new features.pnpm changeset
and following the prompts. Changesets that add features should beminor
and those that fix bugs should bepatch
. Please prefix changeset messages withfeat:
,fix:
, orchore:
.