Skip to content

chore(ci): ESLint flat config + CI gate (P5-L)#85

Merged
CryptoJones merged 1 commit into
masterfrom
feat/eslint-ci-gate
May 18, 2026
Merged

chore(ci): ESLint flat config + CI gate (P5-L)#85
CryptoJones merged 1 commit into
masterfrom
feat/eslint-ci-gate

Conversation

@CryptoJones
Copy link
Copy Markdown
Owner

Part of architect audit issue #73 — iteration P5-L.

Summary

  • New eslint.config.js (flat config) with high-signal rules: no-unused-vars, eqeqeq, no-console (outside tests), prefer-const, no-var.
  • Per-file variants for migrations (sequelize-cli arg convention) and tests (relaxed).
  • npm run lint + npm run lint:fix scripts.
  • GitHub Actions + Woodpecker both gain a npm run lint step ahead of vitest.
  • Cleaned 4 pre-existing warnings (unused vi imports, stale eslint-disable directives).

Test plan

  • npm run lint → 0 errors / 0 warnings.
  • Full suite: 401 pass / 4 skip.
  • CI runs verify the gate fires on subsequent PRs.

This code proudly made in Nebraska. GO BIG RED! 🌽 https://xkcd.com/2347/

Architect audit P5-L. Lint the codebase on every PR before tests run.

ESLint config: high-signal rules, minimal style noise
- no-unused-vars (warn on tests; opt-out via leading underscore)
- eqeqeq (always, null-tolerant)
- no-console (only error/warn allowed outside tests; pino is the
  logger everywhere else)
- prefer-const
- no-var

Per-file variants
- `app/migrations/**` permits unused args so sequelize-cli's
  `(queryInterface, Sequelize)` signature doesn't trip the rule.
- `tests/**` relaxes no-unused-vars to a warning and allows
  console.* (test failure-path debugging output).
- `scripts/**` falls back to recommended defaults — these are
  one-shots, not load-bearing code.

CI wiring
- `.github/workflows/test.yml` adds an `npm run lint` step before
  `npm test`.
- `.woodpecker.yml` mirrors the same on both Node 20 and 22
  matrices.

Codebase cleanup along the way
- 4 pre-existing warnings fixed: unused `vi` imports in two test
  files, two stale `eslint-disable no-console` directives in the
  integration test (the rule was already off for tests).

Scripts
- `npm run lint` runs the gate.
- `npm run lint:fix` autofixes the rules eslint can.

Tests
- `npm run lint` passes clean (0 errors / 0 warnings).
- Full suite: 401 pass / 4 skip.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@CryptoJones CryptoJones merged commit 2d17ee6 into master May 18, 2026
3 checks passed
@CryptoJones CryptoJones deleted the feat/eslint-ci-gate branch May 18, 2026 05: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.

1 participant