Skip to content

build: enable noImplicitReturns in tsconfig to catch missing return paths#408

Merged
askpt merged 2 commits into
mainfrom
repo-assist/eng-noImplicitReturns-20260623-90e997f0e380413e
Jun 23, 2026
Merged

build: enable noImplicitReturns in tsconfig to catch missing return paths#408
askpt merged 2 commits into
mainfrom
repo-assist/eng-noImplicitReturns-20260623-90e997f0e380413e

Conversation

@github-actions

Copy link
Copy Markdown
Contributor

🤖 This is an automated pull request from Repo Assist.

Summary

Enables the noImplicitReturns TypeScript compiler flag in tsconfig.json, so the compiler reports an error when not all code paths in a function return a value. This catches a common category of bugs (missing return on some branch) at compile time rather than at runtime.

What Changed

tsconfig.json:

  • Added a trailing comma after noFallthroughCasesInSwitch (was missing, which would have caused a parse error if noImplicitReturns were enabled)
  • Uncommented "noImplicitReturns": true

Why

noImplicitReturns is already enabled in most production TypeScript codebases. The existing codebase compiles with zero errors under this flag — enabling it costs nothing today but prevents future regressions.

Test Status

npm run compile  ✅  (0 errors)
npm run lint     ✅  (0 warnings)
npm run test:unit  ✅  137 passing, 0 failing

No code changes required — the existing source already satisfies this constraint.

Warning

Firewall blocked 1 domain

The following domain was blocked by the firewall during workflow execution:

  • releaseassets.githubusercontent.com

To allow these domains, add them to the network.allowed list in your workflow frontmatter:

network:
  allowed:
    - defaults
    - "releaseassets.githubusercontent.com"

See Network Configuration for more information.

Generated by 🌈 Repo Assist, see workflow run. Learn more.

Add this agentic workflows to your repo

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@d63b34de41bc0dc052096e094c732cf28eafc659

…aths

Enable the noImplicitReturns strict TypeScript compiler flag so the compiler
reports an error when not all code paths in a function return a value.  This
catches potential runtime bugs earlier at compile time.

The codebase already compiles cleanly with this flag.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@askpt askpt changed the title [repo-assist] build: enable noImplicitReturns in tsconfig to catch missing return paths build: enable noImplicitReturns in tsconfig to catch missing return paths Jun 23, 2026
@codecov

codecov Bot commented Jun 23, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.17%. Comparing base (3c93a5a) to head (95d4f18).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #408   +/-   ##
=======================================
  Coverage   78.17%   78.17%           
=======================================
  Files          13       13           
  Lines        4164     4164           
  Branches      468      468           
=======================================
  Hits         3255     3255           
  Misses        906      906           
  Partials        3        3           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@askpt askpt marked this pull request as ready for review June 23, 2026 20:45
@askpt askpt self-requested a review as a code owner June 23, 2026 20:45
Copilot AI review requested due to automatic review settings June 23, 2026 20:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.

@askpt askpt merged commit d1d0939 into main Jun 23, 2026
9 checks passed
@askpt askpt deleted the repo-assist/eng-noImplicitReturns-20260623-90e997f0e380413e branch June 23, 2026 20:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants