-
-
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
#6114
Fix eslint error @typescript-eslint/no-base-to-string
in common.ts
#6114
Conversation
…n using elk-layout" This reverts commit 255279e.
As [DOMPurify 3.2.0 added TypeScript types][1], this means that we can remove our dependency on the `@types/dompurify` package. [DOMPurify 3.2.0 also adds the `HTML_INTEGRATION_POINTS` option][2], which adds back support for `<foreignObject>`, [which broke in DOMPurify 3.1.7.][3] [1]: https://github.com/cure53/DOMPurify/releases/tag/3.2.0 [2]: cure53/DOMPurify@e4caa67 [3]: mermaid-js@de2c05c
According to the [config schema docs](https://mermaid.js.org/config/schema-docs/config-defs-gantt-diagram-config.html#tickinterval-constraints), Gantt's `tickInterval` configuration must match the following regular expression, which does **not** allow any space: ```regexp /^([1-9][0-9]*)(millisecond|second|minute|hour|day|week|month)$/ ```
|
✅ Deploy Preview for mermaid-js ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
…aid into bug/6113_fix-eslint-no-base-to-string
commit: |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #6114 +/- ##
=======================================
Coverage 4.48% 4.48%
=======================================
Files 383 382 -1
Lines 54038 54028 -10
Branches 596 621 +25
=======================================
Hits 2425 2425
+ Misses 51613 51603 -10
Flags with carried forward coverage won't be shown. Click here to find out more.
|
Hi! I'm autofix.ci, a bot that automatically fixes trivial issues such as code formatting in pull requests. I would like to apply some automated changes to this pull request, but it looks like I don't have the necessary permissions to do so. To get this pull request into a mergeable state, please do one of the following two things:
|
…le property in BaseNode interface
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
📑 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:
.