-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc
57 lines (57 loc) · 1.99 KB
/
.eslintrc
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
55
56
57
{
"extends": [
"airbnb-typescript/base",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:eslint-comments/recommended",
"plugin:prettier/recommended"
],
"parserOptions": {
"project": "./tsconfig.json",
"warnOnUnsupportedTypeScriptVersion": false // TODO: remove after updating to eslint 8
},
"rules": {
"import/extensions": "off",
"no-plusplus": "off",
// https://basarat.gitbooks.io/typescript/docs/tips/defaultIsBad.html
"import/prefer-default-export": "off",
"import/no-default-export": "warn",
// "import/no-cycle": "off",
"max-classes-per-file": ["warn", 5],
// Don't forget debugs
"no-console": "off",
// Not a big fan of constant refactoring that will happen after adding/removing 'this' from some random method
"class-methods-use-this": "off",
"id-length": [
"error",
{
"exceptions": [
"_",
/* placeholder */ "a",
/* sort */ "b",
/* sort */ "i" /* loop */,
"e"
]
}
],
// Setting fields directly seems fine for entities, makes the implementation simple
"no-param-reassign": "off",
// airbnb disallows for-of async iteration which is very questionable
"no-restricted-syntax": "off",
// airbnb disallows for-of async-await iteration which is very questionable
"no-await-in-loop": "off",
"import/no-extraneous-dependencies": "off",
// conveinient for class getters
"no-underscore-dangle": "off",
"@typescript-eslint/unbound-method": "warn",
// makes a mess
"require-await": "off",
"@typescript-eslint/require-await": "error",
"@typescript-eslint/no-use-before-define": "off",
"prettier/prettier": "off",
"@typescript-eslint/no-unsafe-assignment": "off",
"@typescript-eslint/no-unsafe-call": "off",
"@typescript-eslint/no-unsafe-member-access": "off"
},
"ignorePatterns": ["src/model/generated", "src/types", "db"]
}