@iobroker/repochecker 3.2.3 → 3.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,4 +1,3 @@
1
- /* eslint-disable no-unused-vars */
2
1
  'use strict';
3
2
  /*
4
3
  This module is a support module for iobroker.repochecker
@@ -50,75 +49,75 @@ const stdAttributes = [
50
49
  'validatorErrorText',
51
50
  'validatorNoSaveOnError',
52
51
 
53
- '#include'
52
+ '#include',
54
53
  ];
55
54
 
56
55
  const validComponents = {
57
- 'accordion':check_accordion,
58
- 'alive': check_alive,
59
- 'autocomplete': check_autocomplete,
60
- 'autocompleteSendTo': check_autocompleteSendTo,
61
-
62
- 'certificate': check_certificate,
63
- 'certificates': check_certificates,
64
- 'certificateCollection': check_certificateCollection,
65
- 'checkbox': check_checkbox,
66
- 'checkLicense': check_checkLicense,
67
- 'chips': check_chips,
68
- 'color': check_color,
69
- 'coordinates': check_coordinates,
70
- 'cron': check_cron,
71
- 'custom': check_custom,
72
- 'datePicker': check_datePicker,
73
- 'deviceManager': check_deviceManager,
74
- 'divider': check_divider,
75
-
76
- 'file': check_file,
77
- 'fileSelector': check_fileSelector,
78
- 'func': check_func,
79
-
80
- 'header': check_header,
81
-
82
- 'image': check_image,
83
- 'imageSendTo': check_imageSendTo,
84
- 'instance': check_instance,
85
- 'interface': check_interface,
86
- 'ip': check_ip,
87
-
88
- 'jsonEditor': check_jsonEditor,
89
-
90
- 'language': check_language,
91
- 'license': check_license,
92
-
93
- 'number': check_number,
94
-
95
- 'objectId': check_objectId,
96
-
97
- 'password': check_password,
98
- 'pattern': check_pattern,
99
- 'port': check_port,
100
-
101
- 'qrCode': check_qrCode,
102
-
103
- 'room': check_room,
104
-
105
- 'select': check_select,
106
- 'selectSendTo': check_selectSendTo,
107
- 'sendTo': check_sendTo,
108
- 'setState': check_setState,
109
- 'slider': check_slider,
110
- 'state': check_state,
111
- 'staticImage': check_staticImage,
112
- 'staticLink': check_staticLink,
113
- 'staticText': check_staticText,
114
-
115
- 'table': check_table,
116
- 'text': check_text,
117
- 'textSendTo': check_textSendTo,
118
- 'timePicker': check_timePicker,
119
-
120
- 'user': check_user,
121
- 'uuid': check_uuid,
56
+ accordion: check_accordion,
57
+ alive: check_alive,
58
+ autocomplete: check_autocomplete,
59
+ autocompleteSendTo: check_autocompleteSendTo,
60
+
61
+ certificate: check_certificate,
62
+ certificates: check_certificates,
63
+ certificateCollection: check_certificateCollection,
64
+ checkbox: check_checkbox,
65
+ checkLicense: check_checkLicense,
66
+ chips: check_chips,
67
+ color: check_color,
68
+ coordinates: check_coordinates,
69
+ cron: check_cron,
70
+ custom: check_custom,
71
+ datePicker: check_datePicker,
72
+ deviceManager: check_deviceManager,
73
+ divider: check_divider,
74
+
75
+ file: check_file,
76
+ fileSelector: check_fileSelector,
77
+ func: check_func,
78
+
79
+ header: check_header,
80
+
81
+ image: check_image,
82
+ imageSendTo: check_imageSendTo,
83
+ instance: check_instance,
84
+ interface: check_interface,
85
+ ip: check_ip,
86
+
87
+ jsonEditor: check_jsonEditor,
88
+
89
+ language: check_language,
90
+ license: check_license,
91
+
92
+ number: check_number,
93
+
94
+ objectId: check_objectId,
95
+
96
+ password: check_password,
97
+ pattern: check_pattern,
98
+ port: check_port,
99
+
100
+ qrCode: check_qrCode,
101
+
102
+ room: check_room,
103
+
104
+ select: check_select,
105
+ selectSendTo: check_selectSendTo,
106
+ sendTo: check_sendTo,
107
+ setState: check_setState,
108
+ slider: check_slider,
109
+ state: check_state,
110
+ staticImage: check_staticImage,
111
+ staticLink: check_staticLink,
112
+ staticText: check_staticText,
113
+
114
+ table: check_table,
115
+ text: check_text,
116
+ textSendTo: check_textSendTo,
117
+ timePicker: check_timePicker,
118
+
119
+ user: check_user,
120
+ uuid: check_uuid,
122
121
  };
123
122
 
124
123
  function handleResponsiveError(context, msg) {
@@ -126,7 +125,9 @@ function handleResponsiveError(context, msg) {
126
125
  context.errors.push(`${msg}`);
127
126
  responsiveErrorLimit--;
128
127
  if (responsiveErrorLimit === 0) {
129
- context.errors.push(`[E510] responsive check: maximum issues reached, please fix reported ones and recheck`);
128
+ context.errors.push(
129
+ `[E510] responsive check: maximum issues reached, please fix reported ones and recheck`,
130
+ );
130
131
  }
131
132
  }
132
133
  }
@@ -136,308 +137,339 @@ function handleResponsiveWarning(context, msg) {
136
137
  context.warnings.push(`${msg}`);
137
138
  responsiveWarningLimit--;
138
139
  if (responsiveWarningLimit === 0) {
139
- context.warnings.push(`[W510] responsive check: maximum issues reached, please fix reported ones and recheck`);
140
+ context.warnings.push(
141
+ `[W510] responsive check: maximum issues reached, please fix reported ones and recheck`,
142
+ );
140
143
  }
141
144
  }
142
145
  }
143
146
 
144
- function chk_responsive (context, path, jsonConfig, component, opts){
147
+ function chk_responsive(context, path, jsonConfig, component, opts) {
145
148
  common.debug(`chk_responsive ${path}`);
146
149
 
147
150
  if (!opts || !opts.sizesOptional) {
148
151
  const missing = [];
149
- if (!jsonConfig.xs) missing.push('xs');
150
- if (!jsonConfig.sm) missing.push('sm');
151
- if (!jsonConfig.md) missing.push('md');
152
- if (!jsonConfig.lg) missing.push('lg');
153
- if (!jsonConfig.xl) missing.push('xl');
152
+ if (!jsonConfig.xs) {
153
+ missing.push('xs');
154
+ }
155
+ if (!jsonConfig.sm) {
156
+ missing.push('sm');
157
+ }
158
+ if (!jsonConfig.md) {
159
+ missing.push('md');
160
+ }
161
+ if (!jsonConfig.lg) {
162
+ missing.push('lg');
163
+ }
164
+ if (!jsonConfig.xl) {
165
+ missing.push('xl');
166
+ }
154
167
  if (missing.length) {
155
- handleResponsiveError(context, `[E507] missing size attributes [${missing.join(',')}] for ${component} at ${path}`);
168
+ handleResponsiveError(
169
+ context,
170
+ `[E507] missing size attributes [${missing.join(',')}] for ${component} at ${path}`,
171
+ );
156
172
  }
157
173
  }
158
174
 
159
- if ( jsonConfig.xs && jsonConfig.xs != 12) {
160
- handleResponsiveWarning(context, `[W508] attribute "xs" for ${component} should specify a value of "12" at ${path}`);
175
+ if (jsonConfig.xs && jsonConfig.xs != 12) {
176
+ handleResponsiveWarning(
177
+ context,
178
+ `[W508] attribute "xs" for ${component} should specify a value of "12" at ${path}`,
179
+ );
161
180
  }
162
181
 
163
182
  let ii = 12;
164
- if (jsonConfig.xs) ii = jsonConfig.xs;
165
- if (jsonConfig.sm && jsonConfig.sm > ii ) {
166
- handleResponsiveError(context, `[E509] "sm" value (${jsonConfig.sm}) for ${component} greater then value for smaller displays`);
183
+ if (jsonConfig.xs) {
184
+ ii = jsonConfig.xs;
185
+ }
186
+ if (jsonConfig.sm && jsonConfig.sm > ii) {
187
+ handleResponsiveError(
188
+ context,
189
+ `[E509] "sm" value (${jsonConfig.sm}) for ${component} greater then value for smaller displays`,
190
+ );
167
191
  } else {
168
192
  ii = jsonConfig.sm;
169
193
  }
170
- if (jsonConfig.md && jsonConfig.md > ii ) {
171
- handleResponsiveError(context, `[E509] "md" value (${jsonConfig.md}) for ${component} greater then value for smaller displays`);
194
+ if (jsonConfig.md && jsonConfig.md > ii) {
195
+ handleResponsiveError(
196
+ context,
197
+ `[E509] "md" value (${jsonConfig.md}) for ${component} greater then value for smaller displays`,
198
+ );
172
199
  } else {
173
200
  ii = jsonConfig.md;
174
201
  }
175
- if (jsonConfig.lg && jsonConfig.lg > ii ) {
176
- handleResponsiveError(context, `[E509] "lg" value (${jsonConfig.lg}) for ${component} greater then value for smaller displays`);
202
+ if (jsonConfig.lg && jsonConfig.lg > ii) {
203
+ handleResponsiveError(
204
+ context,
205
+ `[E509] "lg" value (${jsonConfig.lg}) for ${component} greater then value for smaller displays`,
206
+ );
177
207
  } else {
178
208
  ii = jsonConfig.lg;
179
209
  }
180
- if (jsonConfig.xl && jsonConfig.xl > ii ) {
181
- handleResponsiveError(context, `[E509] "xl" value (${jsonConfig.xl}) for ${component} greater then value for smaller displays`);
210
+ if (jsonConfig.xl && jsonConfig.xl > ii) {
211
+ handleResponsiveError(
212
+ context,
213
+ `[E509] "xl" value (${jsonConfig.xl}) for ${component} greater then value for smaller displays`,
214
+ );
182
215
  }
183
216
  }
184
217
 
185
- function check_accordion (context, path, jsonConfig, inTable){
218
+ function check_accordion(context, path, jsonConfig, _inTable) {
186
219
  common.debug(`check_accordion ${path}`);
187
220
  chk_responsive(context, path, jsonConfig, 'accordion');
188
221
  }
189
222
 
190
- function check_alive(context, path, jsonConfig, inTable){
223
+ function check_alive(context, path, jsonConfig, _inTable) {
191
224
  common.debug(`check_alive ${path}`);
192
225
  chk_responsive(context, path, jsonConfig, 'alive');
193
226
  }
194
227
 
195
- function check_autocomplete(context, path, jsonConfig, inTable){
228
+ function check_autocomplete(context, path, jsonConfig, _inTable) {
196
229
  common.debug(`check_autocomplete ${path}`);
197
230
  chk_responsive(context, path, jsonConfig, 'autocomplete');
198
231
  }
199
232
 
200
- function check_autocompleteSendTo(context, path, jsonConfig, inTable){
233
+ function check_autocompleteSendTo(context, path, jsonConfig, _inTable) {
201
234
  common.debug(`check_autocompleteSendTo ${path}`);
202
235
  chk_responsive(context, path, jsonConfig, 'autocompleteSendTo');
203
236
  }
204
237
 
205
- function check_certificate(context, path, jsonConfig, inTable){
238
+ function check_certificate(context, path, jsonConfig, _inTable) {
206
239
  common.debug(`check_certificate ${path}`);
207
240
  chk_responsive(context, path, jsonConfig, 'certificate');
208
241
  }
209
242
 
210
- function check_certificates(context, path, jsonConfig, inTable){
243
+ function check_certificates(context, path, jsonConfig, _inTable) {
211
244
  common.debug(`check_certificates ${path}`);
212
245
  chk_responsive(context, path, jsonConfig, 'certificates');
213
246
  }
214
247
 
215
- function check_certificateCollection(context, path, jsonConfig, inTable){
248
+ function check_certificateCollection(context, path, jsonConfig, _inTable) {
216
249
  common.debug(`check_certificateCollection ${path}`);
217
250
  chk_responsive(context, path, jsonConfig, 'certificateCollection');
218
251
  }
219
252
 
220
- function check_checkbox(context, path, jsonConfig, inTable){
253
+ function check_checkbox(context, path, jsonConfig, _inTable) {
221
254
  common.debug(`check_checkbox ${path}`);
222
255
  chk_responsive(context, path, jsonConfig, 'checkbox');
223
256
  }
224
257
 
225
- function check_checkLicense(context, path, jsonConfig, inTable){
258
+ function check_checkLicense(context, path, jsonConfig, _inTable) {
226
259
  common.debug(`check_checkLicense ${path}`);
227
260
  chk_responsive(context, path, jsonConfig, 'checkLicense');
228
261
  }
229
262
 
230
- function check_chips(context, path, jsonConfig, inTable){
263
+ function check_chips(context, path, jsonConfig, _inTable) {
231
264
  common.debug(`check_chips ${path}`);
232
265
  chk_responsive(context, path, jsonConfig, 'chips');
233
266
  }
234
267
 
235
- function check_color(context, path, jsonConfig, inTable){
268
+ function check_color(context, path, jsonConfig, _inTable) {
236
269
  common.debug(`check_color ${path}`);
237
270
  chk_responsive(context, path, jsonConfig, 'color');
238
271
  }
239
272
 
240
- function check_coordinates(context, path, jsonConfig, inTable){
273
+ function check_coordinates(context, path, jsonConfig, _inTable) {
241
274
  common.debug(`check_coordinates ${path}`);
242
275
  chk_responsive(context, path, jsonConfig, 'coordinates');
243
276
  }
244
277
 
245
- function check_cron(context, path, jsonConfig, inTable){
278
+ function check_cron(context, path, jsonConfig, _inTable) {
246
279
  common.debug(`check_staticText ${path}`);
247
280
  chk_responsive(context, path, jsonConfig, 'cron');
248
281
  }
249
282
 
250
- function check_custom(context, path, jsonConfig, inTable){
283
+ function check_custom(context, path, jsonConfig, _inTable) {
251
284
  common.debug(`check_custom ${path}`);
252
- chk_responsive(context, path, jsonConfig, 'custom', {sizesOptional:true});
285
+ chk_responsive(context, path, jsonConfig, 'custom', { sizesOptional: true });
253
286
  }
254
287
 
255
- function check_datePicker(context, path, jsonConfig, inTable){
288
+ function check_datePicker(context, path, jsonConfig, _inTable) {
256
289
  common.debug(`check_datePicker ${path}`);
257
290
  chk_responsive(context, path, jsonConfig, 'datePicker');
258
291
  }
259
292
 
260
- function check_deviceManager(context, path, jsonConfig, inTable){
293
+ function check_deviceManager(context, path, jsonConfig, _inTable) {
261
294
  common.debug(`check_deviceManager ${path}`);
262
- chk_responsive(context, path, jsonConfig, 'deviceManager', {sizesOptional:true});
295
+ chk_responsive(context, path, jsonConfig, 'deviceManager', { sizesOptional: true });
263
296
  }
264
297
 
265
- function check_divider(context, path, jsonConfig, inTable){
298
+ function check_divider(context, path, jsonConfig, _inTable) {
266
299
  common.debug(`check_divider ${path}`);
267
- chk_responsive(context, path, jsonConfig, 'divider', {sizesOptional:true});
300
+ chk_responsive(context, path, jsonConfig, 'divider', { sizesOptional: true });
268
301
  }
269
302
 
270
- function check_file(context, path, jsonConfig, inTable){
303
+ function check_file(context, path, jsonConfig, _inTable) {
271
304
  common.debug(`check_file ${path}`);
272
305
  chk_responsive(context, path, jsonConfig, 'file');
273
306
  }
274
307
 
275
- function check_fileSelector(context, path, jsonConfig, inTable){
308
+ function check_fileSelector(context, path, jsonConfig, _inTable) {
276
309
  common.debug(`check_fileSelector ${path}`);
277
310
  chk_responsive(context, path, jsonConfig, 'fileSelector');
278
311
  }
279
312
 
280
- function check_func(context, path, jsonConfig, inTable){
313
+ function check_func(context, path, jsonConfig, _inTable) {
281
314
  common.debug(`check_func ${path}`);
282
315
  chk_responsive(context, path, jsonConfig, 'func');
283
316
  }
284
317
 
285
- function check_header(context, path, jsonConfig, inTable){
318
+ function check_header(context, path, jsonConfig, _inTable) {
286
319
  common.debug(`check_header ${path}`);
287
- chk_responsive(context, path, jsonConfig, 'header', {sizesOptional:true});
320
+ chk_responsive(context, path, jsonConfig, 'header', { sizesOptional: true });
288
321
  }
289
322
 
290
- function check_image(context, path, jsonConfig, inTable){
323
+ function check_image(context, path, jsonConfig, _inTable) {
291
324
  common.debug(`check_image ${path}`);
292
325
  chk_responsive(context, path, jsonConfig, 'image');
293
326
  }
294
327
 
295
- function check_imageSendTo(context, path, jsonConfig, inTable){
328
+ function check_imageSendTo(context, path, jsonConfig, _inTable) {
296
329
  common.debug(`check_imageSendTo ${path}`);
297
330
  chk_responsive(context, path, jsonConfig, 'imageSendTo');
298
331
  }
299
332
 
300
- function check_instance(context, path, jsonConfig, inTable){
333
+ function check_instance(context, path, jsonConfig, _inTable) {
301
334
  common.debug(`check_instance ${path}`);
302
335
  chk_responsive(context, path, jsonConfig, 'instance');
303
336
  }
304
337
 
305
- function check_interface(context, path, jsonConfig, inTable){
338
+ function check_interface(context, path, jsonConfig, _inTable) {
306
339
  common.debug(`check_interface ${path}`);
307
340
  chk_responsive(context, path, jsonConfig, 'interface');
308
341
  }
309
342
 
310
- function check_ip(context, path, jsonConfig, inTable){
343
+ function check_ip(context, path, jsonConfig, _inTable) {
311
344
  common.debug(`check_ip ${path}`);
312
345
  chk_responsive(context, path, jsonConfig, 'ip');
313
346
  }
314
347
 
315
- function check_jsonEditor(context, path, jsonConfig, inTable){
348
+ function check_jsonEditor(context, path, jsonConfig, _inTable) {
316
349
  common.debug(`check_jsonEditor ${path}`);
317
350
  chk_responsive(context, path, jsonConfig, 'jsonEditor');
318
351
  }
319
352
 
320
- function check_language(context, path, jsonConfig, inTable){
353
+ function check_language(context, path, jsonConfig, _inTable) {
321
354
  common.debug(`check_language ${path}`);
322
355
  chk_responsive(context, path, jsonConfig, 'language');
323
356
  }
324
357
 
325
- function check_license(context, path, jsonConfig, inTable){
358
+ function check_license(context, path, jsonConfig, _inTable) {
326
359
  common.debug(`check_license ${path}`);
327
360
  chk_responsive(context, path, jsonConfig, 'license');
328
361
  }
329
362
 
330
- function check_number(context, path, jsonConfig, inTable){
363
+ function check_number(context, path, jsonConfig, _inTable) {
331
364
  common.debug(`check_number ${path}`);
332
365
  chk_responsive(context, path, jsonConfig, 'number');
333
366
  }
334
367
 
335
- function check_objectId(context, path, jsonConfig, inTable){
368
+ function check_objectId(context, path, jsonConfig, _inTable) {
336
369
  common.debug(`check_objectId ${path}`);
337
370
  chk_responsive(context, path, jsonConfig, 'objectId');
338
371
  }
339
372
 
340
- function check_password(context, path, jsonConfig, inTable){
373
+ function check_password(context, path, jsonConfig, _inTable) {
341
374
  common.debug(`check_password ${path}`);
342
375
  chk_responsive(context, path, jsonConfig, 'password');
343
376
  }
344
377
 
345
- function check_pattern(context, path, jsonConfig, inTable){
378
+ function check_pattern(context, path, jsonConfig, _inTable) {
346
379
  common.debug(`check_pattern ${path}`);
347
380
  chk_responsive(context, path, jsonConfig, 'pattern');
348
381
  }
349
382
 
350
- function check_port(context, path, jsonConfig, inTable){
383
+ function check_port(context, path, jsonConfig, _inTable) {
351
384
  common.debug(`check_port ${path}`);
352
385
  chk_responsive(context, path, jsonConfig, 'port');
353
386
  }
354
387
 
355
- function check_qrCode(context, path, jsonConfig, inTable){
388
+ function check_qrCode(context, path, jsonConfig, _inTable) {
356
389
  common.debug(`check_qrCode ${path}`);
357
390
  chk_responsive(context, path, jsonConfig, 'qrCode');
358
391
  }
359
392
 
360
- function check_room(context, path, jsonConfig, inTable){
393
+ function check_room(context, path, jsonConfig, _inTable) {
361
394
  common.debug(`check_room ${path}`);
362
395
  chk_responsive(context, path, jsonConfig, 'room');
363
396
  }
364
397
 
365
- function check_select(context, path, jsonConfig, inTable){
398
+ function check_select(context, path, jsonConfig, _inTable) {
366
399
  common.debug(`check_select ${path}`);
367
400
  chk_responsive(context, path, jsonConfig, 'select');
368
401
  }
369
402
 
370
- function check_selectSendTo(context, path, jsonConfig, inTable){
403
+ function check_selectSendTo(context, path, jsonConfig, _nTable) {
371
404
  common.debug(`check_selectSendTo ${path}`);
372
405
  chk_responsive(context, path, jsonConfig, 'selectSendTo');
373
406
  }
374
407
 
375
- function check_sendTo(context, path, jsonConfig, inTable){
408
+ function check_sendTo(context, path, jsonConfig, _inTable) {
376
409
  common.debug(`check_sendTo ${path}`);
377
410
  chk_responsive(context, path, jsonConfig, 'sendTo');
378
411
  }
379
412
 
380
- function check_setState(context, path, jsonConfig, inTable){
413
+ function check_setState(context, path, jsonConfig, _inTable) {
381
414
  common.debug(`check_setState ${path}`);
382
415
  chk_responsive(context, path, jsonConfig, 'setState');
383
416
  }
384
417
 
385
- function check_slider(context, path, jsonConfig, inTable){
418
+ function check_slider(context, path, jsonConfig, _inTable) {
386
419
  common.debug(`check_slider ${path}`);
387
420
  chk_responsive(context, path, jsonConfig, 'slider');
388
421
  }
389
422
 
390
- function check_state(context, path, jsonConfig, inTable){
423
+ function check_state(context, path, jsonConfig, _inTable) {
391
424
  common.debug(`check_state ${path}`);
392
425
  chk_responsive(context, path, jsonConfig, 'state');
393
426
  }
394
427
 
395
- function check_staticImage(context, path, jsonConfig, inTable){
428
+ function check_staticImage(context, path, jsonConfig, _inTable) {
396
429
  common.debug(`check_staticImage ${path}`);
397
- chk_responsive(context, path, jsonConfig, 'staticImage', {sizesOptional:true});
430
+ chk_responsive(context, path, jsonConfig, 'staticImage', { sizesOptional: true });
398
431
  }
399
432
 
400
- function check_staticLink(context, path, jsonConfig, inTable){
433
+ function check_staticLink(context, path, jsonConfig, _inTable) {
401
434
  common.debug(`check_staticLink ${path}`);
402
435
  chk_responsive(context, path, jsonConfig, 'staticLink');
403
436
  }
404
437
 
405
- function check_staticText(context, path, jsonConfig, inTable){
438
+ function check_staticText(context, path, jsonConfig, _inTable) {
406
439
  common.debug(`check_staticText ${path}`);
407
440
  chk_responsive(context, path, jsonConfig, 'staticText');
408
441
  }
409
442
 
410
- function check_table(context, path, jsonConfig, inTable){
443
+ function check_table(context, path, jsonConfig, _inTable) {
411
444
  common.debug(`check_table ${path}`);
412
445
  chk_responsive(context, path, jsonConfig, 'table');
413
446
  }
414
447
 
415
- function check_text(context, path, jsonConfig, inTable){
448
+ function check_text(context, path, jsonConfig, _inTable) {
416
449
  common.debug(`check_text ${path}`);
417
450
  chk_responsive(context, path, jsonConfig, 'text');
418
451
  }
419
452
 
420
- function check_textSendTo(context, path, jsonConfig, inTable){
453
+ function check_textSendTo(context, path, jsonConfig, _inTable) {
421
454
  common.debug(`check_textSendTo ${path}`);
422
455
  chk_responsive(context, path, jsonConfig, 'testSendTo');
423
456
  }
424
457
 
425
- function check_timePicker(context, path, jsonConfig, inTable){
458
+ function check_timePicker(context, path, jsonConfig, _inTable) {
426
459
  common.debug(`check_timePicker ${path}`);
427
460
  chk_responsive(context, path, jsonConfig, 'timePicker');
428
461
  }
429
462
 
430
- function check_user(context, path, jsonConfig, inTable){
463
+ function check_user(context, path, jsonConfig, _inTable) {
431
464
  common.debug(`check_user ${path}`);
432
465
  chk_responsive(context, path, jsonConfig, 'user');
433
466
  }
434
467
 
435
- function check_uuid(context, path, jsonConfig, inTable){
468
+ function check_uuid(context, path, jsonConfig, _inTable) {
436
469
  common.debug(`check_uuid ${path}`);
437
470
  chk_responsive(context, path, jsonConfig, 'uuid');
438
471
  }
439
472
 
440
-
441
473
  function checkComponent(context, path, jsonConfig) {
442
474
  common.debug(`checkComponent (${path})`);
443
475
 
@@ -449,36 +481,24 @@ function checkComponent(context, path, jsonConfig) {
449
481
 
450
482
  if (validComponents[type] === undefined) {
451
483
  context.errors.push(`[E504] unexpected component "${type}" detected at ${path}`);
452
- } else if (typeof(validComponents[type]) === 'function') {
453
- (validComponents[type])(context, path, jsonConfig, false);
484
+ } else if (typeof validComponents[type] === 'function') {
485
+ validComponents[type](context, path, jsonConfig, false);
454
486
  } else {
455
487
  common.debug(`no checks defined for component ${type}`);
456
488
  }
457
-
458
489
  }
459
490
 
460
491
  function checkPanel(context, path, jsonConfig, isRoot) {
461
492
  common.debug(`checkPanel(${path})`);
462
493
 
463
- const rootAttributes = [
464
- 'i18n',
465
- ];
494
+ const rootAttributes = ['i18n'];
466
495
 
467
- const myAttributes = [
468
- 'type',
469
-
470
- 'collapsable',
471
- 'color',
472
- 'icon',
473
- 'innerStyle',
474
- 'items',
475
- 'label',
476
- ];
496
+ const myAttributes = ['type', 'collapsable', 'color', 'icon', 'innerStyle', 'items', 'label'];
477
497
 
478
498
  //console.log('on PANEL entry');
479
499
  //console.log(jsonConfig);
480
500
 
481
- const validAttributes = stdAttributes.concat(myAttributes).concat(isRoot?rootAttributes:[]);
501
+ const validAttributes = stdAttributes.concat(myAttributes).concat(isRoot ? rootAttributes : []);
482
502
 
483
503
  for (const key in jsonConfig) {
484
504
  common.debug(` scanning ${key}`);
@@ -489,7 +509,7 @@ function checkPanel(context, path, jsonConfig, isRoot) {
489
509
 
490
510
  if (key === 'type') {
491
511
  if (jsonConfig[key] !== 'panel') {
492
- console.log( `INTERNAL ERROR: unexpected type ${jsonConfig[key]} encountered while scanning "panel"`);
512
+ console.log(`INTERNAL ERROR: unexpected type ${jsonConfig[key]} encountered while scanning "panel"`);
493
513
  return;
494
514
  }
495
515
  }
@@ -549,29 +569,13 @@ function checkTabs(context, path, jsonConfig) {
549
569
  function checkJsonConfig(context, path, jsonConfig) {
550
570
  common.debug(`checkCode_jsonConfig({context}, ${path}, {jsonConfig}`);
551
571
 
552
- const commonAttributes = [
553
- 'i18n',
554
- 'items',
555
- 'type',
556
- ];
557
-
558
- const panelAttributes = [
559
- 'collapsable',
560
- 'color',
561
- 'icon',
562
- 'innerStyle',
563
- 'label',
564
- ];
565
-
566
- const tabsAttributes = [
567
- 'iconPosition',
568
- 'tabsStyle',
569
- ];
570
-
571
- const validTypes = [
572
- 'panel',
573
- 'tabs',
574
- ];
572
+ const commonAttributes = ['i18n', 'items', 'type'];
573
+
574
+ const panelAttributes = ['collapsable', 'color', 'icon', 'innerStyle', 'label'];
575
+
576
+ const tabsAttributes = ['iconPosition', 'tabsStyle'];
577
+
578
+ const validTypes = ['panel', 'tabs'];
575
579
 
576
580
  let baseType = 'panel';
577
581
  if (!jsonConfig['type']) {
@@ -585,8 +589,12 @@ function checkJsonConfig(context, path, jsonConfig) {
585
589
  }
586
590
 
587
591
  let validAttributes = commonAttributes;
588
- if (baseType === 'panel') validAttributes = validAttributes.concat(panelAttributes);
589
- if (baseType === 'tabs') validAttributes = validAttributes.concat(tabsAttributes);
592
+ if (baseType === 'panel') {
593
+ validAttributes = validAttributes.concat(panelAttributes);
594
+ }
595
+ if (baseType === 'tabs') {
596
+ validAttributes = validAttributes.concat(tabsAttributes);
597
+ }
590
598
 
591
599
  for (const key in jsonConfig) {
592
600
  common.debug(``);
@@ -596,9 +604,9 @@ function checkJsonConfig(context, path, jsonConfig) {
596
604
  }
597
605
  if (key === 'items') {
598
606
  if (baseType == 'panel') {
599
- checkPanel( context, `${path}/items`, jsonConfig, true);
607
+ checkPanel(context, `${path}/items`, jsonConfig, true);
600
608
  } else if (baseType == 'tabs') {
601
- checkTabs( context, `${path}/items`, jsonConfig['items'], false);
609
+ checkTabs(context, `${path}/items`, jsonConfig['items'], false);
602
610
  }
603
611
  }
604
612
  }
@@ -622,4 +630,3 @@ exports.checkJsonConfig = checkJsonConfig;
622
630
  // [508] responsive check: attribute "xs" should specify a value of "12" at ${path}
623
631
  // [509] responsive check: "sm" value (${jsonConfig.sm}) greater then value for smaller displays
624
632
  // [510] responsive check: maximum issues reached, please fix reported ones and recheck
625
-