OpenConceptLab/ocl_issues#2838 | Pull requests run the Eslint job, and npm run eslint lints .jsx - #52
Conversation
…d npm run eslint lints .jsx Lint ran only in build.yml, which runs on manual dispatch, so a pull request showed no lint result before it merged. - .github/workflows/pr.yml runs build.yml's Eslint job steps unchanged on every pull_request (Node 14; read-only token; a newer push cancels the older run). build.yml is untouched. - package.json's eslint script adds --ext .jsx,.js; without it ESLint lints only .js files, so npm run eslint skipped every .jsx. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Lkm1wDY1zKSDTm2apzPJLi
paynejd
left a comment
There was a problem hiding this comment.
Claude review subagent: stand-in until the Codex pass runs (commit 53f7793)
Codex was at its usage limit, so a read-only Claude Code review subagent reviewed this PR first. The Codex adversarial review will be posted separately, and the PR waits for it before merging.
Outcome: No issues found.
Verdict: I found no real issues.
What I checked:
- Steps match build.yml. I ran
diffon build.yml:21-41 against pr.yml:18-38 and they are byte-for-byte identical: checkout, the start-prod.sh secret-shape guard, setup-node 14 with npm cache,npm ci, andeslint.js --ext .jsx,.js src/. The job id and name (eslint/ "Eslint") also match. build.yml is not in the diff. - Fork and branch safety. The trigger is plain
pull_request, notpull_request_target.permissions: contents: readis set at the top level, and nothing referencessecrets.*orenvironment:. Nothing pushes, builds an image or deploys. A fork PR gets a read-only token and no secrets. - Concurrency.
pr-checks-${{ github.event.pull_request.number }}is always set onpull_requestevents and is scoped to one PR, so a new push cancels the older run. It can't collide with build.yml'srelease-${{ github.ref }}group. - Double-run. None. build.yml only runs on
workflow_dispatch. - Script change. Nothing in the repo (excluding node_modules) calls
npm run eslint: no Dockerfile step, husky or lint-staged hook, or doc. The Dockerfile only runsnpm run build. README.md:18 callseslintdirectly and is unaffected. - ESLint 4 and
--extafter the path. The lockfile pins eslint 4.19.1. I installed 4.19.1 in the scratchpad and tested it:eslint ./srclints onlya.js, whileeslint ./src --ext .jsx,.jslints botha.jsandb.jsx. So--extworks after the path. - YAML. pr.yml parses cleanly with Ruby's YAML parser. The
on:key loading astrueis normal for GitHub workflows.
Non-blocking note: checkout@v3, setup-node@v3 and Node 14 are old and deprecated. That is inherited on purpose from build.yml, because the ticket requires identical steps, so it is not a defect in this change.
paynejd
left a comment
There was a problem hiding this comment.
Codex adversarial review, pass 1 (codex-cli 0.158, commit 53f7793)
Scope: origin/master...HEAD, including build.yml and the new pr.yml. Read-only run. The report below is verbatim.
Outcome: Clean.
No real issues found.
The lint jobs are structurally identical; build.yml, including deploy jobs, is unchanged. YAML parses successfully. PR concurrency is independent of the release group, and the manual-only build trigger prevents automatic double-runs. No repo callers conflict with the eslint script change.
The PR workflow references no secrets, grants only contents: read, and contains no push steps or pull_request_target, consistent with GitHub’s PR security model.
No files modified. Lint wasn’t executed; dependencies aren’t installed.
Part of OpenConceptLab/ocl_issues#2838 (oclweb2). The same change as OpenConceptLab/oclmap#84 and OpenConceptLab/oclweb3#57.
Summary
Lint ran only in
build.yml, which runs on manual dispatch, so a pull request showed no lint result before it merged.Change
.github/workflows/pr.yml(new): runsbuild.yml's "Eslint" job steps, unchanged, on everypull_request:start-prod.shsecret checknpm ci./node_modules/eslint/bin/eslint.js --ext .jsx,.js src/It has a read-only token, and a newer push to the same PR cancels the older run.
build.ymlis untouched.package.json: theeslintscript adds--ext .jsx,.js. Without it ESLint lints only.jsfiles, sonpm run eslintskipped every.jsxfile.Test plan
build.yml's "Eslint" job (diffed).node:14(amd64, because node-sass 4 doesn't build on current Node):npm cipasses../node_modules/eslint/bin/eslint.js --ext .jsx,.js src/is clean.npm run eslintnow reports an unused import in a throwaway.jsxfile.🤖 Generated with Claude Code
https://claude.ai/code/session_01Lkm1wDY1zKSDTm2apzPJLi