Skip to content

fix: enforce ESLint in CI and add a check-only lint script (#101) - #111

Open
Marvelg256 wants to merge 1 commit into
StepFi-app:mainfrom
Marvelg256:fix/101-enforce-eslint-ci
Open

fix: enforce ESLint in CI and add a check-only lint script (#101)#111
Marvelg256 wants to merge 1 commit into
StepFi-app:mainfrom
Marvelg256:fix/101-enforce-eslint-ci

Conversation

@Marvelg256

Copy link
Copy Markdown

Problem

The @typescript-eslint/no-explicit-any rule is set to error in .eslintrc.js, and context/code-standards.md states it is "enforced by ESLint, not just documentation." However, CI had no lint step — only npm ci, npm run build, and npm test. A PR reintroducing any passed CI cleanly.

The existing lint script used --fix, which rewrites files locally and does not reliably exit non-zero on violations it cannot auto-fix. There was no check-only variant for CI.

The codebase is currently clean (all 32 explicit any usages removed on 2026-07-16, zero found in src/ today), but this was unprotected.

Changes

package.json

  • Added lint:check script: eslint "{src,apps,libs,test}/**/*.ts" --max-warnings=0 (no --fix)
  • lint script with --fix kept untouched for local developer use

.github/workflows/ci.yml

  • Added Lint step (npm run lint:check) after Install dependencies and before Build, so a lint failure reports quickly

context/progress-tracker.md

  • Entry for 2026-07-28 describing the change and why

Acceptance criteria verification

Criterion Result
npm run lint:check exits non-zero when any in src/ ✅ Exits 1 (verified: added const x: any = 1 to src/app.module.ts, got @typescript-eslint/no-explicit-any error, exit 1)
npm run lint:check does not modify files ✅ No --fix flag
CI runs lint:check on every PR to main ✅ Added as step in ci.yml (on: pull_request: [main])
Existing lint with --fix still works ✅ Unchanged
No ESLint rules added/removed/changed ✅ Scripts and CI only
Build passes npm run build exits 0
All tests pass ✅ 345/345 pass
No pre-existing violations npm run lint:check exits 0 before changes

Evidence that a violation fails CI

Locally verified by temporarily introducing const x: any = 1 into src/app.module.ts and running npm run lint:check:

/workspaces/StepFi-API/src/app.module.ts
  92:10  error  Unexpected any. Specify a different type  @typescript-eslint/no-explicit-any

✖ 1 problem (1 error, 0 warnings)

Exit code: 1 — the step will fail CI.

Closes #101

@Marvelg256
Marvelg256 requested a review from EmeditWeb as a code owner July 29, 2026 00:05
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.

fix: enforce ESLint in CI and add a check-only lint script

1 participant