-
Notifications
You must be signed in to change notification settings - Fork 0
/
.eslintrc.js
51 lines (51 loc) · 1.55 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
44
45
46
47
48
49
50
51
module.exports = {
parser: '@typescript-eslint/parser',
plugins: ['@typescript-eslint'],
extends: ['airbnb-base', 'prettier'],
parserOptions: {
ecmaVersion: 6,
sourceType: 'module',
project: './tsconfig.json',
},
env: { jest: true, browser: true, node: true },
rules: {
'no-console': 'off',
'import/prefer-default-export': 'off',
'no-shadow':'off',
// Fix problem that causes eslint to request that all importsinclude the extension, thus breaking them
'import/extensions': [
'error',
'ignorePackages',
{
ts: 'never',
},
],
// Replace eslint's 'no-unused-vars' rule for tslint's one
"@typescript-eslint/no-unused-vars-experimental": "error",
"no-unused-vars": "off",
// Disable rule. Rationale: awaits in loops are useful when used to re-try an operation till it works
"no-await-in-loop": "off",
// Disable rule. Rationale: code is much more readable when this rule is not enabled
"prefer-destructuring": "off",
// Disable rule. Incompatible with some interfaces
"no-underscore-dangle": "off",
"consistent-return": "off",
},
overrides: [
{
// Remove rule that disables "for of" loops in test files. Rationale: it doesnt matter if the generated code is large there as it never gets shipped to production
files: ["*.test.ts", "*/__mocks__/*"],
rules: {
"no-restricted-syntax": "off"
}
}
],
settings: {
'import/resolver': {
node: {
paths: ['src'],
extensions: ['.js', '.ts'],
},
},
},
};