ejv 2.0.4 → 2.1.0

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.
Files changed (57) hide show
  1. package/.mocharc.json +1 -1
  2. package/CHANGELOG.md +18 -0
  3. package/README-KR.md +166 -165
  4. package/README.md +182 -178
  5. package/eslint.config.mjs +59 -0
  6. package/package.json +18 -13
  7. package/spec/ArrayScheme.ts +46 -46
  8. package/spec/CommonScheme.ts +15 -15
  9. package/spec/DateScheme.ts +22 -22
  10. package/spec/NumberScheme.ts +229 -121
  11. package/spec/ObjectScheme.ts +22 -22
  12. package/spec/RegExpScheme.ts +5 -5
  13. package/spec/StringScheme.ts +223 -126
  14. package/spec/common-test-util.ts +2 -2
  15. package/spec/ejv.spec.ts +20 -20
  16. package/spec/testers.spec.ts +5 -5
  17. package/src/constants.ts +12 -5
  18. package/src/ejv.ts +291 -202
  19. package/src/index.ts +1 -1
  20. package/src/interfaces.ts +11 -12
  21. package/src/tester.ts +14 -10
  22. package/src/util.ts +2 -2
  23. package/.eslintrc.json +0 -88
  24. package/build/cjs/constants.js +0 -118
  25. package/build/cjs/constants.js.map +0 -1
  26. package/build/cjs/ejv.js +0 -1266
  27. package/build/cjs/ejv.js.map +0 -1
  28. package/build/cjs/index.js +0 -14
  29. package/build/cjs/index.js.map +0 -1
  30. package/build/cjs/interfaces.js +0 -29
  31. package/build/cjs/interfaces.js.map +0 -1
  32. package/build/cjs/package.json +0 -1
  33. package/build/cjs/tester.js +0 -274
  34. package/build/cjs/tester.js.map +0 -1
  35. package/build/cjs/util.js +0 -103
  36. package/build/cjs/util.js.map +0 -1
  37. package/build/constants.d.ts +0 -101
  38. package/build/ejv.d.ts +0 -2
  39. package/build/esm/constants.js +0 -115
  40. package/build/esm/constants.js.map +0 -1
  41. package/build/esm/ejv.js +0 -1264
  42. package/build/esm/ejv.js.map +0 -1
  43. package/build/esm/index.js +0 -4
  44. package/build/esm/index.js.map +0 -1
  45. package/build/esm/interfaces.js +0 -33
  46. package/build/esm/interfaces.js.map +0 -1
  47. package/build/esm/package.json +0 -1
  48. package/build/esm/tester.js +0 -240
  49. package/build/esm/tester.js.map +0 -1
  50. package/build/esm/util.js +0 -96
  51. package/build/esm/util.js.map +0 -1
  52. package/build/index.d.ts +0 -3
  53. package/build/interfaces.d.ts +0 -76
  54. package/build/scripts/add-js-extensions.js +0 -46
  55. package/build/scripts/add-js-extensions.js.map +0 -1
  56. package/build/tester.d.ts +0 -33
  57. package/build/util.d.ts +0 -7
package/README.md CHANGED
@@ -6,7 +6,8 @@
6
6
 
7
7
  ejv is JSON validation library. Check your JSON object with simple syntax.
8
8
 
9
- > ejv is written by TypeScript, and published by JavaScript. So you can use this library in TypeScript code and JavaScript code also.
9
+ > ejv is written by TypeScript, and published by JavaScript. So you can use this library in TypeScript code and
10
+ > JavaScript code also.
10
11
 
11
12
  ## Install
12
13
 
@@ -47,17 +48,18 @@ var ejv = _ejv.ejv;
47
48
  - TypeScript
48
49
 
49
50
  ```typescript
50
- const error : null | EjvError = ejv({
51
- a : 10
51
+ const error: null | EjvError = ejv({
52
+ a: 10
52
53
  }, [{
53
- key : 'a',
54
- type : 'number'
54
+ key: 'a',
55
+ type: 'number'
55
56
  }]);
56
57
 
57
58
  if (!error) {
58
- console.log('success');
59
- } else {
60
- console.log('failed');
59
+ console.log('success');
60
+ }
61
+ else {
62
+ console.log('failed');
61
63
  }
62
64
  ```
63
65
 
@@ -65,16 +67,16 @@ if (!error) {
65
67
 
66
68
  ```javascript
67
69
  var error = ejv({
68
- a : 10
70
+ a: 10
69
71
  }, [{
70
- key : 'a',
71
- type : 'number'
72
+ key: 'a',
73
+ type: 'number'
72
74
  }]);
73
75
 
74
76
  if (!error) {
75
- console.log('success');
77
+ console.log('success');
76
78
  } else {
77
- console.log('failed');
79
+ console.log('failed');
78
80
  }
79
81
  ```
80
82
 
@@ -112,10 +114,10 @@ This option is available for all validation rules.
112
114
 
113
115
  ```typescript
114
116
  ejv({
115
- // empty object
117
+ // empty object
116
118
  }, [{
117
- key : 'a',
118
- optional : true // Error does not occur without proffering declared.
119
+ key: 'a',
120
+ optional: true // Error does not occur without proffering declared.
119
121
  }]);
120
122
  ```
121
123
 
@@ -126,10 +128,10 @@ This option is available for all validation rules.
126
128
 
127
129
  ```typescript
128
130
  ejv({
129
- a : null
131
+ a: null
130
132
  }, [{
131
- key : 'a',
132
- nullable : true
133
+ key: 'a',
134
+ nullable: true
133
135
  }]);
134
136
  ```
135
137
 
@@ -140,36 +142,36 @@ This option is available for the rules of validation: `type: number` and `type:
140
142
 
141
143
  ```typescript
142
144
  ejv({
143
- a : 1,
144
- b : 'hello'
145
+ a: 1,
146
+ b: 'hello'
145
147
  }, [{
146
- key : 'a',
147
- type : 'number',
148
- enum : [1, 2, 3] // allow 1, 2, 3
148
+ key: 'a',
149
+ type: 'number',
150
+ enum: [1, 2, 3] // allow 1, 2, 3
149
151
  }, {
150
- key : 'b',
151
- type : 'string',
152
- enum : ['hello', 'ejv'] // allow 'hello', 'ejv'
152
+ key: 'b',
153
+ type: 'string',
154
+ enum: ['hello', 'ejv'] // allow 'hello', 'ejv'
153
155
  }]);
154
156
  ```
155
157
 
156
- - `enumReverse : number[] | string[]`
158
+ - `notEnum : number[] | string[]`
157
159
 
158
160
  Not allows the values that are delivered in an array. This result is reverse of the option `enum`.
159
161
  This option is available for the rules of validation: `type: number` and `type: string`.
160
162
 
161
163
  ```typescript
162
164
  ejv({
163
- a : 1,
164
- b : 'hello'
165
+ a: 1,
166
+ b: 'hello'
165
167
  }, [{
166
- key : 'a',
167
- type : 'number',
168
- enumReverse : [1, 2, 3] // not allow 1, 2, 3
168
+ key: 'a',
169
+ type: 'number',
170
+ notEnum: [1, 2, 3] // not allow 1, 2, 3
169
171
  }, {
170
- key : 'b',
171
- type : 'string',
172
- enumReverse : ['hello', 'ejv'] // not allow 'hello', 'ejv'
172
+ key: 'b',
173
+ type: 'string',
174
+ notEnum: ['hello', 'ejv'] // not allow 'hello', 'ejv'
173
175
  }]);
174
176
  ```
175
177
 
@@ -188,17 +190,17 @@ This option is used only when the `min` option is used.
188
190
 
189
191
  ```typescript
190
192
  ejv({
191
- num1 : 10,
192
- num2 : 10
193
+ num1: 10,
194
+ num2: 10
193
195
  }, [{
194
- key : 'num1',
195
- type : 'number',
196
- min : 10 // success
196
+ key: 'num1',
197
+ type: 'number',
198
+ min: 10 // success
197
199
  }, {
198
- key : 'num2',
199
- type : 'number',
200
- min : 10,
201
- exclusiveMin : true // failed
200
+ key: 'num2',
201
+ type: 'number',
202
+ min: 10,
203
+ exclusiveMin: true // failed
202
204
  }]);
203
205
  ```
204
206
 
@@ -215,17 +217,17 @@ This option is used only when the `min` option is used.
215
217
 
216
218
  ```typescript
217
219
  ejv({
218
- num1 : 10,
219
- num2 : 10
220
+ num1: 10,
221
+ num2: 10
220
222
  }, [{
221
- key : 'num1',
222
- type : 'number',
223
- max : 10 // success
223
+ key: 'num1',
224
+ type: 'number',
225
+ max: 10 // success
224
226
  }, {
225
- key : 'num2',
226
- type : 'number',
227
- max : 10,
228
- exclusiveMax : true // failed
227
+ key: 'num2',
228
+ type: 'number',
229
+ max: 10,
230
+ exclusiveMax: true // failed
229
231
  }]);
230
232
  ```
231
233
 
@@ -235,10 +237,10 @@ Checks the format of the number.
235
237
  If specified as an array, ejv allow the value if it corresponds to one of the given formats.
236
238
  The available formats are as follows.
237
239
 
238
- format|example
239
- ---|---
240
- `'integer'`|Allows only integer. ex) -1, 0, 1, ...
241
- `'index'`|Allows only index. This format is same rule with `format : 'integer', min : 0`. ex) 0, 1, 2, ...
240
+ format | example
241
+ -------------|--------------------------------------------------------------------------------------------------
242
+ `'integer'` | Allows only integer. ex) -1, 0, 1, ...
243
+ `'index'` | Allows only index. This format is same rule with `format : 'integer', min : 0`. ex) 0, 1, 2, ...
242
244
 
243
245
  #### `'string'` options
244
246
 
@@ -247,12 +249,12 @@ format|example
247
249
  Checks the format of string. If specified as an array, ejv will allow the value if it corresponds to one of the given
248
250
  formats. The available formats are as follows.
249
251
 
250
- format|example
251
- ---|---
252
- `'email'`|Allows only email. This is based on [RFC 5322 3.4.1](https://tools.ietf.org/html/rfc5322#section-3.4.1). ex) `'email@domain.com'`
253
- `'date'`|Allows only date string format. This is based on [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601). ex) `'2018-12-29'`
254
- `'time'`|Allows only time string format. This is based on [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601). ex) `'21:07:35'`
255
- `'date-time'`|Allows only date-time string format. This is based on [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) and [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601). ex) `'2018-12-29T21:07:35Z'`
252
+ format | example
253
+ ---------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
254
+ `'email'` | Allows only email. This is based on [RFC 5322 3.4.1](https://tools.ietf.org/html/rfc5322#section-3.4.1). ex) `'email@domain.com'`
255
+ `'date'` | Allows only date string format. This is based on [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601). ex) `'2018-12-29'`
256
+ `'time'` | Allows only time string format. This is based on [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601). ex) `'21:07:35'`
257
+ `'date-time'` | Allows only date-time string format. This is based on [RFC 3339](https://www.ietf.org/rfc/rfc3339.txt) and [ISO 8601](https://en.wikipedia.org/wiki/ISO_8601). ex) `'2018-12-29T21:07:35Z'`
256
258
 
257
259
  - `length : number`
258
260
 
@@ -260,11 +262,11 @@ Checks the length of string.
260
262
 
261
263
  ```typescript
262
264
  ejv({
263
- str : 'hello'
265
+ str: 'hello'
264
266
  }, [{
265
- key : 'str',
266
- type : 'string',
267
- length : 5
267
+ key: 'str',
268
+ type: 'string',
269
+ length: 5
268
270
  }]);
269
271
  ````
270
272
 
@@ -274,11 +276,11 @@ Checks the minimum length of string.
274
276
 
275
277
  ```typescript
276
278
  ejv({
277
- str : 'hello'
279
+ str: 'hello'
278
280
  }, [{
279
- key : 'str',
280
- type : 'string',
281
- minLength : 5
281
+ key: 'str',
282
+ type: 'string',
283
+ minLength: 5
282
284
  }]);
283
285
  ````
284
286
 
@@ -288,39 +290,40 @@ Checks the maximum length of string.
288
290
 
289
291
  ```typescript
290
292
  ejv({
291
- str : 'hello'
293
+ str: 'hello'
292
294
  }, [{
293
- key : 'str',
294
- type : 'string',
295
- maxLength : 5
295
+ key: 'str',
296
+ type: 'string',
297
+ maxLength: 5
296
298
  }]);
297
299
  ````
298
300
 
299
301
  - `pattern : string | string[] | RegExp | RegExp[]`
300
302
 
301
303
  Checks the pattern of string.
302
- If specified as a string, the string is converted to a regular expression and checked, and if specified as a regular expression, it checks whether it passes the regular expression.
304
+ If specified as a string, the string is converted to a regular expression and checked, and if specified as a regular
305
+ expression, it checks whether it passes the regular expression.
303
306
  If the value of this option is specified as an array, pass the check if one of the rule passes.
304
307
 
305
308
  ```typescript
306
309
  ejv({
307
- str : 'abc'
310
+ str: 'abc'
308
311
  }, [{
309
- key : 'str',
310
- type : 'string',
311
- pattern : 'abc'
312
+ key: 'str',
313
+ type: 'string',
314
+ pattern: 'abc'
312
315
  }, {
313
- key : 'str',
314
- type : 'string',
315
- pattern : ['abc', 'ac']
316
+ key: 'str',
317
+ type: 'string',
318
+ pattern: ['abc', 'ac']
316
319
  }, {
317
- key : 'str',
318
- type : 'string',
319
- pattern : /abc/
320
+ key: 'str',
321
+ type: 'string',
322
+ pattern: /abc/
320
323
  }, {
321
- key : 'str',
322
- type : 'string',
323
- pattern : [/abc/, /ac/]
324
+ key: 'str',
325
+ type: 'string',
326
+ pattern: [/abc/, /ac/]
324
327
  }]);
325
328
  ```
326
329
 
@@ -334,11 +337,11 @@ If you omit this option or specify it as `true`, ejv will allow the empty object
334
337
 
335
338
  ```typescript
336
339
  ejv({
337
- obj : {}
340
+ obj: {}
338
341
  }, [{
339
- key : 'obj',
340
- type : 'object',
341
- allowNoProperty : false // failed
342
+ key: 'obj',
343
+ type: 'object',
344
+ allowNoProperty: false // failed
342
345
  }]);
343
346
  ```
344
347
 
@@ -349,20 +352,20 @@ The object specified for the validation is recursively processed by ejv().
349
352
 
350
353
  ```typescript
351
354
  ejv({
352
- data : {
353
- num : 10,
354
- str : 'ejv'
355
- }
355
+ data: {
356
+ num: 10,
357
+ str: 'ejv'
358
+ }
356
359
  }, [{
357
- key : 'data',
358
- type : 'object',
359
- properties : [{
360
- key : 'num',
361
- type : 'number'
362
- }, {
363
- key : 'str',
364
- type : 'string'
365
- }]
360
+ key: 'data',
361
+ type: 'object',
362
+ properties: [{
363
+ key: 'num',
364
+ type: 'number'
365
+ }, {
366
+ key: 'str',
367
+ type: 'string'
368
+ }]
366
369
  }]);
367
370
  ```
368
371
 
@@ -382,25 +385,25 @@ This option is used only when the `min` option is used.
382
385
 
383
386
  ```typescript
384
387
  ejv({
385
- date1 : new Date(2019, 11, 30)
388
+ date1: new Date(2019, 11, 30)
386
389
  }, [{
387
- key : 'date1',
388
- type : 'date',
389
- min : new Date(2019, 11, 30) // success
390
+ key: 'date1',
391
+ type: 'date',
392
+ min: new Date(2019, 11, 30) // success
390
393
  }, {
391
- key : 'date1',
392
- type : 'date',
393
- min : new Date(2019, 11, 30),
394
- exclusiveMin : true // failed
394
+ key: 'date1',
395
+ type: 'date',
396
+ min: new Date(2019, 11, 30),
397
+ exclusiveMin: true // failed
395
398
  }, {
396
- key : 'date1',
397
- type : 'date',
398
- min : '2019-12-30T00:00:00Z' // success
399
+ key: 'date1',
400
+ type: 'date',
401
+ min: '2019-12-30T00:00:00Z' // success
399
402
  }, {
400
- key : 'date1',
401
- type : 'date',
402
- min : '2019-12-30T00:00:00Z',
403
- exclusiveMin : true // failed
403
+ key: 'date1',
404
+ type: 'date',
405
+ min: '2019-12-30T00:00:00Z',
406
+ exclusiveMin: true // failed
404
407
  }]);
405
408
  ```
406
409
 
@@ -418,25 +421,25 @@ This option is used only when the `max` option is used.
418
421
 
419
422
  ```typescript
420
423
  ejv({
421
- date1 : new Date(2019, 11, 30)
424
+ date1: new Date(2019, 11, 30)
422
425
  }, [{
423
- key : 'date1',
424
- type : 'date',
425
- max : new Date(2019, 11, 30) // success
426
+ key: 'date1',
427
+ type: 'date',
428
+ max: new Date(2019, 11, 30) // success
426
429
  }, {
427
- key : 'date1',
428
- type : 'date',
429
- max : new Date(2019, 11, 30),
430
- exclusiveMax : true // failed
430
+ key: 'date1',
431
+ type: 'date',
432
+ max: new Date(2019, 11, 30),
433
+ exclusiveMax: true // failed
431
434
  }, {
432
- key : 'date1',
433
- type : 'date',
434
- max : '2019-12-30T00:00:00Z' // success
435
+ key: 'date1',
436
+ type: 'date',
437
+ max: '2019-12-30T00:00:00Z' // success
435
438
  }, {
436
- key : 'date1',
437
- type : 'date',
438
- max : '2019-12-30T00:00:00Z',
439
- exclusiveMax : true // failed
439
+ key: 'date1',
440
+ type: 'date',
441
+ max: '2019-12-30T00:00:00Z',
442
+ exclusiveMax: true // failed
440
443
  }]);
441
444
  ```
442
445
 
@@ -448,11 +451,11 @@ Checks the length of the array.
448
451
 
449
452
  ```typescript
450
453
  ejv({
451
- arr : [1, 2]
454
+ arr: [1, 2]
452
455
  }, [{
453
- key : 'arr',
454
- type : 'array',
455
- length : 2
456
+ key: 'arr',
457
+ type: 'array',
458
+ length: 2
456
459
  }]);
457
460
  ````
458
461
 
@@ -462,11 +465,11 @@ Checks the minimum length of the array.
462
465
 
463
466
  ```typescript
464
467
  ejv({
465
- arr : [1, 2]
468
+ arr: [1, 2]
466
469
  }, [{
467
- key : 'arr',
468
- type : 'array',
469
- minLength : 2
470
+ key: 'arr',
471
+ type: 'array',
472
+ minLength: 2
470
473
  }]);
471
474
  ````
472
475
 
@@ -476,11 +479,11 @@ Checks the maximum length of the array.
476
479
 
477
480
  ```typescript
478
481
  ejv({
479
- arr : [1, 2, 3]
482
+ arr: [1, 2, 3]
480
483
  }, [{
481
- key : 'arr',
482
- type : 'array',
483
- maxLength : 3
484
+ key: 'arr',
485
+ type: 'array',
486
+ maxLength: 3
484
487
  }]);
485
488
  ````
486
489
 
@@ -498,15 +501,15 @@ Schemes specified as arrays are recursively processed by `ejv()`, and processed
498
501
 
499
502
  ```typescript
500
503
  ejv({
501
- arr : [1, 2, 3]
504
+ arr: [1, 2, 3]
502
505
  }, [{
503
- key : 'arr',
504
- type : 'array',
505
- items : [{
506
- type : 'number',
507
- min : 1,
508
- max : 3
509
- }]
506
+ key: 'arr',
507
+ type: 'array',
508
+ items: [{
509
+ type: 'number',
510
+ min: 1,
511
+ max: 3
512
+ }]
510
513
  }])
511
514
  ```
512
515
 
@@ -514,19 +517,20 @@ ejv({
514
517
 
515
518
  Specify the type of property to inspect. The values available are as follows.
516
519
 
517
- type|example
518
- ---|---
519
- `'boolean'`|`true`, `false`
520
- `'number'`|`0`, `1`, `1.5`, ...
521
- `'string'`|`'ejv'`, `'hello'`, ...
522
- `'object'`|`{}`, `{ key : 123 }`, ...
523
- `'date'`|`new Date`
524
- `'regexp'`|`new RegExp(/./)`, `/./`, ...
525
- `'array'`|`[]`, `[1, 2, 3]`, ...
520
+ type | example
521
+ -------------|-------------------------------
522
+ `'boolean'` | `true`, `false`
523
+ `'number'` | `0`, `1`, `1.5`, ...
524
+ `'string'` | `'ejv'`, `'hello'`, ...
525
+ `'object'` | `{}`, `{ key : 123 }`, ...
526
+ `'date'` | `new Date`
527
+ `'regexp'` | `new RegExp(/./)`, `/./`, ...
528
+ `'array'` | `[]`, `[1, 2, 3]`, ...
526
529
 
527
530
  ## `EjvError`
528
531
 
529
- If the JSON object passes the validation rule, it returns the `null` object, but if it does not pass the inspection rule, it returns the instance of the `EjvError` type.
532
+ If the JSON object passes the validation rule, it returns the `null` object, but if it does not pass the inspection
533
+ rule, it returns the instance of the `EjvError` type.
530
534
  The `EjvError` object is an object that represents the error that occurred at this time.
531
535
 
532
536
  > You do not always need to use `EjvError` type.
@@ -557,11 +561,11 @@ usage)
557
561
  ```typescript
558
562
  import { ejv, EjvError } from 'ejv';
559
563
 
560
- const error : null | EjvError = ejv({
561
- a : 10
564
+ const error: null | EjvError = ejv({
565
+ a: 10
562
566
  }, [{
563
- key : 'a',
564
- type : 'string'
567
+ key: 'a',
568
+ type: 'string'
565
569
  }]);
566
570
 
567
571
  console.log(error.type); // 'TYPE_MISMATCH'
@@ -584,15 +588,15 @@ This option is used in the type of `object`. You can use `ErrorType` as a key wh
584
588
  ```typescript
585
589
  import { ejv, EjvError, ErrorType } from 'ejv';
586
590
 
587
- const error : null | EjvError = ejv({
588
- a : 10
591
+ const error: null | EjvError = ejv({
592
+ a: 10
589
593
  }, [{
590
- key : 'a',
591
- type : 'string'
594
+ key: 'a',
595
+ type: 'string'
592
596
  }, {
593
- customErrorMsg : {
594
- [ErrorType.TYPE_MISMATCH] : 'property "a" should be a "string".'
595
- }
597
+ customErrorMsg: {
598
+ [ErrorType.TYPE_MISMATCH]: 'property "a" should be a "string".'
599
+ }
596
600
  }]);
597
601
 
598
602
  console.log(error.message); // 'property "a" should be a "string".'
@@ -0,0 +1,59 @@
1
+ import globals from 'globals';
2
+ import pluginJs from '@eslint/js';
3
+ import tseslint from 'typescript-eslint';
4
+ import pluginChaiFriendly from 'eslint-plugin-chai-friendly';
5
+
6
+
7
+ export default [
8
+ {
9
+ files: [
10
+ '**/*.{ts,js,mjs}'
11
+ ]
12
+ },
13
+ {
14
+ languageOptions: {
15
+ globals: {
16
+ ...globals.browser,
17
+ ...globals.node
18
+ }
19
+ }
20
+ },
21
+ pluginJs.configs.recommended,
22
+ ...tseslint.configs.recommended,
23
+
24
+ {
25
+ plugins: {
26
+ 'chai-friendly': pluginChaiFriendly
27
+ },
28
+ rules: {
29
+ 'indent': ['warn', 'tab',
30
+ {
31
+ 'ignoreComments': true,
32
+ 'SwitchCase': 1,
33
+ 'ignoredNodes': [
34
+ 'CallExpression *',
35
+ 'ExpressionStatement *'
36
+ ]
37
+ }
38
+ ],
39
+ // chai expect
40
+ '@typescript-eslint/no-unused-expressions': 'off', // disable original rule
41
+ 'chai-friendly/no-unused-expressions': 'error',
42
+
43
+ 'linebreak-style': ['warn', 'windows'],
44
+ 'arrow-parens': 'warn',
45
+ 'quotes': ['warn', 'single'],
46
+ 'semi': ['warn', 'always'],
47
+ '@typescript-eslint/no-shadow': 'error',
48
+ 'no-trailing-spaces': 'warn',
49
+ 'key-spacing': [
50
+ 'warn',
51
+ {
52
+ 'beforeColon': false,
53
+ 'afterColon': true
54
+ }
55
+ ],
56
+ '@typescript-eslint/explicit-function-return-type': 'warn'
57
+ }
58
+ }
59
+ ];