Runtime: Fix lint issues in compiled output#650
Merged
kateinoigakukun merged 1 commit intoswiftwasm:mainfrom Feb 18, 2026
Merged
Runtime: Fix lint issues in compiled output#650kateinoigakukun merged 1 commit intoswiftwasm:mainfrom
kateinoigakukun merged 1 commit intoswiftwasm:mainfrom
Conversation
kateinoigakukun
approved these changes
Feb 18, 2026
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.
Overview
This is a proposal - totally fine to reject and close if these aren't worth maintaining.
The compiled
runtime.mjshas 5 issues that trip rules from@eslint/jsrecommended config (no-fallthrough,no-useless-assignment,no-case-declarations). All three have been in ESLint's recommended set since v9+ (the first two since v0.x/v1.x,no-useless-assignmentsince v9). These are in the TypeScript source and compile through to the rollup output unchanged.1.
no-fallthroughinjs-value.tsThe Boolean case in
decode()has a nested switch that doesn't cover all values, then falls through to the Number case. This is intentional (an invalid boolean payload gets treated as a number), but there's no annotation marking it so.2.
no-useless-assignmentinindex.ts(2 instances)swjs_call_functionandswjs_call_function_with_this_no_catchinitializelet result = undefinedthen immediately reassign. Inswjs_call_function, the init is never read because the catch returns early. In the no-catch variant, it's a straight reassign on the next statement.3.
no-case-declarationsinindex.ts(2 instances)The two
listenMessagecallbacks haveconstdeclarations in unbraceddefault:cases. Wrapping with{}scopes the declaration to the case block.