Skip to content

feat: upgraded eslint config to v8#244

Merged
ronenkapelian merged 5 commits into
masterfrom
upgrade-eslint-8-9
Jun 21, 2026
Merged

feat: upgraded eslint config to v8#244
ronenkapelian merged 5 commits into
masterfrom
upgrade-eslint-8-9

Conversation

@ronenkapelian

Copy link
Copy Markdown
Collaborator

What

Upgrade @map-colonies/eslint-config from v7 to v8 and align the codebase with the new stricter rules.

Changes

  • Bump @map-colonies/eslint-config to ^8.0.0
  • Remove jestConfig from eslint.config.mjs — not applicable for vitest projects
  • Add "types": ["node"] to scripts/tsconfig.json to resolve node built-in type definitions
  • Replace direct body-parser import with express.json() in serverBuilder.tsbody-parser is a transitive dependency, flagged by the new import-x/no-extraneous-dependencies rule
  • Apply import type across source and test files to satisfy the stricter @typescript-eslint/consistent-type-imports rule enforced by v8:
    • src/app.ts, src/index.ts, src/containerConfig.ts
    • src/common/dependencyRegistration.ts
    • src/api/v1/jobs/router.ts, stages/router.ts, tasks/router.ts
    • Integration test specs and helpers

@ronenkapelian ronenkapelian requested a review from CptSchnitz June 3, 2026 13:40
@ronenkapelian ronenkapelian self-assigned this Jun 3, 2026
@ronenkapelian ronenkapelian requested a review from Copilot June 3, 2026 13:40
@github-actions

github-actions Bot commented Jun 3, 2026

Copy link
Copy Markdown

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 100% (🎯 80%) 765 / 765
🔵 Statements 100% (🎯 80%) 782 / 782
🔵 Functions 100% (🎯 80%) 111 / 111
🔵 Branches 100% (🎯 80%) 217 / 217
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/app.ts 100% 100% 100% 100%
src/containerConfig.ts 100% 100% 100% 100%
src/serverBuilder.ts 100% 100% 100% 100%
src/api/v1/jobs/router.ts 100% 100% 100% 100%
src/api/v1/stages/router.ts 100% 100% 100% 100%
src/api/v1/tasks/router.ts 100% 100% 100% 100%
src/common/errors.ts 100% 100% 100% 100%
src/stages/models/helper.ts 100% 100% 100% 100%
src/tasks/models/helper.ts 100% 100% 100% 100%
src/tasks/models/taskStateMachine.ts 100% 100% 100% 100%
Generated in workflow #737 for commit f527b71 by the Vitest Coverage Report Action

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Upgrades @map-colonies/eslint-config to v8 and updates the codebase to comply with stricter lint rules (notably consistent type-only imports and dependency import constraints), plus a small Express middleware adjustment to avoid a transitive dependency import.

Changes:

  • Bump @map-colonies/eslint-config to ^8.0.0 (lockfile updated accordingly).
  • Apply type-only import hygiene across source and test files (import type / inline type imports).
  • Replace body-parser JSON middleware usage with Express’s built-in JSON middleware.

Reviewed changes

Copilot reviewed 39 out of 40 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tests/unit/tasks/tasks.spec.ts Switch model import to import type for lint compliance.
tests/unit/stages/stages.spec.ts Split runtime vs type imports (logger/models/generator) for stricter lint rules.
tests/unit/stages/repository.spec.ts Convert UpdateSummaryCount import to type-only.
tests/unit/stages/helpers.spec.ts Convert stage model imports to type-only.
tests/unit/jobs/jobs.spec.ts Split runtime vs type imports (logger/models) for lint compliance.
tests/unit/generator.ts Separate Prisma value imports (enums) from Prisma type imports.
tests/integration/tasks/tasks.spec.ts Make request sender/model imports type-safe (type RequestSender, import type models).
tests/integration/tasks/helpers.ts Convert TaskPrismaObject import to type-only.
tests/integration/stages/stages.spec.ts Make request sender and stage model imports type-only where appropriate.
tests/integration/stages/helpers.ts Convert prisma model imports to type-only.
tests/integration/jobs/jobs.spec.ts Make request sender and job model imports type-only where appropriate.
tests/integration/jobs/helpers.ts Adjust Prisma-related imports toward type-only usage for lint compliance.
tests/integration/docs/docs.spec.ts Convert PrismaClient import to type-only.
tests/integration/common/utils.ts Consolidate Prisma types and test helper typing imports.
tests/configurations/integration/globalSetup.ts Split Config into type-only import while keeping runtime utils as value imports.
src/tasks/models/taskStateMachine.ts Split Snapshot into a type-only import from xstate.
src/tasks/models/models.ts Convert Prisma import to type-only.
src/tasks/models/helper.ts Convert Snapshot, Prisma, and internal model imports to type-only.
src/stages/models/models.ts Convert multiple imports to type-only to match stricter rules.
src/stages/models/helper.ts Convert stage model imports to type-only.
src/serverBuilder.ts Replace body-parser usage with Express JSON middleware.
src/jobs/models/models.ts Convert Prisma import to type-only.
src/index.ts Prefer node: built-in import style and convert some imports to type-only.
src/db/helpers.ts Convert schema type import to type-only.
src/db/createConnection.ts Convert schema type import to type-only.
src/containerConfig.ts Convert several imports to type-only for lint compliance.
src/common/utils/error-express-handler.ts Convert Express types to type-only import.
src/common/serviceMetrics.ts Convert Registry to type-only import while keeping runtime Gauge.
src/common/errors.ts Convert Prisma-generated status imports to type-only.
src/common/dependencyRegistration.ts Separate tsyringe runtime import from type-only provider imports.
src/common/constants.ts Convert type-fest and OpenAPI schema imports to type-only.
src/app.ts Convert Express/Prisma/container types to type-only imports.
src/api/v1/tasks/router.ts Convert FactoryFunction import to type-only.
src/api/v1/stages/router.ts Convert FactoryFunction import to type-only.
src/api/v1/jobs/router.ts Convert FactoryFunction import to type-only.
src/api/v1/index.ts Convert FactoryFunction import to type-only.
scripts/tsconfig.json Add Node types to scripts TS config.
scripts/generateVersionedOpenApi.mts Prefer node: built-in imports and simplify operationId guard logic.
package.json Bump eslint config dependency to v8.
package-lock.json Lockfile updates for eslint-config v8.x and new transitive deps.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread tests/integration/jobs/helpers.ts
Comment thread tests/integration/common/utils.ts
Comment thread src/serverBuilder.ts Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 43 out of 44 changed files in this pull request and generated no new comments.

Comment thread src/common/dependencyRegistration.ts Outdated
@ronenkapelian ronenkapelian merged commit f22f2a3 into master Jun 21, 2026
10 of 11 checks passed
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.

3 participants