Skip to content

chore: upgrade @beesolve/lint-config to 0.3.0 (type-aware linting) - #10

Merged
ivanbarlog merged 2 commits into
mainfrom
chore/lint-config-0.3.0
Sep 4, 2026
Merged

chore: upgrade @beesolve/lint-config to 0.3.0 (type-aware linting)#10
ivanbarlog merged 2 commits into
mainfrom
chore/lint-config-0.3.0

Conversation

@ivanbarlog

Copy link
Copy Markdown
Contributor

Supersedes #9 (dependabot's bare bump), doing the upgrade properly.

Summary

Upgrades @beesolve/lint-config 0.2.60.3.0, which enables oxlint type-aware linting and requires a new peer dependency oxlint-tsgolint. Adds that dependency and resolves every finding the stricter rules surface — with real fixes where possible, scoped inline suppressions (with reasons) only for genuine test-only assertions.

Changes

Dependencies

  • @beesolve/lint-config0.3.0
  • add oxlint-tsgolint@^7.0.0 (new required peer dep for type-aware rules)

Real fixes (assertion removed, no suppression)

  • Source templates: replace process.env as Record<string, string> with a definedEnv() helper that filters out undefined (honest conversion, not a cast).
  • test/cdk.test.ts: use HttpMethod.ANY instead of "ANY" as never.
  • files/bun/handler.test.ts: drop redundant single-arm result assertions (bun handler returns the type directly).
  • files/node/handler.test.ts: narrow the v1 | v2 handler-result union via small typed asV1Result/asV2Result helpers.
  • files/*/handler.ts: narrow Context to omit the deprecated done/fail/succeed (resolves no-deprecated).
  • Prefix intentional fire-and-forget calls (mock.module, server.stop) with void for no-floating-promises.

Scoped inline suppressions (test-only, with reasons)

  • util.test.ts: as never casts that deliberately exercise assertUnreachable's runtime guard.
  • files/*/stream.test.ts: stubbing the awslambda runtime global with simplified fakes.
  • test/integration/helpers.ts: typing a dynamic import().

Verification

  • oxlint: 0 warnings / 0 errors
  • tsc --noEmit: clean
  • build (prepublishOnly): clean
  • bun test: 71 pass / 0 fail

Includes a patch changeset (the shipped dist/files/** templates changed).

- add oxlint-tsgolint devDependency (new peer dep required by 0.3.0 for
  type-aware rules)
- prefix intentional fire-and-forget calls with void to satisfy
  no-floating-promises (mock.module test setup, server.stop cleanup)

Remaining oxlint warnings (no-unsafe-type-assertion on necessary casts,
no-deprecated on required Context mock members) are config-level warnings
and do not fail the build; left as-is per the lint-config author's intent.
- source: replace process.env casts with definedEnv() filter helper
- handler.ts: narrow Context to omit deprecated done/fail/succeed
- cdk.test.ts: use HttpMethod.ANY instead of "ANY" as never
- bun handler.test.ts: drop redundant single-arm result assertions
- node handler.test.ts: narrow v1|v2 result union via typed helpers
- prefix intentional fire-and-forget calls with void (no-floating-promises)
- scoped inline suppressions (with reasons) for genuine test-only assertions

oxlint: 0 warnings / 0 errors; check, tsc, build, and tests all pass.
@ivanbarlog
ivanbarlog merged commit 3038bec into main Sep 4, 2026
3 checks passed
@ivanbarlog
ivanbarlog deleted the chore/lint-config-0.3.0 branch September 4, 2026 13:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant