-
-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy patheslint.config.js
57 lines (54 loc) · 1.32 KB
/
eslint.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
import pegasus from 'eslint-config-pegasus';
import svelte from 'eslint-plugin-svelte';
import prettier from 'eslint-config-prettier';
import tsParser from '@typescript-eslint/parser';
import pluginCypress from 'eslint-plugin-cypress';
import svelteConfig from './svelte.config.js';
/** @type {import("eslint").Linter.Config[]} */
const config = pegasus.tsConfig(
{
ignores: ['build/', '.svelte-kit/', 'dist/'],
},
pegasus.configs.default,
pegasus.configs.node,
pegasus.configs.browser,
prettier,
{
files: ['*.ts'],
extends: pegasus.configs.typescriptRecommended,
languageOptions: {
parserOptions: {
projectService: false,
project: './tsconfig.eslint.json',
tsconfigRootDir: import.meta.dirname,
},
},
},
{
name: 'overrides',
rules: {
'no-duplicate-imports': 'off',
},
},
{
files: ['**/*.svelte', '**/*.svelte.ts'],
extends: [
...pegasus.configs.typescript,
...svelte.configs['flat/recommended'],
prettier,
...svelte.configs['flat/prettier'],
],
languageOptions: {
parserOptions: {
parser: tsParser,
extraFileExtensions: ['.svelte'],
...svelteConfig,
},
},
},
{
files: ['e2e/**/*'],
extends: [pluginCypress.configs.recommended],
},
);
export default config;