fix: repair pnpm run lint and run it in CI (not gating yet) - #194
Conversation
`typescript: ^7.0.2` resolved to TypeScript 7, the native port, which no longer exposes the legacy compiler API. `ts-api-utils` (pulled in by `@typescript-eslint` through `eslint-config-etherpad`) throws `Cannot read properties of undefined (reading 'Intrinsic')` on load, taking the whole ESLint config down before any file is checked. Pin `typescript` to `~6.0.3` and bump `eslint-config-etherpad` to `^5.0.0`, which declares `typescript: ">=4.8.4 <6.1.0"` so a future TypeScript major fails loudly at install time instead of silently breaking lint. Add a reusable `lint.yml` workflow so lint runs in CI. It is deliberately NOT added to the `release` job's `needs:` list: with lint working again the repo reports 105 findings (35 errors, 70 warnings), mostly `mocha/no-synchronous-tests` in the backend specs, which needs real changes to the test suite rather than a mechanical fix. Lint therefore reports but does not block until that is cleaned up separately. 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 QodoRestore ESLint compatibility and add non-gating CI lint
AI Description
Diagram
High-Level Assessment
Files changed (4)
|
Code Review by Qodo
1. Every push workflow reports failure
|
Add a job-level `permissions: contents: read` to the lint workflow. `eslint .` executes the repo's ESLint config and every installed plugin, so it should not inherit the caller workflow's contents:write / id-token:write token. Raise engines.node from >=18.0.0 to >=22.0.0. eslint-config-etherpad@5 pulls eslint-visitor-keys@5.0.1, which excludes Node 18, so the old floor was a false claim; >=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 lintwas broken in this repo (and in ~82 of the 85ether/*pluginrepos). The devDependency
typescript: ^7.0.2resolved to TypeScript 7, thenative port, which no longer exposes the legacy compiler API.
ts-api-utils— pulled in by
@typescript-eslintviaeslint-config-etherpad— throwsCannot read properties of undefined (reading 'Intrinsic')while loading, whichtakes the whole ESLint config down before a single file is checked.
Nothing noticed because lint was never run in CI.
What changed
typescriptpinned to~6.0.3(must satisfy>=4.8.4 <6.1.0).eslint-config-etherpadbumped to^5.0.0. 5.x declares that TypeScriptrange as a peer dependency, so a future TypeScript major now fails loudly at
install time instead of silently breaking lint.
pnpm-lock.yamlregenerated. The diff is large because TypeScript 7 ships~20 per-platform native binaries that TypeScript 6 does not.
.github/workflows/lint.yml(reusable workflow runningpnpm run lint),added to
test-and-release.ymlas alintjob. It is deliberately NOT in thereleasejob'sneeds:list — see below.Lint result
With lint working again this repo reports 105 problems (35 errors, 70
warnings). The errors are almost entirely
mocha/no-synchronous-testsin thebackend specs, plus a handful of
quotes; clearing them means rewriting tests,not a mechanical fix, and these rules have never actually run here.
So this PR makes lint run and report without letting it block releases:
lint.ymlis added as a job, butlintis not added to thereleasejob'sneeds:. The findings can be worked through in a follow-up, andlintadded toneeds:at that point.No source or test files are changed by this PR.
Follows ether/ep_cursortrace#117, ether/ep_clear_formatting#96 and
ether/ep_git_commit_saved_revision#107.
🤖 Generated with Claude Code
https://claude.ai/code/session_013S4pYSjwUsiZtdtMMpW7bw