Skip to content

Add eslint for pr-checks#3572

Open
mbg wants to merge 9 commits intombg/esbuild/no-package-jsonfrom
mbg/pr-checks/eslint
Open

Add eslint for pr-checks#3572
mbg wants to merge 9 commits intombg/esbuild/no-package-jsonfrom
mbg/pr-checks/eslint

Conversation

@mbg
Copy link
Member

@mbg mbg commented Mar 12, 2026

(Based on #3573, which should be merged first.)

Adds an eslint configuration for the pr-checks folder (largely based on the root configuration), updates the .ts files in pr-checks to resolve some linter errors, and adds the linter check to the CI job for pr-checks.

Risk assessment

For internal use only. Please select the risk level of this change:

  • Low risk: Changes are fully under feature flags, or have been fully tested and validated in pre-production environments and are highly observable, or are documentation or test only.

Which use cases does this change impact?

Environments:

  • Testing/None - This change does not impact any CodeQL workflows in production.

How did/will you validate this change?

  • End-to-end tests - I am depending on PR checks (i.e. tests in pr-checks).

If something goes wrong after this change is released, what are the mitigation and rollback strategies?

  • Development/testing only - This change cannot cause any failures in production.

How will you know if something goes wrong after this change is released?

  • Other - Please provide details.

Are there any special considerations for merging or releasing this change?

  • No special considerations - This change can be merged at any time.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Consider adding a changelog entry for this change.
  • Confirm the readme and docs have been updated if necessary.

@mbg mbg self-assigned this Mar 12, 2026
@github-actions github-actions bot added size/M Should be of average difficulty to review size/XXL May be extremely hard to review and removed size/M Should be of average difficulty to review labels Mar 12, 2026
@mbg mbg force-pushed the mbg/pr-checks/eslint branch 2 times, most recently from d25105c to 1621f40 Compare March 12, 2026 18:16
@mbg mbg changed the base branch from main to mbg/esbuild/no-package-json March 12, 2026 19:02
@mbg mbg force-pushed the mbg/pr-checks/eslint branch from 1621f40 to 994858d Compare March 12, 2026 19:13
@github-actions github-actions bot added size/M Should be of average difficulty to review and removed size/XXL May be extremely hard to review labels Mar 12, 2026
@mbg mbg force-pushed the mbg/pr-checks/eslint branch 2 times, most recently from 7a26f16 to 4b1f21e Compare March 12, 2026 19:52
@mbg mbg marked this pull request as ready for review March 12, 2026 19:52
@mbg mbg requested a review from a team as a code owner March 12, 2026 19:52
Copilot AI review requested due to automatic review settings March 12, 2026 19:52
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds ESLint coverage for the pr-checks TypeScript code and updates CI and scripts so pr-checks code is linted and tested consistently alongside the main repo.

Changes:

  • Extend the root ESLint flat config to include pr-checks/**/*.ts using pr-checks/tsconfig.json.
  • Refactor pr-checks TypeScript to satisfy linting/type-checking (step typing and string template cleanups).
  • Update CI workflows and scripts (caching, installs, and sync-back filename) and introduce npm workspaces wiring.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
pr-checks/sync.ts Adds a minimal Step type and refactors string construction to be lint-friendly.
pr-checks/sync-back.ts Formatting/import tweaks to satisfy lint rules.
pr-checks/sync-back.test.ts Updates test text/import path and changes test registration style to satisfy linting.
eslint.config.mjs Enables linting for pr-checks with the correct TS project and adjusts rules.
.github/workflows/pr-checks.yml Adjusts caching and install steps; runs pr-checks tests without a local npm ci step.
.github/workflows/rebuild.yml Updates script filename from sync_back.ts to sync-back.ts.
package.json Adds npm workspaces configuration to include pr-checks.
package-lock.json Updates lockfile to reflect workspaces and newly installed workspace deps.
Comments suppressed due to low confidence (1)

pr-checks/sync-back.test.ts:43

  • Using async () => { await it(...) } changes the usual node:test pattern (register tests synchronously) and can subtly affect execution/ordering because it() is being treated as an awaitable. Once no-floating-promises is adjusted (e.g. via the ESLint safe-call allowlist), prefer keeping describe synchronous and calling it(...) without await (or using the conventional registration pattern) throughout this file.

@mbg mbg force-pushed the mbg/pr-checks/eslint branch from 4b1f21e to fc8d303 Compare March 12, 2026 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size/M Should be of average difficulty to review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants