Skip to content

Migrate ESLint config to flat config (eslint.config.js) - #9

Merged
DrummingBird1 merged 2 commits into
mainfrom
claude/fervent-chaum-b963f9
Sep 2, 2026
Merged

Migrate ESLint config to flat config (eslint.config.js)#9
DrummingBird1 merged 2 commits into
mainfrom
claude/fervent-chaum-b963f9

Conversation

@DrummingBird1

Copy link
Copy Markdown
Owner

Summary

  • ESLint 9 dropped default support for .eslintrc.json, so `npm run lint` / `pnpm exec eslint` was silently non-functional both locally and in CI (the lint job had continue-on-error: true, masking it).
  • Migrates the same minimal rule set (no-unused-vars, no-undef, no-redeclare, eqeqeq, etc. — deliberately no stylistic rules) to eslint.config.js, using the globals package for env globals.
  • Running lint for real surfaced two previously-uncaught issues, now fixed:
    • server.js's const crypto = require('crypto') collided with Node's newer global crypto (Web Crypto API) — unset that global in config since the local require is intentional.
    • test-e2e.js referenced a browser-context-only global (tglShl, defined in index.html) from inside a Playwright page.evaluate() callback — declared it as a file-scoped global.
    • Also tidied two letconst warnings in server.js.
  • CI's lint job now installs via pnpm (matching the committed lockfile) instead of an ad-hoc npm install eslint@9, and no longer needs continue-on-error since lint actually passes now.
  • Fixed two stale .eslintrc.json references (README.md, deploy.yml's paths-ignore).

Test plan

  • pnpm exec eslint server.js test.js test-integration.js test-e2e.js telegram-bot.js — exits 0, no output
  • node test.js — 91/91 pass
  • node test-integration.js — 12/12 assertions pass
  • node --check server.js

🤖 Generated with Claude Code

@vercel

vercel Bot commented Sep 2, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
red-alert Ready Ready Preview Sep 2, 2026 11:31am UTC

ESLint 9 dropped default support for .eslintrc.json, so `npm run lint`
was silently non-functional both locally and in CI (the lint job had
continue-on-error: true, masking it). Ports the same minimal rule set
(no-unused-vars, no-undef, no-redeclare, eqeqeq, etc. — no stylistic
rules) to eslint.config.js, using the `globals` package for env
globals. This is the documented prerequisite noted in
.github/SECURITY.md for a possible future ESLint v10 upgrade, but
does not itself change that accepted-risk decision (v10 also needs a
Node engine bump, which stays out of scope here).

Running lint for real surfaced two previously-uncaught issues, now
fixed: server.js's `const crypto = require('crypto')` collided with
Node's newer global `crypto`, and test/e2e.js referenced a
browser-context-only global (tglShl) from inside page.evaluate().
Also tidied two let->const warnings in server.js.

CI's lint job now installs via pnpm (matching the lockfile) and no
longer needs continue-on-error since lint actually passes.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
pnpm/action-setup@v4 with version:11 resolves to the latest 11.x
(currently 11.25.0), which requires Node >=22.13 and crashes with
ERR_UNKNOWN_BUILTIN_MODULE (node:sqlite) on Node 20. Node 22 is
already exercised elsewhere in this same workflow's test matrix.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@DrummingBird1
DrummingBird1 merged commit e3ac5f9 into main Sep 2, 2026
9 checks passed
@DrummingBird1
DrummingBird1 deleted the claude/fervent-chaum-b963f9 branch September 2, 2026 11:48
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