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