Skip to content

Lint pass keyboard_svg#28

Open
narglab wants to merge 11 commits into
cyanophage:mainfrom
narglab:lint_pass
Open

Lint pass keyboard_svg#28
narglab wants to merge 11 commits into
cyanophage:mainfrom
narglab:lint_pass

Conversation

@narglab
Copy link
Copy Markdown

@narglab narglab commented Apr 23, 2026

I ran the Biome linter on keyboard_svg.js and did some cleaning.
before - 476 errors, 38 warnings, 90 infos
after - 28 warnings

Here are the main changes:
• declare variables once, before use, and in outer block
• use triple equals for comparisons
• remove a few unused parameters
• remove one duplicate else-if clause
• added parameter radix=10 to parseInt()

Strings now use templates for style,
I think this is more legible this way
but feel free to disagree and I'll revert to concatenation.

For some reason,the linter still flags most functions as unused,
although they're definitely called.

Finally I formatted comments with author names,
used block comments where appropriate,
and replaced series of slashes with equal signs,
to make browsing comments easier.

@narglab
Copy link
Copy Markdown
Author

narglab commented Apr 23, 2026

One commit mentions "global_y" but I did not rename it in the end,
because the "const y_" variables avoid redefinition already.

@narglab narglab changed the title Lint pass Lint pass keyboard_svg Apr 26, 2026
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