From 5aa2827c9171d434a4e1d90a5aa6a5e30a6430a0 Mon Sep 17 00:00:00 2001 From: paoloricciuti Date: Mon, 22 Sep 2025 10:00:37 +0200 Subject: [PATCH 1/2] chore: add eslint to prevent importing with `$lib` inthe lib folder --- eslint.config.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/eslint.config.js b/eslint.config.js index f392a2b..80f4bbb 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -35,6 +35,23 @@ export default ts.config( 'func-style': ['error', 'declaration', { allowTypeAnnotation: true }], }, }, + { + files: ['./src/lib/**/*'], + rules: { + 'no-restricted-imports': [ + 'error', + { + patterns: [ + { + group: ['$lib'], + message: + "Since we will build the mcp server with typescript we can't use `$lib` imports here, please import with relative paths", + }, + ], + }, + ], + }, + }, { files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'], languageOptions: { From 8258a1c9ba09ef4d0abe97be071c2910b1c591eb Mon Sep 17 00:00:00 2001 From: paoloricciuti Date: Mon, 22 Sep 2025 10:33:35 +0200 Subject: [PATCH 2/2] fix: lint --- src/lib/parse/parse.spec.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/parse/parse.spec.ts b/src/lib/parse/parse.spec.ts index 1cbb9fd..17e08d4 100644 --- a/src/lib/parse/parse.spec.ts +++ b/src/lib/parse/parse.spec.ts @@ -1,6 +1,6 @@ import type { TSESTree } from '@typescript-eslint/types'; import { describe, expect, it } from 'vitest'; -import { walk } from '$lib/index.js'; +import { walk } from '../index.js'; import { parse, type ParseResult } from './parse.js'; // ----------------------------------------------------------------------