Skip to content

chore(agent-runner): adopt eslint-config-agent (recommended-incremental) - #102

Open
tupe12334 wants to merge 1 commit into
mainfrom
chore/adopt-eslint-config-agent
Open

chore(agent-runner): adopt eslint-config-agent (recommended-incremental)#102
tupe12334 wants to merge 1 commit into
mainfrom
chore/adopt-eslint-config-agent

Conversation

@tupe12334

Copy link
Copy Markdown
Member

Closes #101

What

agent-runner/ is the only JavaScript in this repo and had no ESLint setup at allagent-runner/src/index.js was never linted. This wires in the shared eslint-config-agent config.

There was no prior config to migrate; this is a from-zero adoption.

Changes

File Change
agent-runner/package.json add eslint, eslint-config-agent, globals devDeps + a lint script
agent-runner/eslint.config.js new — wires in eslint-config-agent/recommended-incremental
agent-runner/pnpm-lock.yaml new — lockfile for the added devDeps
agent-runner/pnpm-workspace.yaml new — pins pnpm's allowBuilds decisions (see below)
.gitignore ignore node_modules/ (the existing file is Rust-oriented)

src/index.js is not modified — no behaviour change, no Rust code touched, no CI workflow touched.

Preset choice

Starting on eslint-config-agent/recommended-incremental (divisive strict rules disabled, everything else downgraded to warning). On this file that is 45 warnings, 0 errors, so pnpm lint exits 0 rather than landing a large behaviour-changing diff up front. The backlog is mostly no-console on the server's startup/lifecycle logging, unicorn/prevent-abbreviations on req/res/err, no-restricted-syntax on direct process.env access, and JSDoc formatting — all worth burning down separately, after which the preset can be promoted to recommended or the strict default.

Two small config accommodations, both commented inline:

  • Node globals. The shared config assumes browser globals, which would leave process/Buffer/console undefined under no-undef in this server.
  • react.version pinned. The shared config leaves eslint-plugin-react on "detect"; with no React installed here, detection fails and prints a warning on every run. No React rules actually apply.

pnpm-workspace.yaml is needed because pnpm 11 fails pnpm install with ERR_PNPM_IGNORED_BUILDS unless the transitively-pulled build scripts get an explicit decision. All three are declined — none is needed for linting.

Verification

Run locally from agent-runner/ against a clean node_modules:

  • pnpm install → exit 0
  • pnpm lint → exit 0 (45 warnings, 0 errors)
  • smoke test: node src/index.js still boots and POST /delegate still returns {"accepted":true,...}

Opened by the "Scout & wire eslint-config-agent adoption → Slack" moadim routine.

agent-runner is the only JavaScript in this repo and had no ESLint setup
at all, so src/index.js was never linted. Wire in the shared
eslint-config-agent config.

Starts on the recommended-incremental preset (divisive strict rules
disabled, everything else at warn level): it reports 45 warnings and 0
errors here, so `pnpm lint` exits 0 while the backlog stays visible.
Promote to `recommended` or the strict default once burned down.

Also ignores node_modules/, which the Rust-oriented .gitignore did not
cover, and pins pnpm's allowBuilds decisions so `pnpm install` does not
exit non-zero on ERR_PNPM_IGNORED_BUILDS.

No behaviour change: src/index.js is untouched.

Closes #101

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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.

Adopt eslint-config-agent in agent-runner (currently no ESLint at all)

1 participant