1
1
const path = require ( 'path' )
2
2
3
3
module . exports = {
4
- extends : [ 'plugin:react/recommended' , 'streamr-ts' , 'plugin:cypress/recommended' , 'prettier' ] ,
4
+ extends : [
5
+ 'plugin:react/recommended' ,
6
+ 'streamr-ts' ,
7
+ 'plugin:cypress/recommended' ,
8
+ 'prettier' ,
9
+ ] ,
5
10
parser : '@typescript-eslint/parser' ,
6
11
settings : {
7
12
'import/resolver' : {
@@ -16,8 +21,20 @@ module.exports = {
16
21
'react-hooks/rules-of-hooks' : 'error' ,
17
22
'react-hooks/exhaustive-deps' : 'warn' ,
18
23
'no-unused-vars' : 'off' , // as we prefer the typescript version of this rule
19
- '@typescript-eslint/no-unused-vars' : 'warn' ,
24
+ '@typescript-eslint/no-unused-vars' : [
25
+ 'warn' ,
26
+ {
27
+ args : 'all' ,
28
+ argsIgnorePattern : '^_' ,
29
+ caughtErrors : 'all' ,
30
+ caughtErrorsIgnorePattern : '^_' ,
31
+ destructuredArrayIgnorePattern : '^_' ,
32
+ varsIgnorePattern : '^_' ,
33
+ ignoreRestSiblings : true ,
34
+ } ,
35
+ ] ,
20
36
'@typescript-eslint/ban-ts-comment' : 'warn' ,
37
+ '@typescript-eslint/no-require-imports' : 'off' ,
21
38
'no-multiple-empty-lines' : 'warn' ,
22
39
'jsx-a11y/no-noninteractive-tabindex' : 'warn' ,
23
40
'react/jsx-indent' : 'warn' ,
@@ -32,12 +49,20 @@ module.exports = {
32
49
'promise/always-return' : 'off' ,
33
50
'require-atomic-updates' : 'off' ,
34
51
'react/sort-comp' : 0 ,
35
- " react/no-unknown-property" : [ 'error' , { ignore : [ 'css' ] } ] ,
52
+ ' react/no-unknown-property' : [ 'error' , { ignore : [ 'css' ] } ] ,
36
53
'import/extensions' : 'off' ,
37
54
'import/order' : [
38
55
'warn' ,
39
56
{
40
- groups : [ 'builtin' , 'external' , 'internal' , 'parent' , 'sibling' , 'index' , 'object' ] ,
57
+ groups : [
58
+ 'builtin' ,
59
+ 'external' ,
60
+ 'internal' ,
61
+ 'parent' ,
62
+ 'sibling' ,
63
+ 'index' ,
64
+ 'object' ,
65
+ ] ,
41
66
pathGroups : [
42
67
{
43
68
pattern : '$*/**' ,
@@ -53,7 +78,7 @@ module.exports = {
53
78
pattern : '~/**' ,
54
79
group : 'internal' ,
55
80
position : 'after' ,
56
- }
81
+ } ,
57
82
] ,
58
83
} ,
59
84
] ,
@@ -64,16 +89,8 @@ module.exports = {
64
89
allowArgumentsExplicitlyTypedAsAny : true ,
65
90
} ,
66
91
] ,
67
- "@typescript-eslint/no-namespace" : "off" ,
68
- "no-underscore-dangle" : "off" ,
69
- "@typescript-eslint/ban-types" : [
70
- "error" ,
71
- {
72
- "types" : {
73
- "{}" : false ,
74
- } ,
75
- } ,
76
- ] ,
92
+ '@typescript-eslint/no-namespace' : 'off' ,
93
+ 'no-underscore-dangle' : 'off' ,
77
94
} ,
78
95
overrides : [
79
96
{
0 commit comments