-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.js
100 lines (98 loc) · 3.35 KB
/
index.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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
module.exports = {
env: {
es2021: true,
node: true,
},
extends: [
'plugin:@typescript-eslint/eslint-recommended',
'plugin:@typescript-eslint/recommended',
'plugin:@typescript-eslint/recommended-requiring-type-checking',
'airbnb-base',
'prettier',
],
plugins: [
'@typescript-eslint',
],
rules: {
'no-undef': 'off',
'no-shadow': 'off',
'@typescript-eslint/no-shadow': ['error'],
'no-redeclare': 'off',
'@typescript-eslint/no-redeclare': ['error'],
'indent': 'off',
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': ['error'],
'no-unused-vars': 'off',
'import/prefer-default-export': 'off',
'import/extensions': 'off',
'import/no-unresolved': 'off',
'import/no-extraneous-dependencies': ['error', { 'devDependencies': ['**/*.test.ts', '**/*.spec.ts'] }],
'@typescript-eslint/no-namespace': 'off',
'no-void': ['warn', { allowAsStatement: true }],
'curly': ['error', 'all'],
'no-tabs': ['error', { 'allowIndentationTabs': true }],
'max-len': ['error', {
'code': 120,
'ignoreUrls': true,
'ignoreComments': true,
'ignoreTrailingComments': true,
'ignoreStrings': true,
'ignoreRegExpLiterals': true,
'ignoreTemplateLiterals': true,
}],
'quotes': [
'error',
'single',
{ 'avoidEscape': true, 'allowTemplateLiterals': false }
],
'wrap-iife': ['error', 'inside'],
'@typescript-eslint/indent': 'off',
'no-mixed-operators': 'off',
// TODO: Create tickets and check each rule
'@typescript-eslint/no-use-before-define': ['warn'],
'no-useless-constructor': 'warn',
'no-bitwise': 'warn',
'no-buffer-constructor': 'warn',
'prefer-destructuring': 'warn',
'radix': 'warn',
'global-require': 'warn',
'no-return-assign': 'warn',
'no-multi-str': 'warn',
'no-unused-expressions': 'warn',
'no-cond-assign': 'warn',
'consistent-return': 'warn',
'prefer-promise-reject-errors': 'warn',
'class-methods-use-this': 'warn',
'no-restricted-syntax': 'warn',
'no-restricted-properties': 'warn',
'no-nested-ternary': 'warn',
'no-throw-literal': 'warn',
'no-await-in-loop': 'warn',
'default-case': 'warn',
'no-return-await': 'warn',
'no-restricted-globals': 'warn',
'no-underscore-dangle': 'warn',
'no-continue': 'warn',
'guard-for-in': 'warn',
'array-callback-return': 'warn',
'no-plusplus': 'warn',
'no-param-reassign': 'warn',
'camelcase': 'warn',
'import/no-dynamic-require': ['warn'],
'@typescript-eslint/await-thenable': ['warn'],
'@typescript-eslint/no-floating-promises': ['warn'],
'@typescript-eslint/no-unsafe-assignment': ['warn'],
'@typescript-eslint/no-unsafe-assignment': ['warn'],
'@typescript-eslint/no-unsafe-call': ['warn'],
'@typescript-eslint/no-unsafe-member-access': ['warn'],
'@typescript-eslint/no-unsafe-return': ['warn'],
'@typescript-eslint/require-await': ['warn'],
'@typescript-eslint/restrict-plus-operands': ['warn'],
'@typescript-eslint/restrict-template-expressions': ['warn'],
'@typescript-eslint/unbound-method': ['warn'],
'@typescript-eslint/no-shadow': ['warn'],
'@typescript-eslint/ban-types': ['warn'],
'@typescript-eslint/ban-ts-comment': ['warn'],
'@typescript-eslint/explicit-module-boundary-types': 'off',
},
};