Skip to content

ci: harden CI workflow and add ESLint - #16

Merged
ni5arga merged 2 commits into
mainfrom
ci/harden-and-eslint
Jun 5, 2026
Merged

ci: harden CI workflow and add ESLint#16
ni5arga merged 2 commits into
mainfrom
ci/harden-and-eslint

Conversation

@ni5arga

@ni5arga ni5arga commented Jun 5, 2026

Copy link
Copy Markdown
Owner

What

Hardens the CI workflow and adds linting.

CI workflow (.github/workflows/ci.yml)

  • Node matrix — runs across Node 20, 22, 24 (with fail-fast: false so one version failing doesn't mask the others). Previously only Node 22.
  • Concurrency — cancels superseded runs on the same ref, saving CI minutes on rapid pushes.
  • Least-privilege tokenpermissions: contents: read instead of the broad default GITHUB_TOKEN.
  • Lint step — new npm run lint step in the pipeline.

ESLint

  • Adds eslint + typescript-eslint (flat config in eslint.config.js), with a lint script.
  • Allows intentionally-unused vars/args prefixed with _.

Drive-by fix

  • ESLint immediately caught an unused Platform import in src/sources/common.ts — removed.

Verification

All steps pass locally (lint, format:check, tsc --noEmit, 25 tests, build).

Note on the format-check / test failures reported separately: those syntax errors in src/llm/index.ts and src/report.ts were a transient uncommitted state and are already fixed on main (PR #15). They were genuine source errors correctly caught by CI, not a CI/CD problem.

🤖 Generated with Claude Code

- Run CI across Node 20, 22, and 24 via a build matrix
- Add concurrency group to cancel superseded runs on the same ref
- Restrict GITHUB_TOKEN to contents:read (least privilege)
- Add ESLint (flat config + typescript-eslint) with a lint step
- Fix the one issue the linter surfaced: drop an unused Platform import
@ni5arga
ni5arga force-pushed the ci/harden-and-eslint branch from 739a0d9 to 2549ed7 Compare June 5, 2026 08:50
Node's test runner only supports glob patterns from Node 21+, so the
quoted src/**/*.test.ts glob matched nothing on the Node 20 matrix leg.
Expand the file list with find instead, which works on all versions.
@ni5arga
ni5arga merged commit df0fa26 into main Jun 5, 2026
3 checks passed
@ni5arga
ni5arga deleted the ci/harden-and-eslint branch June 5, 2026 08:56
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