From 8d947cc900851e5ff7be17a965ff073db1fb0f97 Mon Sep 17 00:00:00 2001 From: Maurice Date: Tue, 17 Nov 2026 22:40:27 +0100 Subject: [PATCH] chore(lint): read the rule test's parser from typescript-eslint and drop a stale knip entry --- scripts/ci/knip-baseline.json | 1 - .../eslint-rules/transactions-through-unit-of-work.test.ts | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/ci/knip-baseline.json b/scripts/ci/knip-baseline.json index c1ab3a47a..2df174358 100644 --- a/scripts/ci/knip-baseline.json +++ b/scripts/ci/knip-baseline.json @@ -78,7 +78,6 @@ "server/src/nest/accommodations/night-seat.ts": 1, "server/src/nest/app-config/index.ts": 6, "server/src/nest/auth/auth.helpers.ts": 1, - "server/src/nest/backup/backup-archive.ts": 1, "server/src/nest/backup/backup.impl.ts": 3, "server/src/nest/budget/budget.service.ts": 1, "server/src/nest/day-notes/day-notes.service.ts": 1, diff --git a/server/tests/unit/eslint-rules/transactions-through-unit-of-work.test.ts b/server/tests/unit/eslint-rules/transactions-through-unit-of-work.test.ts index 3f1d49298..dada9c245 100644 --- a/server/tests/unit/eslint-rules/transactions-through-unit-of-work.test.ts +++ b/server/tests/unit/eslint-rules/transactions-through-unit-of-work.test.ts @@ -1,8 +1,8 @@ import transactionsThroughUnitOfWork from '../../../eslint-rules/transactions-through-unit-of-work.mjs'; -import tsParser from '@typescript-eslint/parser'; import { RuleTester, type Rule } from 'eslint'; import path from 'path'; +import tseslint from 'typescript-eslint'; // TXGATE: the rule reads the receiver's type, so the tester runs against a real // TypeScript program, the fixture project no-promise-as-value.test.ts uses @@ -13,7 +13,7 @@ const filename = path.join(fixtureRoot, 'file.ts'); const ruleTester = new RuleTester({ languageOptions: { - parser: tsParser, + parser: tseslint.parser, parserOptions: { project: './tsconfig.json', tsconfigRootDir: fixtureRoot,