runtime: deno lint clean and gate it (just lint) - #321
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Companion to #316. The runtime had no lint gate and 93 stock-rule
deno lintfindings across 44 files. This clears them and addsjust lint(cd runtime && deno lint) tocheck,gates, andgha::coreright afterfmt-check.Fixes, not suppressions: no rules disabled, no new
deno-lint-ignorecomments.verbatim-module-syntax, mostprefer-const:deno lint --fix+deno fmt.no-unused-vars: dead imports and one dead test helper deleted;_-prefix for a deliberately unusedusingbinding and one parameter.ban-unused-ignore: stale ignore comments removed. Generated bindgen snapshots/envelopes and fixture-generator output are excluded vialint.excludeinruntime/deno.json(same paths as the existingfmt.exclude).no-explicit-any:syncScopes/syncCallStacktypedSyncCallScope[], which is what every site already uses; tests cast throughunknownto 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 inreadable()'s stream source and the value bridge literal.prefer-constforward references (let thread!: Thread+ later assign, 7 sites): a named generator function andconst thread. The IIFE-generator form fails TS2454.require-await(3):asyncdropped where nothing awaits.Behavior-neutral.
just lint,just fmt-check,just test-runtime(879 passed) all green;deno.lockuntouched.Automerge armed.