Migrate ESLint config to flat config (eslint.config.js) - #9
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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>
DrummingBird1
force-pushed
the
claude/fervent-chaum-b963f9
branch
from
September 2, 2026 11:29
2de2082 to
0e961a3
Compare
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
.eslintrc.json, so `npm run lint` / `pnpm exec eslint` was silently non-functional both locally and in CI (the lint job hadcontinue-on-error: true, masking it).eslint.config.js, using theglobalspackage for env globals.server.js'sconst crypto = require('crypto')collided with Node's newer globalcrypto(Web Crypto API) — unset that global in config since the local require is intentional.test-e2e.jsreferenced a browser-context-only global (tglShl, defined inindex.html) from inside a Playwrightpage.evaluate()callback — declared it as a file-scoped global.let→constwarnings inserver.js.pnpm(matching the committed lockfile) instead of an ad-hocnpm install eslint@9, and no longer needscontinue-on-errorsince lint actually passes now..eslintrc.jsonreferences (README.md, deploy.yml'spaths-ignore).Test plan
pnpm exec eslint server.js test.js test-integration.js test-e2e.js telegram-bot.js— exits 0, no outputnode test.js— 91/91 passnode test-integration.js— 12/12 assertions passnode --check server.js🤖 Generated with Claude Code