-
Notifications
You must be signed in to change notification settings - Fork 80
/
uwazi-eslint-rules.js
54 lines (51 loc) · 1.2 KB
/
uwazi-eslint-rules.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
module.exports = {
quotes: 'off',
'@typescript-eslint/quotes': [
'error',
'single',
{
avoidEscape: true,
},
],
'no-shadow': 'off',
'@typescript-eslint/no-shadow': ['error'],
'no-use-before-define': 'off',
'@typescript-eslint/no-use-before-define': ['error'],
'no-unused-vars': 'off',
//https://github.com/typescript-eslint/typescript-eslint/issues/662
'no-undef': 'off',
'@typescript-eslint/no-unused-vars': [
'error',
{
vars: 'all',
argsIgnorePattern: '^_',
args: 'all',
caughtErrors: 'none',
ignoreRestSiblings: true,
},
],
'@typescript-eslint/no-explicit-any': [
'off',
{
fixToUnknown: false,
ignoreRestArgs: false,
},
],
'@typescript-eslint/explicit-function-return-type': [
'off',
{
allowExpressions: true,
},
],
// This is broken for ts, but circleci protects us.
'@typescript-eslint/no-floating-promises': 'error',
'@typescript-eslint/no-misused-promises': [
'error',
{
checksVoidReturn: false,
},
],
'@typescript-eslint/promise-function-async': 'error',
'no-dupe-class-members': 'off',
'@typescript-eslint/no-dupe-class-members': ['error'],
};