1
- const path = require ( 'path' )
1
+ const path = require ( 'path' ) ;
2
2
3
3
module . exports = {
4
4
root : true ,
5
5
env : {
6
6
browser : true ,
7
7
} ,
8
- extends : [ 'airbnb-typescript' , 'airbnb/hooks' , 'plugin:sonarjs/recommended' ] ,
8
+ extends : [
9
+ 'airbnb-typescript' ,
10
+ 'airbnb/hooks' ,
11
+ 'plugin:sonarjs/recommended' ,
12
+ 'prettier' ,
13
+ ] ,
9
14
// extends: ['airbnb', 'airbnb/hooks'],
10
15
plugins : [ '@typescript-eslint' ] ,
11
16
parser : '@typescript-eslint/parser' ,
@@ -18,23 +23,44 @@ module.exports = {
18
23
19
24
overrides : [
20
25
{
21
- files : [
22
- '**/*.spec.ts' ,
23
- '**/*.spec.tsx' ,
24
- '**/*.spec.ts' ,
25
- ] ,
26
+ files : [ '**/*.spec.ts' , '**/*.spec.tsx' , '**/*.spec.ts' ] ,
26
27
env : {
27
28
jest : true ,
28
29
} ,
29
30
} ,
31
+ {
32
+ files : [ '*.ts' , '*.tsx' ] ,
33
+ rules : {
34
+ '@typescript-eslint/semi' : [ 'error' , 'never' ] ,
35
+ semi : 'off' ,
36
+ } ,
37
+ } ,
38
+ {
39
+ files : [ '*.js' , '*.jsx' ] ,
40
+ rules : {
41
+ semi : [ 'error' , 'always' ] ,
42
+ '@typescript-eslint/semi' : 'off' ,
43
+ } ,
44
+ } ,
45
+ ] ,
46
+ ignorePatterns : [
47
+ 'dist' ,
48
+ 'src/packages/redisearch/src/icons/*.js' ,
49
+ 'src/packages/common/src/icons/*.js' ,
30
50
] ,
31
- ignorePatterns : [ 'dist' , 'src/packages/redisearch/src/icons/*.js' , 'src/packages/common/src/icons/*.js' ] ,
32
-
33
51
rules : {
34
52
radix : 'off' ,
35
- semi : [ 'error' , 'never ' ] ,
53
+ semi : [ 'error' , 'always ' ] ,
36
54
'no-bitwise' : [ 'error' , { allow : [ '|' ] } ] ,
37
- 'max-len' : [ 'error' , { ignoreComments : true , ignoreStrings : true , ignoreRegExpLiterals : true , code : 120 } ] ,
55
+ 'max-len' : [
56
+ 'error' ,
57
+ {
58
+ ignoreComments : true ,
59
+ ignoreStrings : true ,
60
+ ignoreRegExpLiterals : true ,
61
+ code : 120 ,
62
+ } ,
63
+ ] ,
38
64
'class-methods-use-this' : 'off' ,
39
65
// A temporary hack related to IDE not resolving correct package.json
40
66
'import/no-extraneous-dependencies' : 'off' ,
@@ -82,23 +108,23 @@ module.exports = {
82
108
{
83
109
pattern : 'uiSrc/**' ,
84
110
group : 'internal' ,
85
- position : 'after'
111
+ position : 'after' ,
86
112
} ,
87
113
{
88
114
pattern : 'apiSrc/**' ,
89
115
group : 'internal' ,
90
- position : 'after'
116
+ position : 'after' ,
91
117
} ,
92
118
{
93
119
pattern : '{.,..}/*.scss' , // same directory only
94
120
// pattern: '{.,..}/**/*\.scss' // same & outside directories (e.g. import '../foo/foo.scss')
95
121
group : 'object' ,
96
- position : 'after'
97
- }
122
+ position : 'after' ,
123
+ } ,
98
124
] ,
99
125
warnOnUnassignedImports : true ,
100
- pathGroupsExcludedImportTypes : [ 'builtin' ]
126
+ pathGroupsExcludedImportTypes : [ 'builtin' ] ,
101
127
} ,
102
128
] ,
103
129
} ,
104
- }
130
+ } ;
0 commit comments