-
Notifications
You must be signed in to change notification settings - Fork 161
/
.eslintrc.js
76 lines (75 loc) · 2.21 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
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
module.exports = {
root: true,
rules: {
'import/prefer-default-export': 0,
'no-multiple-empty-lines': 0,
'no-nested-ternary': 0,
'class-methods-use-this': 0,
'arrow-body-style': 0,
'no-shadow': 0,
'no-await-in-loop': 0,
'no-restricted-syntax': [
'error',
'ForInStatement',
'LabeledStatement',
'WithStatement',
],
'operator-linebreak': ['error', 'after'],
'max-len': ['error', 120, 2, {
ignoreUrls: true,
ignoreComments: true,
ignoreRegExpLiterals: true,
ignoreStrings: true,
ignoreTemplateLiterals: true,
ignorePattern: '^(async )?function ',
}],
'linebreak-style': process.platform === 'win32' ? 0 : 2,
'quote-props': ['error', 'consistent-as-needed'],
'@typescript-eslint/explicit-function-return-type': 0,
'@typescript-eslint/no-explicit-any': 0,
'@typescript-eslint/ban-ts-ignore': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'@typescript-eslint/no-unsafe-member-access': 0,
'@typescript-eslint/no-unsafe-call': 0,
'@typescript-eslint/no-unsafe-assignment': 0,
'@typescript-eslint/no-unsafe-argument': 0,
'@typescript-eslint/no-unsafe-return': 0,
'@typescript-eslint/ban-ts-comment': 0,
'@typescript-eslint/restrict-template-expressions': ['error', {
allowNever: true,
}],
'@typescript-eslint/consistent-type-imports': ['error', {
fixStyle: 'inline-type-imports',
}],
'@typescript-eslint/member-delimiter-style': ['error', {
multiline: {
delimiter: 'semi',
requireLast: true,
},
singleline: {
delimiter: 'comma',
requireLast: false,
},
}],
},
globals: {
document: true,
window: true,
fetch: true,
Headers: true,
},
env: {
jest: true,
},
parserOptions: {
project: './tsconfig.json',
ecmaVersion: 2018, // Allows for the parsing of modern ECMAScript features
sourceType: 'module', // Allows for the use of imports
},
extends: ['airbnb-typescript/base',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'plugin:import/errors',
],
};