Skip to content

runtime: deno lint clean and gate it (just lint) - #321

Merged
lannbot merged 1 commit into
mainfrom
chore/lint-runtime
Sep 10, 2026
Merged

runtime: deno lint clean and gate it (just lint)#321
lannbot merged 1 commit into
mainfrom
chore/lint-runtime

Conversation

@lannbot

@lannbot lannbot commented Sep 10, 2026

Copy link
Copy Markdown
Collaborator

Companion to #316. The runtime had no lint gate and 93 stock-rule deno lint findings across 44 files. This clears them and adds just lint (cd runtime && deno lint) to check, gates, and gha::core right after fmt-check.

Fixes, not suppressions: no rules disabled, no new deno-lint-ignore comments.

  • verbatim-module-syntax, most prefer-const: deno lint --fix + deno fmt.
  • no-unused-vars: dead imports and one dead test helper deleted; _-prefix for a deliberately unused using binding and one parameter.
  • ban-unused-ignore: stale ignore comments removed. Generated bindgen snapshots/envelopes and fixture-generator output are excluded via lint.exclude in runtime/deno.json (same paths as the existing fmt.exclude).
  • no-explicit-any: syncScopes/syncCallStack typed SyncCallScope[], which is what every site already uses; tests cast through unknown to the trampoline context types they poke.
  • no-unsafe-finally (3): try { release() } finally { throw e }try { release() } catch { /* original error wins */ } throw e. Same semantics, stated rather than implied by finally.
  • no-this-alias (2): arrow properties in readable()'s stream source and the value bridge literal.
  • prefer-const forward references (let thread!: Thread + later assign, 7 sites): a named generator function and const thread. The IIFE-generator form fails TS2454.
  • require-await (3): async dropped where nothing awaits.

Behavior-neutral. just lint, just fmt-check, just test-runtime (879 passed) all green; deno.lock untouched.

Automerge armed.

Companion to #316: the runtime had no lint gate and 93 stock-rule
findings across 44 files. Fixes, not suppressions — no new
deno-lint-ignore comments and no rules disabled:

- verbatim-module-syntax / prefer-const: `deno lint --fix`, then fmt.
- no-unused-vars: dead imports and one dead helper deleted; `_`-prefix
  for a deliberately unused `using` binding and one parameter.
- ban-unused-ignore: stale ignore comments removed; generated bindgen
  snapshots/envelopes and fixture-generator output excluded via
  `lint.exclude` (same paths as `fmt.exclude`).
- no-explicit-any: `syncScopes`/`syncCallStack` typed `SyncCallScope[]`
  (that is what every site uses); tests cast through `unknown` to the
  trampoline context types they poke.
- no-unsafe-finally: `try { release() } finally { throw e }` becomes
  `try { release() } catch { /* original error wins */ } throw e` —
  same semantics, stated instead of implied.
- no-this-alias: arrow properties in `readable()`'s stream source and
  the value bridge literal; `self` gone.
- prefer-const forward references (`let thread!` + later assign): a
  named generator function and `const thread`; TS rejects the IIFE form.
- require-await: `async` dropped where nothing awaits.

`just lint` (`cd runtime && deno lint`) joins `check`, `gates`, and
`gha::core` right after `fmt-check`. `just test-runtime` 879 passed.
@lannbot
lannbot enabled auto-merge September 10, 2026 23:44
@lannbot
lannbot merged commit b2a22d5 into main Sep 10, 2026
4 checks passed
@lannbot
lannbot deleted the chore/lint-runtime branch September 10, 2026 23:49
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.

2 participants