chore(ci): ESLint flat config + CI gate (P5-L)#85
Merged
Conversation
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>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Part of architect audit issue #73 — iteration P5-L.
Summary
eslint.config.js(flat config) with high-signal rules: no-unused-vars, eqeqeq, no-console (outside tests), prefer-const, no-var.npm run lint+npm run lint:fixscripts.npm run lintstep ahead of vitest.viimports, stale eslint-disable directives).Test plan
npm run lint→ 0 errors / 0 warnings.This code proudly made in Nebraska. GO BIG RED! 🌽 https://xkcd.com/2347/