From 517fa21e2f9a477c49efbc12beb2901fcfdde589 Mon Sep 17 00:00:00 2001 From: Maurice Date: Sat, 10 Oct 2026 20:30:16 +0200 Subject: [PATCH] build: prettier leaves side-effect imports where they are The sort-imports plugin moved bare imports along with the rest, which on src/index.ts would have put reflect-metadata after the modules that need it and the env validation ahead of dotenv. With importOrderSideEffects off, a side-effect import stays in place and the imports between two of them are sorted on their own. The three test files that were already formatted gain the blank line the new grouping writes after reflect-metadata. --- server/.prettierrc | 3 ++- server/tests/unit/nest-mcp/discovery.test.ts | 1 + server/tests/unit/nest-mcp/error-mapper.test.ts | 1 + server/tests/unit/nest-mcp/tool-gate.test.ts | 1 + shared/.prettierrc | 3 ++- 5 files changed, 7 insertions(+), 2 deletions(-) diff --git a/server/.prettierrc b/server/.prettierrc index 7a664f6b6..0e5bfb4d7 100644 --- a/server/.prettierrc +++ b/server/.prettierrc @@ -14,5 +14,6 @@ "importOrderParserPlugins": [ "typescript", "decorators-legacy" - ] + ], + "importOrderSideEffects": false } diff --git a/server/tests/unit/nest-mcp/discovery.test.ts b/server/tests/unit/nest-mcp/discovery.test.ts index 53b19b928..c3b721762 100644 --- a/server/tests/unit/nest-mcp/discovery.test.ts +++ b/server/tests/unit/nest-mcp/discovery.test.ts @@ -4,6 +4,7 @@ import { Injectable, Module } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import 'reflect-metadata'; + import { afterEach, describe, expect, it } from 'vitest'; import { z } from 'zod'; diff --git a/server/tests/unit/nest-mcp/error-mapper.test.ts b/server/tests/unit/nest-mcp/error-mapper.test.ts index bfaf5da79..565979150 100644 --- a/server/tests/unit/nest-mcp/error-mapper.test.ts +++ b/server/tests/unit/nest-mcp/error-mapper.test.ts @@ -11,6 +11,7 @@ import { Module } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import 'reflect-metadata'; + import { afterEach, describe, expect, it } from 'vitest'; import { z } from 'zod'; diff --git a/server/tests/unit/nest-mcp/tool-gate.test.ts b/server/tests/unit/nest-mcp/tool-gate.test.ts index 902f7346a..07bce2bb3 100644 --- a/server/tests/unit/nest-mcp/tool-gate.test.ts +++ b/server/tests/unit/nest-mcp/tool-gate.test.ts @@ -13,6 +13,7 @@ import { Injectable, Module } from '@nestjs/common'; import { Test } from '@nestjs/testing'; import 'reflect-metadata'; + import { afterEach, describe, expect, it, vi } from 'vitest'; import { z } from 'zod'; diff --git a/shared/.prettierrc b/shared/.prettierrc index 7a664f6b6..0e5bfb4d7 100644 --- a/shared/.prettierrc +++ b/shared/.prettierrc @@ -14,5 +14,6 @@ "importOrderParserPlugins": [ "typescript", "decorators-legacy" - ] + ], + "importOrderSideEffects": false }