Skip to content

Commit e68067e

Browse files
Merge pull request #15 from sveltejs/no-lib-eslint-rul
2 parents a35d72c + 8258a1c commit e68067e

File tree

2 files changed

+18
-1
lines changed

2 files changed

+18
-1
lines changed

eslint.config.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,23 @@ export default ts.config(
3535
'func-style': ['error', 'declaration', { allowTypeAnnotation: true }],
3636
},
3737
},
38+
{
39+
files: ['./src/lib/**/*'],
40+
rules: {
41+
'no-restricted-imports': [
42+
'error',
43+
{
44+
patterns: [
45+
{
46+
group: ['$lib'],
47+
message:
48+
"Since we will build the mcp server with typescript we can't use `$lib` imports here, please import with relative paths",
49+
},
50+
],
51+
},
52+
],
53+
},
54+
},
3855
{
3956
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
4057
languageOptions: {

src/lib/parse/parse.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import type { TSESTree } from '@typescript-eslint/types';
22
import { describe, expect, it } from 'vitest';
3-
import { walk } from '$lib/index.js';
3+
import { walk } from '../index.js';
44
import { parse, type ParseResult } from './parse.js';
55

66
// ----------------------------------------------------------------------

0 commit comments

Comments
 (0)