-
Notifications
You must be signed in to change notification settings - Fork 3
/
.eslintrc.js
43 lines (43 loc) · 1.65 KB
/
.eslintrc.js
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
module.exports = {
"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",
"tsconfigRootDir": __dirname,
"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": "off",
// "import/no-cycle": "off",
"max-classes-per-file": ["error", 8],
// 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"
},
"ignorePatterns": [
"src/model/generated",
"src/chains/**/types",
"db"
]
}