1 | {
|
2 | "env": {
|
3 | "es6": true,
|
4 | "jest": true,
|
5 | "node": true
|
6 | },
|
7 | "extends": [
|
8 | "eslint:recommended",
|
9 | "plugin:@typescript-eslint/recommended",
|
10 | "plugin:@typescript-eslint/recommended-requiring-type-checking"
|
11 | ],
|
12 | "overrides": [
|
13 | {
|
14 | "files": [
|
15 | "*.tsx"
|
16 | ],
|
17 | "rules": {
|
18 | "filenames/match-exported": [
|
19 | 2,
|
20 | "kebab"
|
21 | ]
|
22 | }
|
23 | },
|
24 | {
|
25 | "files": [
|
26 | "*.test.ts",
|
27 | "*.test.tsx"
|
28 | ],
|
29 | "rules": {
|
30 | "@typescript-eslint/explicit-function-return-type": "off",
|
31 | "@typescript-eslint/no-non-null-assertion": "off",
|
32 | "@typescript-eslint/unbound-method": "off"
|
33 | }
|
34 | }
|
35 | ],
|
36 | "parser": "@typescript-eslint/parser",
|
37 | "parserOptions": {
|
38 | "project": "tsconfig.json",
|
39 | "sourceType": "module"
|
40 | },
|
41 | "plugins": [
|
42 | "@typescript-eslint",
|
43 | "filenames",
|
44 | "prefer-arrow"
|
45 | ],
|
46 | "rules": {
|
47 | "@typescript-eslint/adjacent-overload-signatures": "error",
|
48 | "@typescript-eslint/array-type": "off",
|
49 | "@typescript-eslint/ban-types": "error",
|
50 | "@typescript-eslint/naming-convention": [
|
51 | "error",
|
52 | {
|
53 | "selector": "typeLike",
|
54 | "format": [
|
55 | "PascalCase"
|
56 | ]
|
57 | },
|
58 | {
|
59 | "selector": "interface",
|
60 | "format": [
|
61 | "PascalCase"
|
62 | ],
|
63 | "custom": {
|
64 | "regex": "^I[A-Z]",
|
65 | "match": false
|
66 | }
|
67 | }
|
68 | ],
|
69 | "@typescript-eslint/consistent-type-assertions": "error",
|
70 | "@typescript-eslint/consistent-type-definitions": [
|
71 | "error",
|
72 | "interface"
|
73 | ],
|
74 | "@typescript-eslint/explicit-function-return-type": [
|
75 | "warn",
|
76 | {
|
77 | "allowExpressions": true
|
78 | }
|
79 | ],
|
80 | "@typescript-eslint/explicit-member-accessibility": [
|
81 | "error",
|
82 | {
|
83 | "accessibility": "explicit",
|
84 | "overrides": {
|
85 | "constructors": "no-public"
|
86 | }
|
87 | }
|
88 | ],
|
89 | "@typescript-eslint/indent": [
|
90 | "error",
|
91 | 2,
|
92 | {
|
93 | "SwitchCase": 1
|
94 | }
|
95 | ],
|
96 | "@typescript-eslint/member-delimiter-style": "error",
|
97 | "@typescript-eslint/no-empty-function": "off",
|
98 | "@typescript-eslint/no-empty-interface": "off",
|
99 | "@typescript-eslint/no-explicit-any": "off",
|
100 | "@typescript-eslint/no-misused-new": "error",
|
101 | "@typescript-eslint/no-namespace": "off",
|
102 | "@typescript-eslint/no-parameter-properties": "off",
|
103 | "@typescript-eslint/no-unused-vars": [
|
104 | "warn",
|
105 | {
|
106 | "args": "none"
|
107 | }
|
108 | ],
|
109 | "@typescript-eslint/no-use-before-define": "off",
|
110 | "@typescript-eslint/no-var-requires": "warn",
|
111 | "@typescript-eslint/prefer-for-of": "error",
|
112 | "@typescript-eslint/prefer-function-type": "error",
|
113 | "@typescript-eslint/prefer-namespace-keyword": "error",
|
114 | "@typescript-eslint/quotes": [
|
115 | "error",
|
116 | "single",
|
117 | {
|
118 | "avoidEscape": true
|
119 | }
|
120 | ],
|
121 | "@typescript-eslint/triple-slash-reference": "error",
|
122 | "@typescript-eslint/unbound-method": [
|
123 | "error",
|
124 | {
|
125 | "ignoreStatic": true
|
126 | }
|
127 | ],
|
128 | "@typescript-eslint/unified-signatures": "error",
|
129 | "arrow-parens": "error",
|
130 | "block-scoped-var": "error",
|
131 | "camelcase": "error",
|
132 | "comma-dangle": [
|
133 | "warn",
|
134 | "always-multiline"
|
135 | ],
|
136 | "complexity": "off",
|
137 | "constructor-super": "error",
|
138 | "curly": [
|
139 | "error",
|
140 | "multi-line"
|
141 | ],
|
142 | "dot-notation": "error",
|
143 | "eol-last": [
|
144 | "warn",
|
145 | "always"
|
146 | ],
|
147 | "eqeqeq": "error",
|
148 | "filenames/match-regex": [
|
149 | "error",
|
150 | "^[a-z\\-\\.][a-z0-9\\-\\.]*$",
|
151 | true
|
152 | ],
|
153 | "guard-for-in": "error",
|
154 | "id-match": "error",
|
155 | "max-classes-per-file": "off",
|
156 | "max-len": "off",
|
157 | "new-parens": "error",
|
158 | "no-await-in-loop": "error",
|
159 | "no-bitwise": "error",
|
160 | "no-caller": "error",
|
161 | "no-cond-assign": "error",
|
162 | "no-console": "off",
|
163 | "no-constructor-return": "error",
|
164 | "no-debugger": "error",
|
165 | "no-else-return": "error",
|
166 | "no-empty": "off",
|
167 | "no-eval": "error",
|
168 | "no-fallthrough": "off",
|
169 | "no-invalid-this": "off",
|
170 | "no-multiple-empty-lines": [
|
171 | "warn",
|
172 | {
|
173 | "max": 1
|
174 | }
|
175 | ],
|
176 | "no-new-wrappers": "error",
|
177 | "no-promise-executor-return": "error",
|
178 | "no-restricted-imports": [
|
179 | "error",
|
180 | {
|
181 | "patterns": [
|
182 | "./../"
|
183 | ]
|
184 | }
|
185 | ],
|
186 | "no-return-await": "error",
|
187 | "no-shadow": "off",
|
188 | "@typescript-eslint/no-shadow": "error",
|
189 | "no-throw-literal": "error",
|
190 | "no-trailing-spaces": "error",
|
191 | "no-undef": "off",
|
192 | "no-undef-init": "error",
|
193 | "no-underscore-dangle": "off",
|
194 | "no-unsafe-finally": "error",
|
195 | "no-unused-expressions": [
|
196 | "error",
|
197 | {
|
198 | "allowShortCircuit": true
|
199 | }
|
200 | ],
|
201 | "no-unused-labels": "error",
|
202 | "no-var": "error",
|
203 | "object-shorthand": "error",
|
204 | "one-var": [
|
205 | "error",
|
206 | "never"
|
207 | ],
|
208 | "padded-blocks": [
|
209 | "warn",
|
210 | "never"
|
211 | ],
|
212 | "prefer-arrow/prefer-arrow-functions": "error",
|
213 | "prefer-const": "error",
|
214 | "radix": "error",
|
215 | "semi": "error",
|
216 | "spaced-comment": "error",
|
217 | "use-isnan": "error",
|
218 | "valid-typeof": "off"
|
219 | }
|
220 | }
|