Skip to content

chore(lint): lint scripts/ with Node globals, run it in CI - #642

Merged
VickyXAI merged 1 commit into
mainfrom
chore/lint-scripts
Nov 23, 2026
Merged

VickyXAI merged 1 commit into
mainfrom
chore/lint-scripts

Conversation

@VickyXAI

@VickyXAI VickyXAI commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

npm run lint and CI only linted src/, so scripts/*.mjs (smoke-dist, sync-brand-numbers, e2e-multiturn) carried 33 no-undef errors on Node globals (console, process, fetch, AbortSignal, TextDecoder) that nothing reported.

  • eslint.config.js: scripts/**/*.{js,mjs,cjs} get globals.node (new devDependency globals@^17.14.0: 22 days old, zero deps, dev-only, never bundled). Lockfile change is that one entry.
  • npm run lint covers src/ and scripts/; CI's Lint step calls npm run lint instead of its own npx eslint src/, so the two cannot drift.

Verified: lint clean; a genuinely undefined name in a script still errors (no-undef); prettier clean.

Summary by CodeRabbit

  • Chores
    • Automated lint checks now cover both application code and maintenance scripts, with recommended rules and environment settings applied across supported file types.
    • Continuous integration now runs the same lint command used by the project, making code-quality checks more consistent across development and automated builds.

npm run lint and CI only linted src/, so the three .mjs scripts carried
33 no-undef errors (console, process, fetch...) that nothing reported.
Declare Node globals for scripts/** via the globals package (dev-only,
zero deps), lint src/ and scripts/, and have CI call npm run lint so
the two cannot drift. A real undefined name in a script still errors.
@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

The lint command now checks both src/ and scripts/. ESLint assigns Node globals to JavaScript, MJS, and CJS files under scripts/. The CI Lint step runs the package lint command.

Changes: Lint coverage

Layer / File(s) Summary
Configure and run expanded lint checks
.github/workflows/ci.yml, eslint.config.js, package.json
ESLint configuration adds Node globals for script files. The lint script checks src/ and scripts/, and CI runs npm run lint.

Estimated code review effort: 2 (Simple) | ~8 minutes

Change: Other

Merge Risk: Minimal · up to a7c09 · assessed changes only

Path filters excluded changed files. This rating applies only to the assessed changes.

Pre-merge checks: Passed 4

Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title names the main change: the scripts/ directory is now linted with Node globals declared, and CI runs the lint command. The changeset matches this. The summary covers eslint.config.js (Node gl…
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Title check

Explanation

The title names the main change: the scripts/ directory is now linted with Node globals declared, and CI runs the lint command. The changeset matches this. The summary covers eslint.config.js (Node globals for scripts/), package.json (lint script covers scripts/, globals dev dependency), and the CI workflow (Lint step calls npm run lint). The title's "chore(lint)" prefix is a conventional-commit style and is acceptable.

Finishing Touches

Generate unit tests (beta)

  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 9745de2 and a7c09a5.

Files ignored due to path filters: 1

  • package-lock.json is excluded by !**/package-lock.json
Files selected for processing: 3

  • .github/workflows/ci.yml
  • eslint.config.js
  • package.json

Included review availability: This review used your included allowance. Your plan provides up to 8 included reviews per hour; 5 remain after this review.

@VickyXAI
VickyXAI merged commit 0fe452d into main Nov 23, 2026
5 checks passed
@VickyXAI
VickyXAI deleted the chore/lint-scripts branch November 23, 2026 22:35
VickyXAI pushed a commit that referenced this pull request Nov 23, 2026
Abort signal reaches every upstream send again (#641): request deadlines
and client disconnects no longer go missing after GC. Scripts linted in
CI (#642).
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