-
Notifications
You must be signed in to change notification settings - Fork 27
Expand file tree
/
Copy patheslint.config.js
More file actions
54 lines (53 loc) · 1.15 KB
/
eslint.config.js
File metadata and controls
54 lines (53 loc) · 1.15 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
// eslint.config.js
import js from "@eslint/js";
import svelte from "eslint-plugin-svelte";
import svelteParser from "svelte-eslint-parser";
import tsParser from "@typescript-eslint/parser";
import globals from "globals";
import svelteConfig from "./svelte.config.js";
/** @type {import('eslint').Linter.Config[]} */
export default [
js.configs.recommended,
...svelte.configs.recommended,
{
ignores: [
".DS_Store",
"node_modules",
"/build",
"/.svelte-kit",
"/package",
".env",
".env.*",
"!/.env.example",
"pnpm-lock.yaml",
"package-lock.json",
"yarn.lock",
],
},
{
languageOptions: {
globals: {
...globals.browser,
...globals.node, // Add this if you are using SvelteKit in non-SPA mode
},
},
},
{
files: ["**/*.svelte"],
languageOptions: {
parser: svelteParser,
parserOptions: {
parser: {
ts: tsParser,
typescript: tsParser,
},
svelteConfig,
ecmaVersion: "latest",
sourceType: "module",
},
},
rules: {
"svelte/no-at-html-tags": "off",
},
},
];