forked from kodadot/snek
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc
44 lines (44 loc) · 1.62 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
{
"extends": [
"airbnb-typescript/base",
"plugin:@typescript-eslint/recommended",
"plugin:@typescript-eslint/recommended-requiring-type-checking",
"plugin:eslint-comments/recommended"
],
"parserOptions": {
"project": "./tsconfig.json",
"warnOnUnsupportedTypeScriptVersion": false // TODO: remove after updating to eslint 8
},
"rules": {
// https://basarat.gitbooks.io/typescript/docs/tips/defaultIsBad.html
"import/prefer-default-export": "off",
"import/no-default-export": "error",
// "import/no-cycle": "off",
"max-classes-per-file": ["error", 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 */ ] } ],
// 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
"@typescript-eslint/no-use-before-define": "off",
"semi": "off",
"max-len": "off"
},
"ignorePatterns": [
"src/model/generated",
"src/types",
"db",
"tests/"
]
}