-
-
Notifications
You must be signed in to change notification settings - Fork 7.6k
chore: Cleanup lint warnings #6503
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
base: develop
Are you sure you want to change the base?
Conversation
|
✅ Deploy Preview for mermaid-js ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
commit: |
…mermaid-graphlib.js
…tecture/architectureRenderer.ts
…/renderHelpers.ts
…/classDiagram-v2.ts
…/classRenderer-v2.ts
…/valueConverter.ts
fcb32ff
to
6462f73
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR cleans up several lint warnings by replacing explicit undefined checks with the nullish coalescing (??/??=) operators throughout the codebase. The changes enhance readability and consistency without altering the underlying logic.
- Replaces if-check assignments with nullish coalescing assignments.
- Updates conditional checks and attribute assignments to use the modern operator syntax.
Reviewed Changes
Copilot reviewed 20 out of 20 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
packages/parser/src/language/common/valueConverter.ts | Uses nullish assignment for custom converter fallback. |
packages/mermaid/src/diagrams/packet/parser.ts | Replaces undefined block.end assignment with nullish coalescing. |
packages/mermaid/src/diagrams/class/classRenderer-v2.ts | Updates tooltip retrieval using nullish coalescing. |
packages/mermaid/src/diagrams/class/classDiagram.ts | Simplifies configuration object initialization. |
packages/mermaid/src/diagrams/class/classDiagram-v2.ts | Simplifies configuration object initialization. |
packages/mermaid/src/diagrams/class/classDb.ts | Defines function array type and refactors tooltip element check. |
packages/mermaid/src/diagrams/block/renderHelpers.ts | Refines class string derivation with nullish coalescing. |
packages/mermaid/src/diagrams/block/blockDB.ts | Implements nullish coalescing for classes assignment. |
packages/mermaid/src/diagrams/architecture/architectureRenderer.ts | Uses nullish coalescing in transform attribute assignment. |
packages/mermaid/src/dagre-wrapper/nodes.js | Applies nullish coalescing for id and class concatenation. |
packages/mermaid/src/dagre-wrapper/mermaid-graphlib.js | Adds type annotations via JSDoc comments. |
packages/mermaid/src/dagre-wrapper/edges.js | Refactors terminalLabels assignments and path lookup. |
packages/mermaid/src/dagre-wrapper/createLabel.js | Updates the default assignment for vertexText. |
packages/mermaid/src/dagre-wrapper/clusters.js | Uses nullish coalescing for shape determination. |
packages/mermaid/src/config.ts | Applies nullish coalescing for themeVariables assignment. |
packages/mermaid-layout-elk/src/render.ts | Replaces various default assignments with nullish coalescing. |
cypress/integration/rendering/journey.spec.js | Uses nullish coalescing when computing maxLineWidth. |
cypress/integration/rendering/imageShape.spec.ts | Updates label position description default using nullish coalescing. |
cypress/integration/rendering/iconShape.spec.ts | Updates label position description default using nullish coalescing. |
cypress/helpers/util.ts | Modernizes default assignment with nullish coalescing for batch id and noteFontFamily. |
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
📑 Summary
Brief description about the content of your PR.
Resolves #
📏 Design Decisions
Describe the way your implementation works or what design decisions you made if applicable.
📋 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:
.