-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy patheslint.config.js
More file actions
61 lines (60 loc) · 1.35 KB
/
eslint.config.js
File metadata and controls
61 lines (60 loc) · 1.35 KB
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
import eslint from "@eslint/js";
import svelte from "eslint-plugin-svelte";
import globals from "globals";
import tseslint from "typescript-eslint";
export default tseslint.config(
{
ignores: [
".svelte-kit/**",
"build/**",
"node_modules/**",
"dist/**",
"coverage/**",
".alchemy/**",
".wrangler/**",
".output/**",
".vercel/**",
".netlify/**",
],
},
eslint.configs.recommended,
...tseslint.configs.recommended,
...svelte.configs["flat/recommended"],
{
languageOptions: {
globals: { ...globals.browser, ...globals.node },
},
rules: {
"@typescript-eslint/no-unused-vars": [
"error",
{
argsIgnorePattern: "^_",
varsIgnorePattern: "^_",
caughtErrorsIgnorePattern: "^_",
},
],
// SvelteKit apps mix internal routes, anchors, and external URLs; `resolve()` is optional.
"svelte/no-navigation-without-resolve": "off",
"svelte/require-each-key": "warn",
"svelte/no-at-html-tags": "warn",
"svelte/prefer-svelte-reactivity": "off",
"svelte/no-unused-svelte-ignore": "warn",
"svelte/no-useless-mustaches": "warn",
},
},
{
files: ["**/*.svelte"],
rules: {
// Common with `bind:this` / forwarded refs
"no-useless-assignment": "off",
},
},
{
files: ["**/*.svelte", "**/*.svelte.ts"],
languageOptions: {
parserOptions: {
parser: tseslint.parser,
},
},
},
);