Skip to content

Check browser JavaScript with host-only ESLint - #16

Merged
jatmn merged 1 commit into
mainfrom
ci/eslint-browser-javascript
Sep 25, 2026
Merged

jatmn merged 1 commit into
mainfrom
ci/eslint-browser-javascript

Conversation

@jatmn

@jatmn jatmn commented Sep 25, 2026 •

Copy link
Copy Markdown
Owner

Summary

  • Run ESLint in CI on the printer browser scripts (web/www/js) and the docs-site script (website/assets/js).
  • Keep the checker on the build host under tools/eslint. It is not copied into printer packages.
  • Leave the existing ES5 page scripts unchanged. A self-test shows the real files pass and an undefined name fails.

Test plan

  • npm ci --ignore-scripts --prefix tools/eslint
  • bash tools/eslint-web-selftest.sh
  • bash tools/select-ci-validation-selftest.sh
  • reuse lint
  • Host stub builds for print service, web, UI, and Digital Factory
  • GitHub policy-validation runs the new ESLint step on this pull request

Summary by Sourcery

Add host-only ESLint validation for browser JavaScript and integrate it into CI without changing the printer-delivered scripts.

New Features:

  • Add host-only ESLint validation for the existing browser JavaScript in the printer web interface and documentation site.

Enhancements:

  • Add a self-test that verifies the browser scripts pass linting and that undefined names are rejected.
  • Keep the pinned ESLint tooling outside printer packages and document its third-party licensing and provenance.

CI:

  • Run the browser JavaScript lint self-test in CI and include it in shell style checks.
  • Update CI validation selection to recognize ESLint checker changes without triggering unrelated validation lanes.

Documentation:

  • Document the host-only ESLint dependency and its licensing boundary.

Tests:

  • Extend CI selector self-tests to cover ESLint host tooling and validation script changes.

The printer page and docs-site scripts had no linter. Keep the checker on the build host so it never lands in a printer package.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Approved.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@jatmn
jatmn merged commit f533b38 into main Sep 25, 2026
13 checks passed
@jatmn jatmn self-assigned this Sep 25, 2026
@jatmn
jatmn deleted the ci/eslint-browser-javascript branch September 25, 2026 23:10
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