chore: use stricter options with the TS compiler by tbouffard · Pull Request #922 · maxGraph/maxGraph · GitHub
Skip to content

chore: use stricter options with the TS compiler#922

Merged
tbouffard merged 3 commits into
mainfrom
chore/TS_more_strict_options
Sep 24, 2025
Merged

chore: use stricter options with the TS compiler#922
tbouffard merged 3 commits into
mainfrom
chore/TS_more_strict_options

Conversation

@tbouffard

@tbouffard tbouffard commented Sep 24, 2025

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • Refactor

    • Clarified logging behavior: logging entry points now explicitly return undefined when tracing is off; behavior and public APIs unchanged.
  • Chores

    • Enabled stricter TypeScript return checks (noImplicitReturns) to improve type safety and maintainability. No runtime or API impact.

@tbouffard tbouffard added the chore Build, CI/CD or repository tasks (issues/PR maintenance, environments, ...) label Sep 24, 2025
@coderabbitai

coderabbitai Bot commented Sep 24, 2025

Copy link
Copy Markdown

@tbouffard tbouffard marked this pull request as ready for review September 24, 2025 10:16

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
tsconfig.json (1)

11-14: Avoid redundant flags: noImplicitAny and noImplicitThis are already implied by "strict": true

Keeping them is harmless but duplicate. noImplicitReturns is the only new check here. If you prefer a leaner config, remove the redundancies.

-    "noImplicitAny": true,
     "noImplicitOverride": true,
     "noImplicitReturns": true,
-    "noImplicitThis": true,
📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 01451b9 and d5895ab.

📒 Files selected for processing (3)
  • packages/core/src/gui/MaxLog.ts (1 hunks)
  • packages/core/src/util/logger.ts (1 hunks)
  • tsconfig.json (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: tbouffard
PR: maxGraph/maxGraph#849
File: packages/html/stories/DragSource.stories.js:98-101
Timestamp: 2025-06-13T07:48:10.300Z
Learning: User tbouffard prefers answers in English; avoid switching to other languages in future replies.
🔇 Additional comments (2)
packages/core/src/util/logger.ts (1)

62-68: Explicit undefined return to satisfy noImplicitReturns — LGTM

Matches the declared signature and keeps control flow clear when tracing is disabled.

packages/core/src/gui/MaxLog.ts (1)

271-277: Consistent explicit undefined return — LGTM

Aligns with ConsoleLogger.enter and satisfies noImplicitReturns without changing behavior.

@sonarqubecloud

Copy link
Copy Markdown

@tbouffard tbouffard merged commit f972cc9 into main Sep 24, 2025
2 checks passed
@tbouffard tbouffard deleted the chore/TS_more_strict_options branch September 24, 2025 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Build, CI/CD or repository tasks (issues/PR maintenance, environments, ...)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant