-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintrc.js
80 lines (71 loc) · 3.3 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
77
78
79
80
module.exports = {
'extends': [
'eslint:recommended',
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
],
'parser': '@typescript-eslint/parser',
'parserOptions': {
'ecmaVersion': 2019,
'project': 'tsconfig.json',
'tsconfigRootDir': '.',
},
'rules': {
'max-len': ['error', {'code': 140, 'comments': 180}],
'block-spacing': ['error', 'always'],
'space-before-function-paren': ['error', {'anonymous': 'always', 'named': 'never'}],
'space-in-parens': ['error', 'never'],
'object-curly-spacing': ['error', 'never'],
'lines-between-class-members': ['error', 'always', {exceptAfterSingleLine: true}],
'arrow-spacing': ['error', {'before': true, 'after': true}],
'array-bracket-spacing': ['error', 'never'],
'computed-property-spacing': ['error', 'never'],
'template-curly-spacing': ['error', 'never'],
'object-property-newline': ['off', {'allowMultiplePropertiesPerLine': true}],
'no-plusplus': ['error', {'allowForLoopAfterthoughts': true}],
'quotes': ['error', 'single', {'avoidEscape': true}],
'no-unused-vars': 'off',
'@typescript-eslint/no-unused-vars': ['off'],
'@typescript-eslint/no-unsafe-argument': ['off'],
'semi': 'off',
'@typescript-eslint/semi': ['error'],
'no-control-regex': 'off',
// TODO: Remove rules, during the refactoring
// === DEFAULT RULES ===
'prefer-const': ['off'],
'no-plusplus': ['off'],
'no-extra-boolean-cast': ['off'],
'no-prototype-builtins': ['off'],
'no-useless-escape': ['off'],
'no-empty-pattern': ['off'],
'@typescript-eslint/no-unsafe-member-access': ['off'],
'@typescript-eslint/no-inferrable-types': ['off'],
'@typescript-eslint/ban-types': ['off'],
'@typescript-eslint/no-unsafe-return': ['off'],
'@typescript-eslint/no-unsafe-assignment': ['off'],
'@typescript-eslint/no-unsafe-call': ['off'],
'@typescript-eslint/no-floating-promises': ['off'],
'@typescript-eslint/restrict-plus-operands': ['off'],
'@typescript-eslint/no-implied-eval': ['off'],
'@typescript-eslint/no-empty-function': ['off'],
'@typescript-eslint/no-empty-interface': ['off'],
// === CUSTOM RULES ===
// '@typescript-eslint/explicit-function-return-type': ['error', {allowExpressions: true}],
'@typescript-eslint/explicit-function-return-type': ['off'],
// 'comma-dangle': ['error', 'always-multiline'],
'comma-dangle': ['off'],
// '@typescript-eslint/member-ordering': ['error'],
'@typescript-eslint/member-ordering': ['off'],
// 'spaced-comment': ['error', 'always', {'exceptions': ['-', '+']}],
'spaced-comment': ['off'],
// '@typescript-eslint/no-use-before-define': ['error', {'functions': false, 'classes': true}],
'@typescript-eslint/no-use-before-define': ['off'],
// '@typescript-eslint/unbound-method': ['error', {ignoreStatic: true}],
'@typescript-eslint/unbound-method': ['off'],
},
'env': {
'browser': true,
'es6': true,
}
};