-
Notifications
You must be signed in to change notification settings - Fork 8
/
.eslintrc.json
executable file
·89 lines (89 loc) · 3.97 KB
/
.eslintrc.json
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
77
78
79
80
81
82
83
84
85
86
87
88
89
{
"root": true,
"reportUnusedDisableDirectives": true,
"parser": "@typescript-eslint/parser",
"env": { "node": true, "es6": true },
"parserOptions": {
"warnOnUnsupportedTypeScriptVersion": false,
"tsconfigRootDir": "./",
"project": ["./tsconfig.json"],
"sourceType": "module",
"ecmaVersion": 2022,
"ecmaFeatures": { "impliedStrict": true }
},
"plugins": ["@typescript-eslint", "unicorn"],
"extends": ["eslint:recommended", "plugin:@typescript-eslint/recommended", "plugin:@typescript-eslint/recommended-requiring-type-checking"],
"rules": {
"unicorn/escape-case": "error",
"unicorn/number-literal-case": "error",
"unicorn/empty-brace-spaces": "error",
"unicorn/prefer-array-find": "error",
"unicorn/prefer-array-flat": "error",
"unicorn/prefer-array-flat-map": "error",
"unicorn/prefer-array-index-of": "error",
"unicorn/prefer-at": "off",
"unicorn/prefer-negative-index": "error",
"unicorn/prefer-object-from-entries": "error",
"unicorn/prefer-prototype-methods": "error",
"unicorn/prefer-reflect-apply": "error",
"unicorn/prefer-includes": "error",
"unicorn/prefer-regexp-test": "error",
"unicorn/prefer-modern-math-apis": "error",
"unicorn/prefer-native-coercion-functions": "error",
"unicorn/prefer-module": "error",
"unicorn/prefer-logical-operator-over-ternary": "error",
"unicorn/prefer-export-from": "error",
"unicorn/prefer-date-now": "error",
"unicorn/prefer-default-parameters": "error",
"unicorn/prefer-optional-catch-binding": "warn",
"unicorn/prefer-string-starts-ends-with": "error",
"unicorn/prefer-string-trim-start-end": "error",
"unicorn/prefer-string-replace-all": "error",
"unicorn/prefer-string-slice": "error",
"unicorn/prefer-top-level-await": "error",
"unicorn/custom-error-definition": "error",
"unicorn/error-message": "error",
"unicorn/no-array-method-this-argument": "error",
"unicorn/no-object-as-default-parameter": "error",
"unicorn/no-useless-spread": "error",
"unicorn/no-useless-fallback-in-spread": "error",
"unicorn/no-useless-promise-resolve-reject": "error",
"unicorn/no-useless-undefined": "error",
"unicorn/throw-new-error": "error",
"prefer-const": "off",
"array-callback-return": ["error", { "allowImplicit": true }],
"indent": ["error", 4, { "SwitchCase": 1 }],
"semi": ["error", "always"],
"@typescript-eslint/ban-types": [
"error",
{
"types": {
"String": false,
"Function": false,
"Object": false
},
"extendDefaults": true
}
],
"@typescript-eslint/no-namespace": "off",
"@typescript-eslint/unbound-method": "off",
"@typescript-eslint/no-explicit-any": "off",
"@typescript-eslint/no-non-null-assertion": "off",
"@typescript-eslint/prefer-namespace-keyword": "off",
"@typescript-eslint/adjacent-overload-signatures": "off",
"@typescript-eslint/no-inferrable-types": ["warn", { "ignoreParameters": true, "ignoreProperties": true }],
"@typescript-eslint/no-unused-vars": ["warn", { "vars": "all", "args": "none", "ignoreRestSiblings": false }],
"@typescript-eslint/no-misused-promises": ["error", { "checksVoidReturn": false }],
"@typescript-eslint/no-empty-function": "off",
"@typescript-eslint/restrict-template-expressions": [
"error",
{
"allowNumber": true,
"allowBoolean": true,
"allowAny": false,
"allowNullish": false,
"allowRegExp": true
}
]
}
}