Skip to content

Commit 4a100d4

Browse files
authored
fix: eslint setup (#59)
* fix eslint setup * improve config * improve setup * minor config improvements
1 parent 1a82277 commit 4a100d4

File tree

6 files changed

+1691
-87
lines changed

6 files changed

+1691
-87
lines changed

eslint.config.js

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,38 @@
11
import { includeIgnoreFile } from '@eslint/compat';
22
import js from '@eslint/js';
33
import prettier from 'eslint-config-prettier';
4-
import svelte from 'eslint-plugin-svelte';
54
import globals from 'globals';
65
import { fileURLToPath } from 'node:url';
76
import ts from 'typescript-eslint';
87

9-
import svelteConfig from './svelte.config.js';
10-
118
const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url));
129

1310
export default ts.config(
1411
includeIgnoreFile(gitignorePath),
1512
js.configs.recommended,
1613
...ts.configs.recommended,
17-
...svelte.configs.recommended,
1814
prettier,
19-
...svelte.configs.prettier,
2015
{
2116
languageOptions: {
22-
globals: { ...globals.browser, ...globals.node }
17+
globals: { ...globals.browser, ...globals.node },
18+
parserOptions: {
19+
projectService: {
20+
allowDefaultProject: ['*.js', '*.ts']
21+
},
22+
ecmaVersion: 'latest',
23+
sourceType: 'module'
24+
}
2325
},
26+
files: ['**/*.{js,ts,mjs,cjs}'],
2427
rules: {
25-
'svelte/no-navigation-without-resolve': [
28+
// Add project-specific rules here
29+
'@typescript-eslint/no-unused-vars': [
2630
'error',
2731
{
28-
ignorePushState: true
32+
argsIgnorePattern: '^_',
33+
varsIgnorePattern: '^_'
2934
}
3035
]
3136
}
32-
},
33-
{
34-
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
35-
languageOptions: {
36-
parserOptions: {
37-
projectService: true,
38-
extraFileExtensions: ['.svelte'],
39-
parser: ts.parser,
40-
svelteConfig
41-
}
42-
}
4337
}
4438
);

index.html

Lines changed: 0 additions & 12 deletions
This file was deleted.

0 commit comments

Comments
 (0)