GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — feat: enable type-aware no-floating-promises rule, fix all 177 violations by kitlangton · Pull Request #22741 · anomalyco/opencode

Conversation

@kitlangton

@kitlangton kitlangton commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add oxlint-tsgolint for type-aware linting (uses TypeScript's Go compiler port for full type info)
  • Enable no-floating-promises rule — catches unhandled promise rejections
  • Fix all 177 violations across 103 files

Why this matters

no-floating-promises is the single highest-value type-aware lint rule. It catches:

  • Promises that are never awaited, returned, or voided
  • Silent failures where a rejected promise is dropped without error handling
  • Common in async callbacks, event handlers, and fire-and-forget patterns

What was fixed

All 177 hits were intentional fire-and-forget patterns that just needed void to signal intent:

Pattern Count Example
Bus.publish(...) / event publishing ~20 void Bus.publish(Event.Updated, {...})
TUI/UI async callbacks ~30 void sdk.client.session.create(...)
Test cleanup/setup ~42 void Log.init(...), void server.stop()
navigator.clipboard ~3 void navigator.clipboard.writeText(...)
mock.module(...) in tests ~15 void mock.module(...)
Misc async in sync contexts ~67 Various fire-and-forget calls

No code was restructured — only void was added to make the intent explicit.

Performance

Type-aware linting adds ~7s to the lint run (vs ~140ms syntax-only) since it needs to build the type graph. This is still much faster than ESLint + typescript-eslint would be (~30-60s on a codebase this size).

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@kitlangton
kitlangton requested a review from adamdotdevin as a code owner April 16, 2026 03:16
@kitlangton
kitlangton enabled auto-merge (squash) April 16, 2026 03:16
@github-actions github-actions Bot added Vouched contributor labels Apr 16, 2026
@kitlangton
feat: enable type-aware no-floating-promises rule, fix all 177 violat…
3e427bb
…ions

Add oxlint-tsgolint for type-aware linting and enable the
no-floating-promises rule. Fix all 177 unhandled promise warnings
by adding `void` to intentional fire-and-forget calls (Bus.publish,
clipboard, cleanup, async callbacks in sync contexts).

This rule prevents silently dropped promise rejections — the #1
async bug pattern in TypeScript codebases.
@kitlangton
kitlangton force-pushed the kit/oxlint-floating-promises branch from c7c7ced to 3e427bb Compare April 16, 2026 03:20
@kitlangton
kitlangton disabled auto-merge April 16, 2026 03:27
@kitlangton
kitlangton merged commit 80f1f1b into dev Apr 16, 2026
11 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@kitlangton
kitlangton deleted the kit/oxlint-floating-promises branch April 16, 2026 03:27
AIALRA-0 pushed a commit to AIALRA-0/opencode-turn-engine that referenced this pull request Jun 10, 2026
@kitlangton
feat: enable type-aware no-floating-promises rule, fix all 177 violat…
16797e8
…ions (anomalyco#22741)
isaacfinnegan pushed a commit to isaacfinnegan/whispercode that referenced this pull request Jun 15, 2026
@kitlangton
feat: enable type-aware no-floating-promises rule, fix all 177 violat…
53a5350
…ions (anomalyco#22741)
MarsQiu007 referenced this pull request in MarsQiu007/openNovel Jul 31, 2026
@kitlangton
feat: enable type-aware no-floating-promises rule, fix all 177 violat…
5bff766
…ions (#22741)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@adamdotdevin adamdotdevin Awaiting requested review from adamdotdevin

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

contributor Vouched

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

1 participant

@kitlangton
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.