@@ -12,6 +12,7 @@ import tseslint from 'typescript-eslint';
12
12
13
13
const ignorePatterns = {
14
14
ignores : [
15
+ 'generated' ,
15
16
'packages/base/dist' ,
16
17
'packages/base/types' ,
17
18
'packages/charts/dist' ,
@@ -27,8 +28,8 @@ const ignorePatterns = {
27
28
'**/examples' ,
28
29
'**/templates' ,
29
30
'**/*.module.css.ts' ,
30
- '.yarn'
31
- ]
31
+ '.yarn' ,
32
+ ] ,
32
33
} ;
33
34
34
35
const config = tseslint . config (
@@ -46,14 +47,14 @@ const config = tseslint.config(
46
47
// eslint-plugin-react-hooks
47
48
{
48
49
plugins : {
49
- 'react-hooks' : reactHooksPlugin
50
+ 'react-hooks' : reactHooksPlugin ,
50
51
} ,
51
- rules : reactHooksPlugin . configs . recommended . rules
52
+ rules : reactHooksPlugin . configs . recommended . rules ,
52
53
} ,
53
54
{
54
55
languageOptions : {
55
56
globals : {
56
- ...globals . browser
57
+ ...globals . browser ,
57
58
} ,
58
59
59
60
ecmaVersion : 'latest' ,
@@ -63,15 +64,15 @@ const config = tseslint.config(
63
64
projectService : {
64
65
allowDefaultProject : [ 'packages/*/postcss.config.mjs' ] ,
65
66
// eslint-disable-next-line camelcase
66
- maximumDefaultProjectFileMatchCount_THIS_WILL_SLOW_DOWN_LINTING : 1000
67
- }
68
- }
67
+ maximumDefaultProjectFileMatchCount_THIS_WILL_SLOW_DOWN_LINTING : 1000 ,
68
+ } ,
69
+ } ,
69
70
} ,
70
71
71
72
settings : {
72
73
react : {
73
- version : 'detect'
74
- }
74
+ version : 'detect' ,
75
+ } ,
75
76
} ,
76
77
77
78
rules : {
@@ -89,9 +90,9 @@ const config = tseslint.config(
89
90
'sap_horizon' ,
90
91
'sap_horizon_dark' ,
91
92
'sap_horizon_hcb' ,
92
- 'sap_horizon_hcw'
93
- ]
94
- }
93
+ 'sap_horizon_hcw' ,
94
+ ] ,
95
+ } ,
95
96
] ,
96
97
97
98
'import/order' : [
@@ -101,25 +102,25 @@ const config = tseslint.config(
101
102
102
103
alphabetize : {
103
104
order : 'asc' ,
104
- caseInsensitive : true
105
- }
106
- }
105
+ caseInsensitive : true ,
106
+ } ,
107
+ } ,
107
108
] ,
108
109
109
110
'import/no-duplicates' : 'error' ,
110
111
'import/no-unresolved' : 'off' ,
111
112
112
113
// recommended eslint rules
113
- 'no-extra-boolean-cast' : 'warn'
114
- }
114
+ 'no-extra-boolean-cast' : 'warn' ,
115
+ } ,
115
116
} ,
116
117
{
117
118
files : [ '**/*.ts' , '**/*.tsx' ] ,
118
119
119
120
settings : {
120
121
'import/resolver' : {
121
- typescript : true
122
- }
122
+ typescript : true ,
123
+ } ,
123
124
} ,
124
125
125
126
rules : {
@@ -136,16 +137,16 @@ const config = tseslint.config(
136
137
'@typescript-eslint/consistent-type-exports' : [
137
138
'error' ,
138
139
{
139
- fixMixedExportsWithInlineTypeSpecifier : false
140
- }
140
+ fixMixedExportsWithInlineTypeSpecifier : false ,
141
+ } ,
141
142
] ,
142
143
143
144
'@typescript-eslint/consistent-type-imports' : [
144
145
'error' ,
145
146
{
146
147
prefer : 'type-imports' ,
147
- fixStyle : 'separate-type-imports'
148
- }
148
+ fixStyle : 'separate-type-imports' ,
149
+ } ,
149
150
] ,
150
151
151
152
'@typescript-eslint/no-floating-promises' : 'warn' ,
@@ -155,55 +156,55 @@ const config = tseslint.config(
155
156
{
156
157
varsIgnorePattern : '^_' ,
157
158
argsIgnorePattern : '^_' ,
158
- caughtErrorsIgnorePattern : '^_'
159
- }
159
+ caughtErrorsIgnorePattern : '^_' ,
160
+ } ,
160
161
] ,
161
162
162
163
'import/named' : 'off' ,
163
164
'import/namespace' : 'off' ,
164
165
'import/default' : 'off' ,
165
- 'import/no-named-as-default-member' : 'off'
166
- }
166
+ 'import/no-named-as-default-member' : 'off' ,
167
+ } ,
167
168
} ,
168
169
{
169
170
files : [ '**/*.mjs' ] ,
170
- ...tseslint . configs . disableTypeChecked
171
+ ...tseslint . configs . disableTypeChecked ,
171
172
} ,
172
173
{
173
174
files : [
174
175
'packages/main/src/webComponents/*/index.tsx' ,
175
176
'packages/compat/src/components/TableCell/index.tsx' ,
176
- 'packages/compat/src/components/TableGroupRow/index.tsx'
177
+ 'packages/compat/src/components/TableGroupRow/index.tsx' ,
177
178
] ,
178
179
179
180
rules : {
180
- '@typescript-eslint/no-empty-object-type' : 'off'
181
- }
181
+ '@typescript-eslint/no-empty-object-type' : 'off' ,
182
+ } ,
182
183
} ,
183
184
{
184
185
files : [
185
186
'packages/main/src/components/AnalyticalTable/defaults/**/*.tsx' ,
186
187
'packages/main/src/components/AnalyticalTable/hooks/*.ts' ,
187
188
'packages/main/src/components/AnalyticalTable/hooks/*.tsx' ,
188
- 'packages/main/src/components/AnalyticalTable/TableBody/VirtualTableBodyContainer.tsx'
189
+ 'packages/main/src/components/AnalyticalTable/TableBody/VirtualTableBodyContainer.tsx' ,
189
190
] ,
190
191
191
192
rules : {
192
- 'react/prop-types' : 'off'
193
- }
193
+ 'react/prop-types' : 'off' ,
194
+ } ,
194
195
} ,
195
196
{
196
197
files : [ 'cypress/**/*' ] ,
197
198
198
199
rules : {
199
- '@typescript-eslint/no-namespace' : 'off'
200
- }
200
+ '@typescript-eslint/no-namespace' : 'off' ,
201
+ } ,
201
202
} ,
202
203
{
203
204
files : [ '**/*.cy.ts' , '**/*.cy.tsx' ] ,
204
205
205
206
plugins : {
206
- 'no-only-tests' : noOnlyTests
207
+ 'no-only-tests' : noOnlyTests ,
207
208
} ,
208
209
209
210
rules : {
@@ -212,8 +213,8 @@ const config = tseslint.config(
212
213
'react/no-unescaped-entities' : 'off' ,
213
214
'@typescript-eslint/unbound-method' : 'warn' ,
214
215
'react/display-name' : 'off' ,
215
- 'no-only-tests/no-only-tests' : 'error'
216
- }
216
+ 'no-only-tests/no-only-tests' : 'error' ,
217
+ } ,
217
218
} ,
218
219
219
220
// Storybook
@@ -223,8 +224,8 @@ const config = tseslint.config(
223
224
rules : {
224
225
'react/prop-types' : 'off' ,
225
226
'@typescript-eslint/no-unused-vars' : 'warn' ,
226
- 'react/no-unescaped-entities' : 'off'
227
- }
227
+ 'react/no-unescaped-entities' : 'off' ,
228
+ } ,
228
229
} ,
229
230
230
231
// no-restricted-imports rule for compat package
@@ -238,16 +239,16 @@ const config = tseslint.config(
238
239
{
239
240
name : '@ui5/webcomponents-react' ,
240
241
message :
241
- "Please use deep imports from @ui5/webcomponents-react. Example: import { Button } from '@ui5/webcomponents-react/dist/webComponents/Button/index.js';"
242
- }
243
- ]
244
- }
245
- ]
246
- }
242
+ "Please use deep imports from @ui5/webcomponents-react. Example: import { Button } from '@ui5/webcomponents-react/dist/webComponents/Button/index.js';" ,
243
+ } ,
244
+ ] ,
245
+ } ,
246
+ ] ,
247
+ } ,
247
248
} ,
248
249
249
250
// prettier plugin must be the last entry in the config!
250
- prettierPlugin
251
+ prettierPlugin ,
251
252
) ;
252
253
253
254
export default config ;
0 commit comments