-
Notifications
You must be signed in to change notification settings - Fork 8
/
eslint.config.mjs
43 lines (42 loc) · 1.18 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
import globals from "globals";
import js from "@eslint/js";
import tseslint from "typescript-eslint";
import svelte from "eslint-plugin-svelte";
import tsPlugin from "@typescript-eslint/eslint-plugin";
import svelteParser from "svelte-eslint-parser";
import tsParser from "@typescript-eslint/parser";
export default [
js.configs.recommended,
tseslint.configs.eslintRecommended,
...tseslint.configs.recommended,
...svelte.configs["flat/prettier"],
{
files: ["**/*.ts", "**/*.svelte", "**/*.mjs", "**/*.js"],
languageOptions: {
parser: tsParser,
globals: { ...globals.node },
sourceType: "module",
},
plugins: { "@typescript-eslint": tsPlugin },
rules: {
"no-undef": "off",
"no-unused-vars": "off",
"@typescript-eslint/no-unused-vars": ["error", { args: "none" }],
"@typescript-eslint/ban-ts-comment": "off",
"no-prototype-builtins": "off",
"@typescript-eslint/no-empty-function": "off",
},
},
{
files: ["**/*.svelte"],
languageOptions: {
parser: svelteParser,
parserOptions: {
parser: "@typescript-eslint/parser",
},
},
},
{
ignores: ["node_modules", "main.js"],
},
];