-
Notifications
You must be signed in to change notification settings - Fork 2
/
.eslintrc.json
54 lines (54 loc) · 1.82 KB
/
.eslintrc.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{
"env": {
"node": true,
"es6": true
},
"extends": "eslint:recommended",
"parserOptions": {
"ecmaVersion": 2018,
"sourceType": "module",
"project": ["tsconfig.json", "test/tsconfig.json"]
},
"parser": "@typescript-eslint/parser",
"plugins": ["@typescript-eslint"],
"overrides": [
{
"files": "*.ts",
"extends": [
"plugin:@typescript-eslint/eslint-recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:@typescript-eslint/recommended"
],
"rules": {
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/no-floating-promises": "error",
"@typescript-eslint/prefer-optional-chain": "error"
}
}
],
"rules": {
"array-callback-return": "error",
"arrow-parens": ["error", "as-needed"],
"comma-dangle": ["error", "always-multiline"],
"curly": ["error", "all"],
"dot-location": ["error", "property"],
"dot-notation": "error",
"eol-last": ["error", "always"],
"eqeqeq": ["error", "always"],
"for-direction": "error",
"indent": ["error", 4, { "SwitchCase": 1 }],
"linebreak-style": ["error", "unix"],
"no-async-promise-executor": "error",
"no-await-in-loop": "error",
"no-console": "error",
"no-dupe-else-if": "error",
"no-else-return": "error",
"no-extra-parens": ["error", "all"],
"no-lonely-if": "error",
"no-var": "error",
"prefer-arrow-callback": "error",
"prefer-const": ["warn", { "destructuring": "all" }],
"quotes": ["error", "backtick"],
"semi": ["error", "always"]
}
}