Skip to content

Commit 970dead

Browse files
committed
refactor(*): configured eslint
1 parent 3958405 commit 970dead

File tree

8 files changed

+11588
-93
lines changed

8 files changed

+11588
-93
lines changed

.eslintrc.json

Lines changed: 173 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,173 @@
1+
{
2+
"env": {
3+
"browser": true,
4+
"node": true
5+
},
6+
"extends": [
7+
"plugin:@typescript-eslint/recommended",
8+
"plugin:@typescript-eslint/recommended-requiring-type-checking"
9+
],
10+
"parser": "@typescript-eslint/parser",
11+
"parserOptions": {
12+
"project": "tsconfig.json",
13+
"sourceType": "module"
14+
},
15+
"plugins": [
16+
"eslint-plugin-jsdoc",
17+
"eslint-plugin-prefer-arrow",
18+
"@typescript-eslint"
19+
],
20+
"rules": {
21+
"@typescript-eslint/adjacent-overload-signatures": "error",
22+
"@typescript-eslint/array-type": "off",
23+
"@typescript-eslint/ban-types": "off",
24+
"@typescript-eslint/consistent-type-assertions": "error",
25+
"@typescript-eslint/dot-notation": "off",
26+
"@typescript-eslint/member-delimiter-style": [
27+
"error",
28+
{
29+
"multiline": {
30+
"delimiter": "semi",
31+
"requireLast": true
32+
},
33+
"singleline": {
34+
"delimiter": "semi",
35+
"requireLast": false
36+
}
37+
}
38+
],
39+
"@typescript-eslint/member-ordering": "off",
40+
"@typescript-eslint/naming-convention": "off",
41+
"@typescript-eslint/no-empty-function": "off",
42+
"@typescript-eslint/no-empty-interface": "off",
43+
"@typescript-eslint/no-explicit-any": "off",
44+
"@typescript-eslint/no-misused-new": "error",
45+
"@typescript-eslint/no-namespace": "error",
46+
"@typescript-eslint/no-parameter-properties": "off",
47+
"@typescript-eslint/no-shadow": [
48+
"error",
49+
{
50+
"hoist": "all"
51+
}
52+
],
53+
"@typescript-eslint/no-unused-expressions": "error",
54+
"@typescript-eslint/no-use-before-define": "off",
55+
"@typescript-eslint/no-var-requires": "error",
56+
"@typescript-eslint/prefer-for-of": "error",
57+
"@typescript-eslint/prefer-function-type": "error",
58+
"@typescript-eslint/prefer-namespace-keyword": "error",
59+
"@typescript-eslint/semi": [
60+
"error",
61+
"always"
62+
],
63+
"@typescript-eslint/triple-slash-reference": [
64+
"error",
65+
{
66+
"path": "always",
67+
"types": "prefer-import",
68+
"lib": "always"
69+
}
70+
],
71+
"@typescript-eslint/unified-signatures": "error",
72+
"arrow-parens": [
73+
"error",
74+
"as-needed"
75+
],
76+
"complexity": "off",
77+
"constructor-super": "error",
78+
"dot-notation": "off",
79+
"eqeqeq": [
80+
"error",
81+
"smart"
82+
],
83+
"guard-for-in": "error",
84+
"id-denylist": [
85+
"error",
86+
"any",
87+
"Number",
88+
"number",
89+
"String",
90+
"string",
91+
"Boolean",
92+
"boolean",
93+
"Undefined",
94+
"undefined"
95+
],
96+
"id-match": "error",
97+
"jsdoc/check-alignment": "error",
98+
"jsdoc/check-indentation": "error",
99+
"jsdoc/newline-after-description": "error",
100+
"max-classes-per-file": "off",
101+
"max-len": "off",
102+
"new-parens": "error",
103+
"no-bitwise": "off",
104+
"no-caller": "error",
105+
"no-cond-assign": "error",
106+
"no-console": [
107+
"error",
108+
{
109+
"allow": [
110+
"warn",
111+
"dir",
112+
"time",
113+
"timeEnd",
114+
"timeLog",
115+
"trace",
116+
"assert",
117+
"clear",
118+
"count",
119+
"countReset",
120+
"group",
121+
"groupEnd",
122+
"table",
123+
"debug",
124+
"info",
125+
"dirxml",
126+
"error",
127+
"groupCollapsed",
128+
"Console",
129+
"profile",
130+
"profileEnd",
131+
"timeStamp",
132+
"context"
133+
]
134+
}
135+
],
136+
"no-debugger": "error",
137+
"no-empty": "off",
138+
"no-empty-function": "off",
139+
"no-eval": "error",
140+
"no-fallthrough": "off",
141+
"no-invalid-this": "off",
142+
"no-new-wrappers": "error",
143+
"no-shadow": "error",
144+
"no-throw-literal": "error",
145+
"no-trailing-spaces": "error",
146+
"no-undef-init": "error",
147+
"no-unsafe-finally": "error",
148+
"no-unused-expressions": "error",
149+
"no-unused-labels": "error",
150+
"no-use-before-define": "off",
151+
"no-var": "error",
152+
"object-shorthand": "error",
153+
"one-var": [
154+
"error",
155+
"never"
156+
],
157+
"prefer-const": "error",
158+
"prefer-template": "error",
159+
"radix": "error",
160+
"semi": "error",
161+
"spaced-comment": [
162+
"error",
163+
"always",
164+
{
165+
"markers": [
166+
"/"
167+
]
168+
}
169+
],
170+
"use-isnan": "error",
171+
"valid-typeof": "off"
172+
}
173+
}

0 commit comments

Comments
 (0)