Skip to content

Commit d4ef63a

Browse files
committed
added eslint
1 parent 3b05db7 commit d4ef63a

15 files changed

+2927
-234
lines changed

.editorconfig

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
root = true
2+
3+
# Unix-style newlines with a newline ending every file
4+
[*]
5+
end_of_line = lf
6+
insert_final_newline = true
7+
indent_style = space
8+
indent_size = 4
9+
trim_trailing_whitespace = true

.eslintrc.json

+52
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
{
2+
"env": {
3+
"es2021": true,
4+
"node": true
5+
},
6+
"extends": [
7+
"eslint:recommended",
8+
"plugin:@typescript-eslint/recommended"
9+
],
10+
"overrides": [
11+
],
12+
"parser": "@typescript-eslint/parser",
13+
"parserOptions": {
14+
"ecmaVersion": "latest",
15+
"sourceType": "module"
16+
},
17+
"plugins": [
18+
"@typescript-eslint"
19+
],
20+
"rules": {
21+
"@typescript-eslint/no-explicit-any": "off",
22+
"no-case-declarations": "off",
23+
"@typescript-eslint/no-unused-vars": "off",
24+
"default-case-last": ["error"],
25+
"eqeqeq": ["error", "always"],
26+
"no-lonely-if": ["error"],
27+
"no-magic-numbers": ["warn", {
28+
"ignoreArrayIndexes": true,
29+
"ignore": [-1, 0, 1]
30+
}],
31+
"no-return-assign": ["error", "always"],
32+
"no-return-await": ["error"],
33+
"no-var": ["error"],
34+
"no-cond-assign": ["error", "always"],
35+
"indent": [
36+
"error",
37+
4
38+
],
39+
"linebreak-style": [
40+
"error",
41+
"unix"
42+
],
43+
"quotes": [
44+
"error",
45+
"single"
46+
],
47+
"semi": [
48+
"error",
49+
"always"
50+
]
51+
}
52+
}

0 commit comments

Comments
 (0)