Skip to content

Commit 727669f

Browse files
committed
Migrated eslint to new flat config
1 parent f690c32 commit 727669f

File tree

4 files changed

+51
-46
lines changed

4 files changed

+51
-46
lines changed

examples/with-sveltekit/.eslintignore

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

examples/with-sveltekit/.eslintrc.cjs

Lines changed: 0 additions & 26 deletions
This file was deleted.
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
import js from '@eslint/js';
2+
import ts from 'typescript-eslint';
3+
import svelte from 'eslint-plugin-svelte';
4+
import prettier from 'eslint-config-prettier';
5+
import globals from 'globals';
6+
7+
export default [
8+
{
9+
ignores: [
10+
'.DS_Store',
11+
'node_modules/',
12+
'build/',
13+
'.svelte-kit/',
14+
'package/',
15+
'dist/',
16+
'.env',
17+
'.env.*',
18+
'!.env.example',
19+
'pnpm-lock.yaml',
20+
'package-lock.json',
21+
'yarn.lock'
22+
]
23+
},
24+
js.configs.recommended,
25+
...ts.configs.recommended,
26+
...svelte.configs['flat/recommended'],
27+
prettier,
28+
...svelte.configs['flat/prettier'],
29+
{
30+
languageOptions: {
31+
globals: {
32+
...globals.browser,
33+
...globals.node
34+
}
35+
}
36+
},
37+
{
38+
files: ['**/*.svelte'],
39+
languageOptions: {
40+
parserOptions: {
41+
parser: ts.parser
42+
}
43+
}
44+
}
45+
];

packages/svelte-reveal/eslint.config.mjs

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
import tseslint from '@typescript-eslint/eslint-plugin';
2-
import tsParser from '@typescript-eslint/parser';
3-
import eslint from '@eslint/js';
1+
import js from '@eslint/js';
2+
import ts from 'typescript-eslint';
43
import turbo from 'eslint-config-turbo';
54
import prettier from 'eslint-config-prettier';
65

@@ -33,14 +32,14 @@ export default [
3332
'**/next-env.d.ts'
3433
]
3534
},
36-
eslint.configs.recommended,
37-
...tseslint.configs.recommended,
35+
js.configs.recommended,
36+
...ts.configs.recommended,
3837
turbo,
3938
prettier,
4039
{
41-
plugins: { '@typescript-eslint': typescriptEslint },
40+
plugins: { '@typescript-eslint': ts.plugin },
4241
languageOptions: {
43-
parser: tsParser,
42+
parser: ts.parser,
4443
ecmaVersion: 'latest',
4544
sourceType: 'module'
4645
}

0 commit comments

Comments
 (0)