@planfredapp/eslint-config 1.0.49 → 1.0.51

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 (4) hide show
  1. package/base.js +256 -47
  2. package/eslint.config.js +4 -1
  3. package/package.json +6 -3
  4. package/vue.js +53 -12
package/base.js CHANGED
@@ -28,7 +28,10 @@ export default [
28
28
 
29
29
  // standard rules
30
30
  'no-var': 'warn',
31
- 'object-shorthand': ['warn', 'properties'],
31
+ 'object-shorthand': [
32
+ 'warn',
33
+ 'properties',
34
+ ],
32
35
  'accessor-pairs': [
33
36
  'error',
34
37
  {
@@ -51,12 +54,25 @@ export default [
51
54
  ignoreGlobals: true,
52
55
  },
53
56
  ],
54
- 'comma-style': ['error', 'last'],
57
+ 'comma-style': [
58
+ 'error',
59
+ 'last',
60
+ ],
55
61
  'constructor-super': 'error',
56
- curly: ['error', 'multi-line'],
62
+ curly: [
63
+ 'error',
64
+ 'multi-line',
65
+ ],
57
66
  'default-case-last': 'error',
58
- 'dot-notation': ['error', { allowKeywords: true }],
59
- eqeqeq: ['error', 'always', { null: 'ignore' }],
67
+ 'dot-notation': [
68
+ 'error',
69
+ { allowKeywords: true },
70
+ ],
71
+ eqeqeq: [
72
+ 'error',
73
+ 'always',
74
+ { null: 'ignore' },
75
+ ],
60
76
  'new-cap': [
61
77
  'error',
62
78
  {
@@ -73,7 +89,10 @@ export default [
73
89
  'no-compare-neg-zero': 'error',
74
90
  'no-cond-assign': 'error',
75
91
  'no-const-assign': 'error',
76
- 'no-constant-condition': ['error', { checkLoops: false }],
92
+ 'no-constant-condition': [
93
+ 'error',
94
+ { checkLoops: false },
95
+ ],
77
96
  'no-control-regex': 'error',
78
97
  'no-debugger': 'error',
79
98
  'no-delete-var': 'error',
@@ -82,7 +101,10 @@ export default [
82
101
  'no-dupe-keys': 'error',
83
102
  'no-duplicate-case': 'error',
84
103
  'no-useless-backreference': 'error',
85
- 'no-empty': ['error', { allowEmptyCatch: true }],
104
+ 'no-empty': [
105
+ 'error',
106
+ { allowEmptyCatch: true },
107
+ ],
86
108
  'no-empty-character-class': 'error',
87
109
  'no-empty-pattern': 'error',
88
110
  'no-eval': 'error',
@@ -120,10 +142,19 @@ export default [
120
142
  'no-octal': 'error',
121
143
  'no-octal-escape': 'error',
122
144
  'no-proto': 'error',
123
- 'no-redeclare': ['error', { builtinGlobals: false }],
145
+ 'no-redeclare': [
146
+ 'error',
147
+ { builtinGlobals: false },
148
+ ],
124
149
  'no-regex-spaces': 'error',
125
- 'no-return-assign': ['error', 'except-parens'],
126
- 'no-self-assign': ['error', { props: true }],
150
+ 'no-return-assign': [
151
+ 'error',
152
+ 'except-parens',
153
+ ],
154
+ 'no-self-assign': [
155
+ 'error',
156
+ { props: true },
157
+ ],
127
158
  'no-self-compare': 'error',
128
159
  'no-sequences': 'error',
129
160
  'no-shadow-restricted-names': 'error',
@@ -135,7 +166,10 @@ export default [
135
166
  'no-undef-init': 'error',
136
167
  'no-unexpected-multiline': 'error',
137
168
  'no-unmodified-loop-condition': 'error',
138
- 'no-unneeded-ternary': ['error', { defaultAssignment: false }],
169
+ 'no-unneeded-ternary': [
170
+ 'error',
171
+ { defaultAssignment: false },
172
+ ],
139
173
  'no-unreachable': 'error',
140
174
  'no-unreachable-loop': 'error',
141
175
  'no-unsafe-finally': 'error',
@@ -175,12 +209,24 @@ export default [
175
209
  'no-useless-return': 'error',
176
210
  'no-void': 'error',
177
211
  'no-with': 'error',
178
- 'one-var': ['error', { initialized: 'never' }],
179
- 'prefer-const': ['error', { destructuring: 'all' }],
212
+ 'one-var': [
213
+ 'error',
214
+ { initialized: 'never' },
215
+ ],
216
+ 'prefer-const': [
217
+ 'error',
218
+ { destructuring: 'all' },
219
+ ],
180
220
  'prefer-promise-reject-errors': 'error',
181
- 'prefer-regex-literals': ['error', { disallowRedundantWrapping: true }],
221
+ 'prefer-regex-literals': [
222
+ 'error',
223
+ { disallowRedundantWrapping: true },
224
+ ],
182
225
  'symbol-description': 'error',
183
- 'unicode-bom': ['error', 'never'],
226
+ 'unicode-bom': [
227
+ 'error',
228
+ 'never',
229
+ ],
184
230
  'use-isnan': [
185
231
  'error',
186
232
  {
@@ -188,8 +234,14 @@ export default [
188
234
  enforceForIndexOf: true,
189
235
  },
190
236
  ],
191
- 'valid-typeof': ['error', { requireStringLiterals: true }],
192
- yoda: ['error', 'never'],
237
+ 'valid-typeof': [
238
+ 'error',
239
+ { requireStringLiterals: true },
240
+ ],
241
+ yoda: [
242
+ 'error',
243
+ 'never',
244
+ ],
193
245
 
194
246
  // import rules
195
247
  'import/export': 'error',
@@ -199,9 +251,16 @@ export default [
199
251
  {
200
252
  'newlines-between': 'always',
201
253
  groups: [
202
- ['builtin', 'external'],
254
+ [
255
+ 'builtin',
256
+ 'external',
257
+ ],
203
258
  'internal',
204
- ['parent', 'sibling', 'index'],
259
+ [
260
+ 'parent',
261
+ 'sibling',
262
+ 'index',
263
+ ],
205
264
  ],
206
265
  alphabetize: {
207
266
  order: 'asc',
@@ -222,7 +281,10 @@ export default [
222
281
  'import/no-webpack-loader-syntax': 'error',
223
282
 
224
283
  // n rules
225
- 'n/handle-callback-err': ['error', '^(err|error)$'],
284
+ 'n/handle-callback-err': [
285
+ 'error',
286
+ '^(err|error)$',
287
+ ],
226
288
  'n/no-callback-literal': 'error',
227
289
  'n/no-deprecated-api': 'error',
228
290
  'n/no-exports-assign': 'error',
@@ -234,16 +296,28 @@ export default [
234
296
  'promise/param-names': 'error',
235
297
 
236
298
  // custom style rules
237
- 'stylistic/array-bracket-newline': ['warn', 'consistent'],
299
+ 'stylistic/array-bracket-newline': [
300
+ 'error',
301
+ {
302
+ multiline: true,
303
+ minItems: 2,
304
+ },
305
+ ],
238
306
  'stylistic/array-element-newline': [
239
- 'warn',
240
- { ArrayExpression: 'consistent' },
307
+ 'error',
308
+ {
309
+ multiline: true,
310
+ minItems: 2,
311
+ },
241
312
  ],
242
313
  'stylistic/arrow-parens': 'off',
243
314
  'stylistic/template-curly-spacing': ['off'],
244
315
 
245
316
  // standard style rules
246
- 'stylistic/array-bracket-spacing': ['error', 'never'],
317
+ 'stylistic/array-bracket-spacing': [
318
+ 'error',
319
+ 'never',
320
+ ],
247
321
  'stylistic/arrow-spacing': [
248
322
  'error',
249
323
  {
@@ -251,8 +325,15 @@ export default [
251
325
  after: true,
252
326
  },
253
327
  ],
254
- 'stylistic/block-spacing': ['error', 'always'],
255
- 'stylistic/brace-style': ['error', '1tbs', { allowSingleLine: true }],
328
+ 'stylistic/block-spacing': [
329
+ 'error',
330
+ 'always',
331
+ ],
332
+ 'stylistic/brace-style': [
333
+ 'error',
334
+ '1tbs',
335
+ { allowSingleLine: true },
336
+ ],
256
337
  'stylistic/comma-dangle': [
257
338
  'error',
258
339
  {
@@ -275,9 +356,15 @@ export default [
275
356
  'never',
276
357
  { enforceForClassMembers: true },
277
358
  ],
278
- 'stylistic/dot-location': ['error', 'property'],
359
+ 'stylistic/dot-location': [
360
+ 'error',
361
+ 'property',
362
+ ],
279
363
  'stylistic/eol-last': 'error',
280
- 'stylistic/function-call-spacing': ['error', 'never'],
364
+ 'stylistic/function-call-spacing': [
365
+ 'error',
366
+ 'never',
367
+ ],
281
368
  'stylistic/generator-star-spacing': [
282
369
  'error',
283
370
  {
@@ -348,17 +435,38 @@ export default [
348
435
  'always',
349
436
  { exceptAfterSingleLine: true },
350
437
  ],
351
- 'stylistic/multiline-ternary': ['error', 'always-multiline'],
438
+ 'stylistic/multiline-ternary': [
439
+ 'error',
440
+ 'always-multiline',
441
+ ],
352
442
  'stylistic/new-parens': 'error',
353
- 'stylistic/no-extra-parens': ['error', 'functions'],
443
+ 'stylistic/no-extra-parens': [
444
+ 'error',
445
+ 'functions',
446
+ ],
354
447
  'stylistic/no-floating-decimal': 'error',
355
448
  'stylistic/no-mixed-operators': [
356
449
  'error',
357
450
  {
358
451
  groups: [
359
- ['==', '!=', '===', '!==', '>', '>=', '<', '<='],
360
- ['&&', '||'],
361
- ['in', 'instanceof'],
452
+ [
453
+ '==',
454
+ '!=',
455
+ '===',
456
+ '!==',
457
+ '>',
458
+ '>=',
459
+ '<',
460
+ '<=',
461
+ ],
462
+ [
463
+ '&&',
464
+ '||',
465
+ ],
466
+ [
467
+ 'in',
468
+ 'instanceof',
469
+ ],
362
470
  ],
363
471
  allowSamePrecedence: true,
364
472
  },
@@ -376,15 +484,40 @@ export default [
376
484
  'stylistic/no-tabs': 'error',
377
485
  'stylistic/no-trailing-spaces': 'error',
378
486
  'stylistic/no-whitespace-before-property': 'error',
487
+ 'stylistic/newline-per-chained-call': [
488
+ 'error',
489
+ { ignoreChainWithDepth: 1 },
490
+ ],
379
491
  'stylistic/object-curly-newline': [
380
492
  'error',
381
493
  {
382
- multiline: true,
383
- consistent: true,
494
+ ObjectExpression: {
495
+ multiline: true,
496
+ minProperties: 2,
497
+ consistent: true,
498
+ },
499
+ ObjectPattern: {
500
+ multiline: true,
501
+ consistent: true,
502
+ },
503
+ ImportDeclaration: {
504
+ multiline: true,
505
+ consistent: true,
506
+ },
507
+ ExportDeclaration: {
508
+ multiline: true,
509
+ consistent: true,
510
+ },
384
511
  },
385
512
  ],
386
- 'stylistic/object-curly-spacing': ['error', 'always'],
387
- 'stylistic/object-property-newline': 'error',
513
+ 'stylistic/object-curly-spacing': [
514
+ 'error',
515
+ 'always',
516
+ ],
517
+ 'stylistic/object-property-newline': [
518
+ 'error',
519
+ { allowAllPropertiesOnSameLine: true },
520
+ ],
388
521
  'stylistic/operator-linebreak': [
389
522
  'error',
390
523
  'after',
@@ -404,7 +537,47 @@ export default [
404
537
  classes: 'never',
405
538
  },
406
539
  ],
407
- 'stylistic/quote-props': ['error', 'as-needed'],
540
+ 'stylistic/padding-line-between-statements': [
541
+ 'error',
542
+ {
543
+ blankLine: 'always',
544
+ prev: '*',
545
+ next: '*',
546
+ },
547
+ {
548
+ blankLine: 'any',
549
+ prev: [
550
+ 'import',
551
+ 'cjs-import',
552
+ ],
553
+ next: [
554
+ 'import',
555
+ 'cjs-import',
556
+ ],
557
+ },
558
+ {
559
+ blankLine: 'any',
560
+ prev: [
561
+ 'const',
562
+ 'let',
563
+ 'var',
564
+ ],
565
+ next: [
566
+ 'const',
567
+ 'let',
568
+ 'var',
569
+ ],
570
+ },
571
+ {
572
+ blankLine: 'any',
573
+ prev: 'expression',
574
+ next: 'expression',
575
+ },
576
+ ],
577
+ 'stylistic/quote-props': [
578
+ 'error',
579
+ 'as-needed',
580
+ ],
408
581
  'stylistic/quotes': [
409
582
  'error',
410
583
  'single',
@@ -413,8 +586,14 @@ export default [
413
586
  allowTemplateLiterals: 'never',
414
587
  },
415
588
  ],
416
- 'stylistic/rest-spread-spacing': ['error', 'never'],
417
- 'stylistic/semi': ['error', 'never'],
589
+ 'stylistic/rest-spread-spacing': [
590
+ 'error',
591
+ 'never',
592
+ ],
593
+ 'stylistic/semi': [
594
+ 'error',
595
+ 'never',
596
+ ],
418
597
  'stylistic/semi-spacing': [
419
598
  'error',
420
599
  {
@@ -422,9 +601,18 @@ export default [
422
601
  after: true,
423
602
  },
424
603
  ],
425
- 'stylistic/space-before-blocks': ['error', 'always'],
426
- 'stylistic/space-before-function-paren': ['error', 'always'],
427
- 'stylistic/space-in-parens': ['error', 'never'],
604
+ 'stylistic/space-before-blocks': [
605
+ 'error',
606
+ 'always',
607
+ ],
608
+ 'stylistic/space-before-function-paren': [
609
+ 'error',
610
+ 'always',
611
+ ],
612
+ 'stylistic/space-in-parens': [
613
+ 'error',
614
+ 'never',
615
+ ],
428
616
  'stylistic/space-infix-ops': 'error',
429
617
  'stylistic/space-unary-ops': [
430
618
  'error',
@@ -437,21 +625,42 @@ export default [
437
625
  'error',
438
626
  'always',
439
627
  {
440
- line: { markers: ['*package', '!', '/', ',', '='] },
628
+ line: {
629
+ markers: [
630
+ '*package',
631
+ '!',
632
+ '/',
633
+ ',',
634
+ '=',
635
+ ],
636
+ },
441
637
  block: {
442
638
  balanced: true,
443
- markers: ['*package', '!', ',', ':', '::', 'flow-include'],
639
+ markers: [
640
+ '*package',
641
+ '!',
642
+ ',',
643
+ ':',
644
+ '::',
645
+ 'flow-include',
646
+ ],
444
647
  exceptions: ['*'],
445
648
  },
446
649
  },
447
650
  ],
448
- 'stylistic/template-tag-spacing': ['error', 'never'],
651
+ 'stylistic/template-tag-spacing': [
652
+ 'error',
653
+ 'never',
654
+ ],
449
655
  'stylistic/wrap-iife': [
450
656
  'error',
451
657
  'any',
452
658
  { functionPrototypeMethods: true },
453
659
  ],
454
- 'stylistic/yield-star-spacing': ['error', 'both'],
660
+ 'stylistic/yield-star-spacing': [
661
+ 'error',
662
+ 'both',
663
+ ],
455
664
  },
456
665
  },
457
666
  ]
package/eslint.config.js CHANGED
@@ -4,6 +4,9 @@ export default [
4
4
  ...baseConfig,
5
5
  {
6
6
  files: ['**/*.js'],
7
- ignores: ['node_modules/**', 'dist/**'],
7
+ ignores: [
8
+ 'node_modules/**',
9
+ 'dist/**',
10
+ ],
8
11
  },
9
12
  ]
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@planfredapp/eslint-config",
3
- "version": "1.0.49",
3
+ "version": "1.0.51",
4
4
  "description": "Shared ESLint configurations for Planfred monorepo",
5
5
  "keywords": [
6
6
  "eslint",
@@ -55,16 +55,19 @@
55
55
  "eslint-plugin-no-relative-import-paths": "1.6.1",
56
56
  "eslint-plugin-promise": "7.2.1",
57
57
  "eslint-plugin-vue": "10.7.0",
58
- "globals": "17.0.0",
58
+ "globals": "17.1.0",
59
59
  "typescript-eslint": "8.53.1"
60
60
  },
61
61
  "devDependencies": {
62
62
  "eslint": "9.39.2",
63
63
  "typescript": "5.9.3",
64
- "vitest": "4.0.17",
64
+ "vitest": "4.0.18",
65
65
  "vue-eslint-parser": "10.2.0"
66
66
  },
67
67
  "peerDependencies": {
68
68
  "eslint": "9.0.0"
69
+ },
70
+ "overrides": {
71
+ "js-yaml": "4.1.1"
69
72
  }
70
73
  }
package/vue.js CHANGED
@@ -28,7 +28,11 @@ export default [
28
28
  'vue/block-order': [
29
29
  'error',
30
30
  {
31
- order: ['template', 'script', 'style'],
31
+ order: [
32
+ 'template',
33
+ 'script',
34
+ 'style',
35
+ ],
32
36
  },
33
37
  ],
34
38
  'vue/no-undef-components': [
@@ -64,7 +68,13 @@ export default [
64
68
  'vue/no-unused-properties': [
65
69
  'warn',
66
70
  {
67
- groups: ['props', 'data', 'computed', 'methods', 'setup'],
71
+ groups: [
72
+ 'props',
73
+ 'data',
74
+ 'computed',
75
+ 'methods',
76
+ 'setup',
77
+ ],
68
78
  deepData: false,
69
79
  ignorePublicMembers: false,
70
80
  unreferencedOptions: [],
@@ -73,7 +83,10 @@ export default [
73
83
  'vue/no-v-html': 'error',
74
84
  'vue/eqeqeq': 'error',
75
85
 
76
- 'vue/array-bracket-newline': ['warn', 'consistent'],
86
+ 'vue/array-bracket-newline': [
87
+ 'warn',
88
+ 'consistent',
89
+ ],
77
90
  'vue/array-element-newline': [
78
91
  'warn',
79
92
  { ArrayExpression: 'consistent' },
@@ -82,7 +95,10 @@ export default [
82
95
  'vue/template-curly-spacing': ['off'],
83
96
 
84
97
  // extensions of stylistic rules applied to the template tag
85
- 'vue/array-bracket-spacing': ['error', 'never'],
98
+ 'vue/array-bracket-spacing': [
99
+ 'error',
100
+ 'never',
101
+ ],
86
102
  'vue/arrow-spacing': [
87
103
  'error',
88
104
  {
@@ -90,8 +106,15 @@ export default [
90
106
  after: true,
91
107
  },
92
108
  ],
93
- 'vue/block-spacing': ['error', 'always'],
94
- 'vue/brace-style': ['error', '1tbs', { allowSingleLine: true }],
109
+ 'vue/block-spacing': [
110
+ 'error',
111
+ 'always',
112
+ ],
113
+ 'vue/brace-style': [
114
+ 'error',
115
+ '1tbs',
116
+ { allowSingleLine: true },
117
+ ],
95
118
  'vue/comma-dangle': [
96
119
  'error',
97
120
  {
@@ -109,8 +132,14 @@ export default [
109
132
  after: true,
110
133
  },
111
134
  ],
112
- 'vue/dot-location': ['error', 'property'],
113
- 'vue/func-call-spacing': ['error', 'never'],
135
+ 'vue/dot-location': [
136
+ 'error',
137
+ 'property',
138
+ ],
139
+ 'vue/func-call-spacing': [
140
+ 'error',
141
+ 'never',
142
+ ],
114
143
  'vue/key-spacing': [
115
144
  'error',
116
145
  {
@@ -125,8 +154,14 @@ export default [
125
154
  after: true,
126
155
  },
127
156
  ],
128
- 'vue/multiline-ternary': ['error', 'always-multiline'],
129
- 'vue/no-extra-parens': ['error', 'functions'],
157
+ 'vue/multiline-ternary': [
158
+ 'error',
159
+ 'always-multiline',
160
+ ],
161
+ 'vue/no-extra-parens': [
162
+ 'error',
163
+ 'functions',
164
+ ],
130
165
  'vue/object-curly-newline': [
131
166
  'error',
132
167
  {
@@ -134,7 +169,10 @@ export default [
134
169
  consistent: true,
135
170
  },
136
171
  ],
137
- 'vue/object-curly-spacing': ['error', 'always'],
172
+ 'vue/object-curly-spacing': [
173
+ 'error',
174
+ 'always',
175
+ ],
138
176
  'vue/object-property-newline': 'error',
139
177
  'vue/operator-linebreak': [
140
178
  'error',
@@ -147,7 +185,10 @@ export default [
147
185
  },
148
186
  },
149
187
  ],
150
- 'vue/space-in-parens': ['error', 'never'],
188
+ 'vue/space-in-parens': [
189
+ 'error',
190
+ 'never',
191
+ ],
151
192
  'vue/space-infix-ops': 'error',
152
193
  'vue/space-unary-ops': [
153
194
  'error',