Skip to content

[CI] Stabilize JavaScript linting#507

Merged
Volte6 merged 2 commits intomasterfrom
fix/jshint-shared-globals
Apr 20, 2026
Merged

[CI] Stabilize JavaScript linting#507
Volte6 merged 2 commits intomasterfrom
fix/jshint-shared-globals

Conversation

@CaseyLabs
Copy link
Copy Markdown
Collaborator

Why

  • repeated /* global ... */ headers in the webclient window modules were lint-only noise
  • JS lint failures were easy to misread because the Lint workflow mixed Go validation and JavaScript lint into one job
  • unpinned npx jshint left CI behavior vulnerable to tool drift

Changes

  • pin JSHint in make js-lint
  • centralize shared window-module globals in .jshintrc.webclient-windows
  • remove the repeated globals headers from the window modules
  • split .github/workflows/lint.yml into go-lint and js-lint
  • only run js-lint when JS lint inputs change

Validation

  • make js-lint
  • actionlint .github/workflows/lint.yml
  • yamllint .github/workflows/lint.yml

const icon = document.createElement('span');
icon.className = 'rw-icon locked';
icon.textContent = '\u{1f512}';
icon.textContent = '\ud83d\udd12';
Copy link
Copy Markdown
Collaborator Author

@CaseyLabs CaseyLabs Apr 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

\ud83d\udd12 is valid JavaScript, renders the same lock (🔒) character, and is safer under the current JSHint setup than \u{1f512}, which was the form that triggered the lint complaint.

@@ -1,4 +1,4 @@
/* global MP3Player, Triggers, WinBox */
/* global Triggers */
Copy link
Copy Markdown
Collaborator Author

@CaseyLabs CaseyLabs Apr 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MP3Player and WinBox now come from the shared JSHint config, so they do not need per-file headers anymore. Keeping a single inline /* global Triggers */ here is the simpler tradeoff because Triggers is the one remaining file-specific exception, and this avoids adding another dedicated JSHint config layer just for webclient-core.js.

@CaseyLabs CaseyLabs marked this pull request as ready for review April 20, 2026 16:39
@CaseyLabs CaseyLabs changed the title Stabilize JavaScript linting [CI] Stabilize JavaScript linting Apr 20, 2026
@Volte6 Volte6 merged commit 5419b7d into master Apr 20, 2026
13 checks passed
@Volte6 Volte6 deleted the fix/jshint-shared-globals branch April 20, 2026 16: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