-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.json
143 lines (143 loc) · 5.6 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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
{
"env": {
"browser": false,
"es2020": true,
"node": true
},
"extends": [
"eslint:recommended",
"plugin:@typescript-eslint/eslint-recommended"
],
"globals": {
"Atomics": "readonly",
"SharedArrayBuffer": "readonly"
},
"parser": "@typescript-eslint/parser",
"parserOptions": {
"sourceType": "module",
"project": "tsconfig.json"
},
"plugins": [
"@typescript-eslint"
],
"rules": {
"indent": "off", // overloaded by eslint-typescript
"linebreak-style": ["warn", "unix"],
"quotes": "off", // overloaded by eslint-typescript
"semi": "off",
"array-callback-return": "error",
"block-scoped-var": "error",
"class-methods-use-this": "error",
"consistent-return": "error",
"default-case": "error",
"default-param-last": "off", // overloaded by eslint-typescript
"eqeqeq": "error",
"no-caller": "error",
"no-constructor-return": "error",
"no-dupe-class-members": "off",
"no-empty-function": "error",
"no-eq-null": "error",
"no-eval":"error",
"no-extend-native": "error",
"no-extra-bind": "error",
"no-extra-label": "error",
"no-floating-decimal": "error",
"no-implicit-coercion": "error",
"no-implied-eval": "error",
"no-invalid-this": "error",
"no-iterator": "error",
"no-labels": "error",
"no-lone-blocks": "error",
"no-loop-func": "error",
"no-new": "error",
"no-new-func": "error",
"no-new-wrappers": "error",
"no-octal-escape": "error",
"no-param-reassign": "error",
"no-proto": "error",
"no-return-assign": "error",
"no-return-await": "error",
"no-script-url": "error",
"no-self-compare": "error",
"no-sequences": "error",
"no-throw-literal": "error",
"no-unmodified-loop-condition": "error",
"no-unused-expressions": "off", // overloaded by eslint-typescript
"no-unused-vars": "off",
"no-useless-call": "error",
"no-useless-concat": "warn",
"no-useless-return": "error",
"no-void": "error",
"prefer-regex-literals": "error",
"radix": "error",
"require-unicode-regexp": "warn",
"no-shadow": "error",
"no-use-before-define": "error",
"callback-return": "warn",
"handle-callback-err": "warn",
"no-buffer-constructor": "error",
"no-path-concat": "error",
"no-process-exit": "warn",
"no-sync": "warn",
"no-confusing-arrow": "error",
"no-duplicate-imports": "error",
"no-useless-computed-key": "error",
"no-useless-constructor": "off", // overloaded by eslint-typescript
"no-useless-rename": "error",
"no-var": "error",
"object-curly-spacing": ["error", "always"],
"object-shorthand": "error",
"prefer-arrow-callback": "error",
"prefer-const": "error",
"prefer-numeric-literals": "warn",
"prefer-rest-params": "error",
"prefer-spread": "error",
"prefer-template": "error",
"require-yield": "error",
// TODO finish
"@typescript-eslint/array-type": [
"error",
{
"default": "generic"
}
],
"@typescript-eslint/explicit-module-boundary-types": "error",
"@typescript-eslint/no-base-to-string": "error",
"@typescript-eslint/no-dynamic-delete": "error",
"@typescript-eslint/no-empty-interface": "error",
"@typescript-eslint/no-explicit-any": "warn",
"@typescript-eslint/no-extra-non-null-assertion": "error",
"@typescript-eslint/no-extraneous-class": "error",
"@typescript-eslint/no-floating-promises": "warn",
"@typescript-eslint/no-implied-eval": "error",
"@typescript-eslint/no-non-null-asserted-optional-chain": "error",
"@typescript-eslint/no-require-imports": "error",
"@typescript-eslint/no-throw-literal": "error",
"@typescript-eslint/no-unnecessary-boolean-literal-compare": "error",
"@typescript-eslint/no-unnecessary-condition": "error",
"@typescript-eslint/no-unnecessary-qualifier": "error",
"@typescript-eslint/no-unsafe-call": "warn",
"@typescript-eslint/no-unsafe-member-access": "warn",
"@typescript-eslint/no-unsafe-return": "warn",
"@typescript-eslint/prefer-function-type": "error",
"@typescript-eslint/prefer-nullish-coalescing": "error",
"@typescript-eslint/prefer-optional-chain": "error",
"@typescript-eslint/prefer-readonly": "error",
"@typescript-eslint/promise-function-async": "error",
"@typescript-eslint/require-array-sort-compare": "error",
"@typescript-eslint/restrict-plus-operands": "error",
"@typescript-eslint/restrict-template-expressions": "error",
"@typescript-eslint/strict-boolean-expressions": "error",
"@typescript-eslint/switch-exhaustiveness-check": "warn",
"@typescript-eslint/unified-signatures": "error",
// overrides
"@typescript-eslint/default-param-last": "error",
"@typescript-eslint/indent": ["warn", 4],
"@typescript-eslint/no-dupe-class-members": "error",
"@typescript-eslint/no-unused-expressions": "error",
"@typescript-eslint/no-useless-constructor": "error",
"@typescript-eslint/quotes": ["warn", "double"],
"@typescript-eslint/semi": ["warn", "always"],
"@typescript-eslint/return-await": "error"
}
}