Skip to content

fix: repair pnpm run lint and gate it in CI - #111

Merged
JohnMcLear merged 3 commits into
mainfrom
ci/repair-lint
Sep 21, 2026
Merged

JohnMcLear merged 3 commits into
mainfrom
ci/repair-lint

Conversation

@JohnMcLear

Copy link
Copy Markdown
Member

Why

pnpm run lint does not run in this repo. package.json asks for
typescript: ^7.0.2, and TypeScript 7 is the native port: it no longer
exposes the legacy JS compiler API that ts-api-utils (pulled in by
@typescript-eslint) reads at module load. Loading the ESLint config
therefore throws

Cannot read properties of undefined (reading 'Intrinsic')

and the whole lint run dies before a single file is checked. No workflow
ran lint, which is why this rotted unnoticed.

What changed

  • typescript pinned to ~6.0.3 — the last major the typescript-eslint
    stack supports.
  • eslint-config-etherpad bumped to ^5.0.0. 5.x declares
    typescript: ">=4.8.4 <6.1.0", so the next TypeScript major fails
    loudly at install time instead of silently breaking lint again.
  • pnpm-lock.yaml regenerated. The large deletion is just TypeScript 7's
    ~20 per-platform native binaries going away.
  • New .github/workflows/lint.yml (reusable, same as
    fix: repair pnpm run lint and gate it in CI ep_cursortrace#117), wired into test-and-release.yml as a
    lint: job and added to the release job's needs: so lint now gates
    releases.

Lint result

pnpm run lint passes after one hand fix: index.js required
ep_etherpad-lite/node/eejs but never used it (ep_plugin_helpers
template() replaced that usage), which tripped no-unused-vars. The
unused require is dropped in its own commit.

12 no-use-before-define / camelcase / you-dont-need-lodash-underscore
warnings remain in static/js/index.js. Warnings do not fail the run and
fixing 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

JohnMcLear and others added 2 commits September 20, 2026 18:52
`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-code-review

Copy link
Copy Markdown

ⓘ Qodo reviews are paused because the subscription is no longer active. Ask your workspace admin to reactivate the subscription to resume reviews. Manage billing

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

PR Summary by Qodo

Repair pnpm lint and gate releases in CI

🐞 Bug fix ⚙️ Configuration changes 🕐 20-40 Minutes

Grey Divider

AI Description

• Restores ESLint by aligning TypeScript and Etherpad lint configuration versions.
• Adds reusable lint CI and requires it before release publication.
• Removes a dead import exposed by the repaired lint run.
Diagram

graph TD
  A["Repository push"] --> B["Test workflow"] --> C["Lint workflow"] --> D["Compatible toolchain"] --> E["Run ESLint"] --> F{"Lint passes?"} --> G["Release publication"]
Loading
High-Level Assessment

The selected approach is appropriate: pinning TypeScript to the latest supported major restores the legacy compiler API, while eslint-config-etherpad 5 enforces the compatibility range through peer dependencies. Patching transitive lint packages or adopting unsupported TypeScript 7 APIs would add maintenance risk without improving this repository.

Files changed (5) +304 / -475

Bug fix (1) +0 / -1
index.jsRemove unused Etherpad template import +0/-1

Remove unused Etherpad template import

• Drops the obsolete 'eejs' require now superseded by the plugin helper template API, satisfying the enabled 'no-unused-vars' rule without changing behavior.

index.js

Other (4) +304 / -474
lint.ymlAdd reusable ESLint workflow +35/-0

Add reusable ESLint workflow

• Introduces a reusable GitHub Actions workflow that configures Node.js and pnpm, restores the dependency cache, installs dependencies, and runs the repository lint script.

.github/workflows/lint.yml

test-and-release.ymlRequire linting before releases +4/-0

Require linting before releases

• Invokes the reusable lint workflow from the push pipeline. Adds the lint job to the release dependencies so publication cannot proceed after lint failure.

.github/workflows/test-and-release.yml

package.jsonAlign TypeScript and ESLint configuration versions +2/-2

Align TypeScript and ESLint configuration versions

• Upgrades 'eslint-config-etherpad' to 5.x and pins TypeScript to the supported 6.0 release line. This restores ESLint startup and makes unsupported future compiler upgrades fail peer-dependency validation.

package.json

pnpm-lock.yamlRegenerate the compatible lint dependency graph +263/-472

Regenerate the compatible lint dependency graph

• Locks TypeScript 6.0.3, eslint-config-etherpad 5.0.2, and the updated typescript-eslint ecosystem. Removes TypeScript 7 native platform packages and records the new transitive lint dependencies.

pnpm-lock.yaml

@qodo-free-for-open-source-projects

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)

Grey Divider

Great, no issues found!

Qodo reviewed your code and found no material issues that require review

Grey Divider

Tip of the day
💡 Did you know, you can turn on the rule miner and Qodo learns your standards from review history

More tips ↗ | Customize Qodo ↗ | Qodo docs ↗

Grey Divider

Qodo Logo

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
@JohnMcLear
JohnMcLear merged commit 198518a into main Sep 21, 2026
4 checks passed
@JohnMcLear
JohnMcLear deleted the ci/repair-lint branch September 21, 2026 08:15
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