Skip to content

Commit 969d8f8

Browse files
authored
chore: standardize eslint (#382)
* chore: standardize eslint * chore: standardize eslint * chore: update config
1 parent f8ffa08 commit 969d8f8

File tree

3 files changed

+47
-47
lines changed

3 files changed

+47
-47
lines changed

.eslintrc.json

Lines changed: 15 additions & 47 deletions
Original file line numberDiff line numberDiff line change
@@ -1,58 +1,26 @@
11
{
2-
"plugins": ["jest", "@typescript-eslint"],
32
"extends": [
43
"eslint:recommended",
5-
"plugin:@typescript-eslint/eslint-recommended",
6-
"plugin:@typescript-eslint/recommended",
7-
"plugin:@typescript-eslint/recommended-requiring-type-checking"
4+
"plugin:prettier/recommended",
5+
"plugin:@typescript-eslint/recommended"
86
],
9-
"rules": {
10-
"camelcase": "error",
11-
"no-unused-vars": "error",
12-
"@typescript-eslint/no-unused-vars": "error",
13-
"@typescript-eslint/explicit-member-accessibility": [
14-
"error",
15-
{ "accessibility": "no-public" }
16-
],
17-
"@typescript-eslint/array-type": "error",
18-
"@typescript-eslint/await-thenable": "error",
19-
"@typescript-eslint/ban-ts-ignore": "warn",
20-
"@typescript-eslint/camelcase": "warn",
21-
"@typescript-eslint/class-name-casing": "error",
22-
"@typescript-eslint/explicit-function-return-type": [
23-
"error",
24-
{ "allowExpressions": true }
25-
],
26-
"@typescript-eslint/func-call-spacing": ["error", "never"],
27-
"@typescript-eslint/generic-type-naming": ["error", "^[A-Z][A-Za-z]*$"],
28-
"@typescript-eslint/no-array-constructor": "error",
29-
"@typescript-eslint/no-empty-interface": "error",
30-
"@typescript-eslint/no-explicit-any": "warn",
31-
"@typescript-eslint/no-extraneous-class": "error",
32-
"@typescript-eslint/no-for-in-array": "error",
33-
"@typescript-eslint/no-inferrable-types": "error",
34-
"@typescript-eslint/no-misused-new": "error",
35-
"@typescript-eslint/no-namespace": "error",
36-
"@typescript-eslint/no-non-null-assertion": "warn",
37-
"@typescript-eslint/no-unnecessary-qualifier": "error",
38-
"@typescript-eslint/no-unnecessary-type-assertion": "error",
39-
"@typescript-eslint/no-useless-constructor": "error",
40-
"@typescript-eslint/prefer-for-of": "warn",
41-
"@typescript-eslint/prefer-function-type": "warn",
42-
"@typescript-eslint/prefer-includes": "error",
43-
"@typescript-eslint/prefer-string-starts-ends-with": "error",
44-
"@typescript-eslint/restrict-plus-operands": "error",
45-
"@typescript-eslint/type-annotation-spacing": "error",
46-
"@typescript-eslint/unbound-method": "error"
47-
},
7+
"parser": "@typescript-eslint/parser",
488
"parserOptions": {
49-
"ecmaVersion": 9,
50-
"sourceType": "module",
51-
"project": "./tsconfig.json"
9+
"ecmaVersion": 11,
10+
"sourceType": "module"
11+
},
12+
"plugins": ["@typescript-eslint", "jest"],
13+
"rules": {
14+
"no-var": 2,
15+
"prefer-arrow-callback": 2,
16+
"@typescript-eslint/ban-ts-comment": 0,
17+
"@typescript-eslint/ban-types": 1,
18+
"@typescript-eslint/no-empty-function": 1
5219
},
5320
"env": {
5421
"browser": true,
5522
"es6": true,
5623
"jest/globals": true
57-
}
24+
},
25+
"globals": { "google": "readonly" }
5826
}

package-lock.json

Lines changed: 30 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@
4343
"chromedriver": "^93.0.1",
4444
"core-js": "^3.6.4",
4545
"eslint": "^7.21.0",
46+
"eslint-config-prettier": "^8.3.0",
4647
"eslint-plugin-jest": "^24.0.0",
48+
"eslint-plugin-prettier": "^4.0.0",
4749
"geckodriver": "^2.0.0",
4850
"jest": "^26.6.3",
4951
"prettier": "^2.0.4",

0 commit comments

Comments
 (0)