Skip to content

feat(jobnik-e2e): lint and format the e2e suite for the first time - #14

Open
CptSchnitz wants to merge 3 commits into
migration/11-knipfrom
migration/12-e2e-lint
Open

feat(jobnik-e2e): lint and format the e2e suite for the first time#14
CptSchnitz wants to merge 3 commits into
migration/11-knipfrom
migration/12-e2e-lint

Conversation

@CptSchnitz

@CptSchnitz CptSchnitz commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Wires the e2e workspace into the same lint and format tasks every
other workspace already has: eslint.config.mjs, and the
format/format:fix/lint/lint:fix scripts (plus the
prelint/prelint:fix hooks), matching the shape used by
jobnik-manager, jobnik-openapi and jobnik-sdk.

Running the formatter against the current tree makes no changes — the
suite already conforms to the shared prettier config — so there is no
separate reformatting commit; that's noted in the wiring commit itself.

The lint pass then surfaces 58 findings across the suite, its first
time being linted. eslint --fix clears most of them (blank-line
padding, import type, import ordering, array-type syntax, redundant
type arguments and non-null assertions). The rest are fixed by hand in
a separate commit: a naming-convention rename, a magic-number
extraction, ?? over ||, and a few dead local bindings (unused
destructured tasks, an ApiClient variable never called, one of which
shadowed a module-level import).

No dependency version changed — only new devDependencies
(eslint, @map-colonies/eslint-config, @map-colonies/prettier-config,
prettier, @vitest/eslint-plugin) needed to run the new tasks.

Verified: pnpm turbo run format lint type-check passes for every
workspace, and the full e2e suite (9 files, 24 tests) passes against a
manager image built from this checkout via docker compose.

Ticket: .scratch/monorepo-migration/issues/12-e2e-lint-adoption.md

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com


Stack created with GitHub Stacks CLIGive Feedback 💬

@CptSchnitz CptSchnitz changed the title migration/12 e2e lint feat(jobnik-e2e): lint and format the e2e suite for the first time Aug 24, 2026
@github-actions

github-actions Bot commented Aug 24, 2026

Copy link
Copy Markdown

Coverage Report for apps/jobnik-manager

Status Category Percentage Covered / Total
🟢 Lines 100% (🎯 80%) 750 / 750
🟢 Statements 100% (🎯 80%) 767 / 767
🟢 Functions 100% (🎯 80%) 112 / 112
🟢 Branches 100% (🎯 80%) 219 / 219
File CoverageNo changed files found.
Generated in workflow #17 for commit cb6d915 by the Vitest Coverage Report Action

CptSchnitz and others added 3 commits August 26, 2026 11:15
Add the eslint and prettier scripts and config every other workspace
already carries (format, format:fix, lint, lint:fix, the pre-lint/
pre-lint:fix hooks, eslint.config.mjs). No workspace is exempt from
the single-entry-point lint/format tasks anymore.

Running the formatter against the current tree makes no changes: the
suite's files already conform to the shared prettier config, so there
is no reformatting commit to follow this one.

New devDependencies only (eslint, @map-colonies/eslint-config,
@map-colonies/prettier-config, prettier, @vitest/eslint-plugin) — no
existing dependency version changed.

Ticket: .scratch/monorepo-migration/issues/12-e2e-lint-adoption.md

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The e2e suite had never been linted. `eslint --fix` cleared most of
the 58 findings (padding-around-all, consistent-type-imports,
import-x/order, array-type, unnecessary-type-arguments,
unnecessary-type-assertion); the rest are fixed by hand:

- infrastructure/constants.ts: PRIORITIES renamed to satisfy
  naming-convention (UPPER_CASE for an exported constant).
- infrastructure/data.ts: the magic-number 6 (faker's random-suffix
  length) is now a named constant.
- infrastructure/sdk.ts: prefer ?? over || for the base-URL fallback.
- tests/multipleStagesWorkflow.spec.ts, priority.spec.ts,
  sharedStageTypes.spec.ts: dropped unused local bindings (task2/
  task3 destructured but never read; an ApiClient never called in
  two tests, shadowing the module-level opentelemetry import in
  sharedStageTypes.spec.ts).

No dependency version changed. Verified with the full suite running
against a manager image built from this checkout (docker compose):
9 files, 24 tests, all passing.

Ticket: .scratch/monorepo-migration/issues/12-e2e-lint-adoption.md

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…onfig

Every other workspace ignores @map-colonies/prettier-config for knip
since it's only referenced via the root .prettierrc string-extends,
which knip can't trace back to a package.json dependency. The e2e
workspace was missing the same entry, and the failure only surfaced
now that the manager's own knip false positive (migration/11-knip) is
fixed and knip can get past it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@CptSchnitz
CptSchnitz force-pushed the migration/12-e2e-lint branch from 635e43b to cb6d915 Compare August 26, 2026 08:17
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