Skip to content

Commit a86fa0f

Browse files
committed
config eslint and prettier
1 parent b1ea88e commit a86fa0f

14 files changed

+2846
-10
lines changed
Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
{
2+
"env": {
3+
"node": true,
4+
"commonjs": true,
5+
"es2021": true
6+
},
7+
"extends": [
8+
"eslint:recommended",
9+
"plugin:@typescript-eslint/eslint-recommended",
10+
"plugin:@typescript-eslint/recommended"
11+
],
12+
"parser": "@typescript-eslint/parser",
13+
"parserOptions": {
14+
"ecmaVersion": 12,
15+
"project": "./tsconfig.json"
16+
},
17+
"plugins": ["@typescript-eslint"],
18+
"rules": {
19+
"linebreak-style": 0,
20+
"semi": ["error", "always"],
21+
"no-extra-semi": "error",
22+
"no-console": "error",
23+
"eqeqeq": [
24+
"warn",
25+
"always",
26+
{
27+
"null": "ignore"
28+
}
29+
],
30+
"init-declarations": ["warn", "always"],
31+
"eol-last": ["warn", "always"],
32+
"block-spacing": ["warn", "always"],
33+
"object-curly-spacing": ["warn", "always"],
34+
"space-infix-ops": "warn",
35+
"key-spacing": [
36+
"warn",
37+
{
38+
"singleLine": {
39+
"beforeColon": false,
40+
"afterColon": true
41+
},
42+
"multiLine": {
43+
"beforeColon": true,
44+
"afterColon": true,
45+
"align": "colon"
46+
}
47+
}
48+
],
49+
"keyword-spacing": [
50+
"error",
51+
{
52+
"overrides": {
53+
"if": {
54+
"after": true
55+
},
56+
"for": {
57+
"after": true
58+
},
59+
"while": {
60+
"after": true
61+
}
62+
}
63+
}
64+
],
65+
"indent": 2,
66+
"func-call-spacing": ["warn", "never"],
67+
"lines-between-class-members": ["warn", "always"],
68+
"max-len": [
69+
"warn",
70+
{
71+
"code": 120,
72+
"tabWidth": 4,
73+
"ignoreTrailingComments": true,
74+
"ignoreTemplateLiterals": true,
75+
"ignoreStrings": true
76+
}
77+
],
78+
"newline-per-chained-call": [
79+
"warn",
80+
{
81+
"ignoreChainWithDepth": 2
82+
}
83+
],
84+
"max-statements-per-line": [
85+
"error",
86+
{
87+
"max": 1
88+
}
89+
],
90+
"lines-around-comment": [
91+
"warn",
92+
{
93+
"beforeBlockComment": true,
94+
"beforeLineComment": false
95+
}
96+
],
97+
"no-multi-assign": "error",
98+
"no-multiple-empty-lines": [
99+
"warn",
100+
{
101+
"max": 1,
102+
"maxEOF": 1
103+
}
104+
],
105+
"no-tabs": "error",
106+
"no-trailing-spaces": [
107+
"warn",
108+
{
109+
"skipBlankLines": true
110+
}
111+
],
112+
"padded-blocks": [
113+
"warn",
114+
{
115+
"classes": "always"
116+
}
117+
],
118+
"no-empty-function": "off",
119+
"@typescript-eslint/no-empty-function": [
120+
"error",
121+
{
122+
"allow": ["private-constructors"]
123+
}
124+
],
125+
"@typescript-eslint/explicit-module-boundary-types": ["off"],
126+
"@typescript-eslint/no-explicit-any": ["off"],
127+
"no-var": ["off"]
128+
}
129+
}
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Ignore artifacts:
2+
build
3+
coverage
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

0 commit comments

Comments
 (0)