Skip to content

chore(lint): add core/webview to no-floating-promises ratchet #949

Description

@edelauna

Background

The repo is rolling out @typescript-eslint/no-floating-promises directory by directory (see src/eslint.config.mjs). Currently covered: activate/** and core/task/**. core/webview/ has not been added yet.

Problem

Running the rule against core/webview/** today surfaces 89 violations, almost all in webviewMessageHandler.ts. Not all are bugs — many are intentional fire-and-forget calls — but the noise means real ordering bugs hide undetected. One such bug was found in PR #912: invalidateAll() was called without await immediately before reconcile(), silently swallowing errors and making the ordering guarantee non-obvious.

What needs doing

  1. Triage the 89 violations in core/webview/ — for each one either:
    • Add await if ordering or error handling matters
    • Prefix with void if fire-and-forget is genuinely intentional
  2. Add core/webview/**/*.ts to the files glob in src/eslint.config.mjs so future violations are caught at lint time

Reproduction

cd src
npx eslint --rule '{"@typescript-eslint/no-floating-promises": "warn"}' \
  --parser-options 'project:true,tsconfigRootDir:.' \
  'core/webview/**/*.ts'

89 warnings as of commit 38ae51e.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions