-
Notifications
You must be signed in to change notification settings - Fork 4
/
eslint.config.mjs
76 lines (68 loc) · 1.79 KB
/
eslint.config.mjs
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
import tseslint from "typescript-eslint";
import eslintPluginSvelte from "eslint-plugin-svelte";
import globals from "globals";
import svelteParser from "svelte-eslint-parser";
import eslint from "@eslint/js";
import svelteConfig from "./svelte.config.js";
export default tseslint.config(
{
ignores: [
"**/.DS_Store",
"**/node_modules",
"build",
".svelte-kit",
"package",
"**/.env",
"**/.env.*",
"!**/.env.example",
"**/pnpm-lock.yaml",
"**/package-lock.json",
"**/yarn.lock"
]
},
eslint.configs.recommended,
...tseslint.configs.recommended,
...eslintPluginSvelte.configs["flat/prettier"],
{
plugins: {
"@typescript-eslint": tseslint.plugin
},
languageOptions: {
globals: {
...globals.browser,
...globals.node
},
parser: tseslint.parser,
ecmaVersion: 2020,
sourceType: "module"
},
rules: {
"svelte/sort-attributes": "warn",
"svelte/shorthand-directive": [
"warn",
{
prefer: "always"
}
]
}
},
{
files: ["**/*.svelte"],
languageOptions: {
parser: svelteParser,
ecmaVersion: 5,
sourceType: "script",
parserOptions: {
parser: tseslint.parser,
svelteConfig
}
}
},
{
files: ["**/*.ts", "**/*.mts", "**/*.cts", "**/*.tsx", "**/*.svelte"],
rules: {
"no-undef": "off",
"@typescript-eslint/no-explicit-any": "off"
}
}
);