-
-
Notifications
You must be signed in to change notification settings - Fork 252
Expand file tree
/
Copy patheslint.config.mjs
More file actions
67 lines (64 loc) · 1.95 KB
/
eslint.config.mjs
File metadata and controls
67 lines (64 loc) · 1.95 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
62
63
64
65
66
67
import eslint from "@eslint/js"
import { defineConfig, globalIgnores } from "eslint/config"
import globals from "globals"
import tseslint from "typescript-eslint"
export default defineConfig([
globalIgnores([
"dist",
"node_modules",
"coverage",
".next",
"**/.svelte-kit",
"**/.vercel",
"build",
"examples/next-ts",
"examples/vue-ts",
"plop-templates",
"starters",
"website",
"**/*.d.ts",
"**/.output",
]),
{
files: ["**/*.ts", "**/*.tsx"],
extends: [eslint.configs.recommended, ...tseslint.configs.recommended],
languageOptions: {
globals: globals.node,
},
rules: {
// Suppress eslint:recommended rules that don't apply
"no-case-declarations": "off",
"no-empty": "off",
"no-prototype-builtins": "off",
"no-undef": "off",
"no-redeclare": "off",
"no-unassigned-vars": "off",
"no-useless-assignment": "off",
"prefer-const": "off",
"prefer-rest-params": "off",
"prefer-spread": "off",
"preserve-caught-error": "off",
// Suppress typescript-eslint:recommended rules that don't apply
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-empty-object-type": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/no-non-null-asserted-optional-chain": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/no-require-imports": "off",
"@typescript-eslint/no-unsafe-function-type": "off",
"@typescript-eslint/no-this-alias": "off",
"@typescript-eslint/no-unused-expressions": "off",
"@typescript-eslint/no-wrapper-object-types": "off",
// Custom rules
"@typescript-eslint/no-unused-vars": [
"error",
{
varsIgnorePattern: "^_",
argsIgnorePattern: "^_",
ignoreRestSiblings: true,
},
],
},
},
])