fix: repair pnpm run lint and gate it in CI - #111
Conversation
`pnpm run lint` has been broken here: the repo pulls `typescript: ^7.0.2`, and TypeScript 7 is the native port, which no longer exposes the legacy compiler API. `ts-api-utils` therefore throws `Cannot read properties of undefined (reading 'Intrinsic')` while the ESLint config is being loaded, taking the whole run down. Nothing in CI ran lint, so it rotted unnoticed. - pin `typescript` to `~6.0.3` (the last major the typescript-eslint stack supports) - bump `eslint-config-etherpad` to `^5.0.0`, which declares `typescript: ">=4.8.4 <6.1.0"` so a future TypeScript major fails loudly instead of silently - add `.github/workflows/lint.yml` and wire it into `test-and-release.yml` so lint runs on every push and gates `release` Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013S4pYSjwUsiZtdtMMpW7bw
Drop the unused `ep_etherpad-lite/node/eejs` require from `index.js`. `ep_plugin_helpers` `template()` took over that job, so the binding was dead and tripped `no-unused-vars`. No behaviour change. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013S4pYSjwUsiZtdtMMpW7bw
|
ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing |
PR Summary by QodoRepair pnpm lint and gate releases in CI
AI Description
Diagram
High-Level Assessment
Files changed (5)
|
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can turn on the rule miner and Qodo learns your standards from review history |
Pin the lint job to `permissions: contents: read`. Without a job-level block it inherits the caller workflow's `contents: write` / `id-token: write` token while `eslint .` executes .eslintrc.cjs and every installed ESLint plugin. Raise `engines.node` from >=18.0.0 to >=22.0.0. The old range is a false claim: eslint-config-etherpad@5 pulls eslint-visitor-keys@5.0.1, which excludes Node 18, and >=22.0.0 is the documented ether plugin floor. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013S4pYSjwUsiZtdtMMpW7bw
Why
pnpm run lintdoes not run in this repo.package.jsonasks fortypescript: ^7.0.2, and TypeScript 7 is the native port: it no longerexposes the legacy JS compiler API that
ts-api-utils(pulled in by@typescript-eslint) reads at module load. Loading the ESLint configtherefore throws
and the whole lint run dies before a single file is checked. No workflow
ran
lint, which is why this rotted unnoticed.What changed
typescriptpinned to~6.0.3— the last major the typescript-eslintstack supports.
eslint-config-etherpadbumped to^5.0.0. 5.x declarestypescript: ">=4.8.4 <6.1.0", so the next TypeScript major failsloudly at install time instead of silently breaking lint again.
pnpm-lock.yamlregenerated. The large deletion is just TypeScript 7's~20 per-platform native binaries going away.
.github/workflows/lint.yml(reusable, same asfix: repair
pnpm run lintand gate it in CI ep_cursortrace#117), wired intotest-and-release.ymlas alint:job and added to thereleasejob'sneeds:so lint now gatesreleases.
Lint result
pnpm run lintpasses after one hand fix:index.jsrequiredep_etherpad-lite/node/eejsbut never used it (ep_plugin_helperstemplate()replaced that usage), which trippedno-unused-vars. Theunused
requireis dropped in its own commit.12
no-use-before-define/camelcase/you-dont-need-lodash-underscorewarnings remain in
static/js/index.js. Warnings do not fail the run andfixing them would mean reordering/renaming live code, so they are left for
a follow-up.
🤖 Generated with Claude Code
https://claude.ai/code/session_013S4pYSjwUsiZtdtMMpW7bw