@vinicunca/eslint-config 2.11.6 → 2.11.9

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.
package/dist/index.js CHANGED
@@ -374,6 +374,16 @@ async function stylistic(options = {}) {
374
374
  }
375
375
 
376
376
  // src/configs/formatters.ts
377
+ function mergePrettierOptions(options, overrides = {}) {
378
+ return {
379
+ ...options,
380
+ ...overrides,
381
+ plugins: [
382
+ ...overrides.plugins || [],
383
+ ...options.plugins || []
384
+ ]
385
+ };
386
+ }
377
387
  async function formatters(options = {}, stylistic2 = {}) {
378
388
  if (options === true) {
379
389
  const isPrettierPluginXmlInScope = isPackageInScope("@prettier/plugin-xml");
@@ -449,10 +459,9 @@ async function formatters(options = {}, stylistic2 = {}) {
449
459
  rules: {
450
460
  "format/prettier": [
451
461
  ERROR,
452
- {
453
- ...prettierOptions,
462
+ mergePrettierOptions(prettierOptions, {
454
463
  parser: "css"
455
- }
464
+ })
456
465
  ]
457
466
  }
458
467
  },
@@ -465,10 +474,9 @@ async function formatters(options = {}, stylistic2 = {}) {
465
474
  rules: {
466
475
  "format/prettier": [
467
476
  ERROR,
468
- {
469
- ...prettierOptions,
477
+ mergePrettierOptions(prettierOptions, {
470
478
  parser: "scss"
471
- }
479
+ })
472
480
  ]
473
481
  }
474
482
  },
@@ -481,10 +489,9 @@ async function formatters(options = {}, stylistic2 = {}) {
481
489
  rules: {
482
490
  "format/prettier": [
483
491
  ERROR,
484
- {
485
- ...prettierOptions,
492
+ mergePrettierOptions(prettierOptions, {
486
493
  parser: "less"
487
- }
494
+ })
488
495
  ]
489
496
  }
490
497
  }
@@ -500,10 +507,9 @@ async function formatters(options = {}, stylistic2 = {}) {
500
507
  rules: {
501
508
  "format/prettier": [
502
509
  ERROR,
503
- {
504
- ...prettierOptions,
510
+ mergePrettierOptions(prettierOptions, {
505
511
  parser: "html"
506
- }
512
+ })
507
513
  ]
508
514
  }
509
515
  });
@@ -518,14 +524,12 @@ async function formatters(options = {}, stylistic2 = {}) {
518
524
  rules: {
519
525
  "format/prettier": [
520
526
  ERROR,
521
- {
522
- ...prettierXmlOptions,
523
- ...prettierOptions,
527
+ mergePrettierOptions({ ...prettierXmlOptions, ...prettierOptions }, {
524
528
  parser: "xml",
525
529
  plugins: [
526
530
  "@prettier/plugin-xml"
527
531
  ]
528
- }
532
+ })
529
533
  ]
530
534
  }
531
535
  });
@@ -540,14 +544,12 @@ async function formatters(options = {}, stylistic2 = {}) {
540
544
  rules: {
541
545
  "format/prettier": [
542
546
  ERROR,
543
- {
544
- ...prettierXmlOptions,
545
- ...prettierOptions,
547
+ mergePrettierOptions({ ...prettierXmlOptions, ...prettierOptions }, {
546
548
  parser: "xml",
547
549
  plugins: [
548
550
  "@prettier/plugin-xml"
549
551
  ]
550
- }
552
+ })
551
553
  ]
552
554
  }
553
555
  });
@@ -570,12 +572,10 @@ async function formatters(options = {}, stylistic2 = {}) {
570
572
  rules: {
571
573
  [`format/${formater}`]: [
572
574
  ERROR,
573
- formater === "prettier" ? {
574
- printWidth: 120,
575
- ...prettierOptions,
576
- embeddedLanguageFormatting: OFF,
575
+ formater === "prettier" ? mergePrettierOptions(prettierOptions, {
576
+ embeddedLanguageFormatting: "off",
577
577
  parser: "markdown"
578
- } : {
578
+ }) : {
579
579
  ...dprintOptions,
580
580
  language: "markdown"
581
581
  }
@@ -592,14 +592,13 @@ async function formatters(options = {}, stylistic2 = {}) {
592
592
  rules: {
593
593
  "format/prettier": [
594
594
  ERROR,
595
- {
596
- ...prettierOptions,
595
+ mergePrettierOptions(prettierOptions, {
597
596
  embeddedLanguageFormatting: "off",
598
597
  parser: "slidev",
599
598
  plugins: [
600
599
  "prettier-plugin-slidev"
601
600
  ]
602
- }
601
+ })
603
602
  ]
604
603
  }
605
604
  });
@@ -615,13 +614,12 @@ async function formatters(options = {}, stylistic2 = {}) {
615
614
  rules: {
616
615
  "format/prettier": [
617
616
  ERROR,
618
- {
619
- ...prettierOptions,
617
+ mergePrettierOptions(prettierOptions, {
620
618
  parser: "astro",
621
619
  plugins: [
622
620
  "prettier-plugin-astro"
623
621
  ]
624
- }
622
+ })
625
623
  ]
626
624
  }
627
625
  });
@@ -649,10 +647,9 @@ async function formatters(options = {}, stylistic2 = {}) {
649
647
  rules: {
650
648
  "format/prettier": [
651
649
  ERROR,
652
- {
653
- ...prettierOptions,
650
+ mergePrettierOptions(prettierOptions, {
654
651
  parser: "graphql"
655
- }
652
+ })
656
653
  ]
657
654
  }
658
655
  });
@@ -2202,7 +2199,6 @@ async function vue(options = {}) {
2202
2199
  parserVue,
2203
2200
  processorVueBlocks
2204
2201
  ] = await Promise.all([
2205
- // @ts-expect-error missing types
2206
2202
  interopDefault(import("eslint-plugin-vue")),
2207
2203
  interopDefault(import("vue-eslint-parser")),
2208
2204
  interopDefault(import("eslint-processor-vue-blocks"))
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vinicunca/eslint-config",
3
3
  "type": "module",
4
- "version": "2.11.6",
4
+ "version": "2.11.9",
5
5
  "description": "Vinicunca ESLint config",
6
6
  "author": {
7
7
  "name": "praburangki",
@@ -107,11 +107,11 @@
107
107
  "@antfu/install-pkg": "^0.4.1",
108
108
  "@clack/prompts": "^0.7.0",
109
109
  "@eslint-community/eslint-plugin-eslint-comments": "^4.4.0",
110
- "@eslint/markdown": "^6.2.0",
110
+ "@eslint/markdown": "^6.2.1",
111
111
  "@stylistic/eslint-plugin": "^2.9.0",
112
- "@typescript-eslint/eslint-plugin": "^8.8.1",
113
- "@typescript-eslint/parser": "^8.8.1",
114
- "@unocss/eslint-plugin": "^0.63.4",
112
+ "@typescript-eslint/eslint-plugin": "^8.11.0",
113
+ "@typescript-eslint/parser": "^8.11.0",
114
+ "@unocss/eslint-plugin": "^0.63.6",
115
115
  "@vitest/eslint-plugin": "^1.1.7",
116
116
  "eslint-config-flat-gitignore": "^0.3.0",
117
117
  "eslint-flat-config-utils": "^0.4.0",
@@ -120,17 +120,17 @@
120
120
  "eslint-plugin-command": "^0.2.6",
121
121
  "eslint-plugin-format": "^0.1.2",
122
122
  "eslint-plugin-import-x": "^4.3.1",
123
- "eslint-plugin-jsdoc": "^50.3.1",
123
+ "eslint-plugin-jsdoc": "^50.4.3",
124
124
  "eslint-plugin-jsonc": "^2.16.0",
125
125
  "eslint-plugin-n": "^17.11.1",
126
126
  "eslint-plugin-no-only-tests": "^3.3.0",
127
- "eslint-plugin-perfectionist": "^3.8.0",
127
+ "eslint-plugin-perfectionist": "^3.9.1",
128
128
  "eslint-plugin-regexp": "^2.6.0",
129
129
  "eslint-plugin-sonarjs": "^1.0.4",
130
130
  "eslint-plugin-toml": "^0.11.1",
131
131
  "eslint-plugin-unicorn": "^56.0.0",
132
132
  "eslint-plugin-unused-imports": "^4.1.4",
133
- "eslint-plugin-vue": "^9.28.0",
133
+ "eslint-plugin-vue": "^9.29.1",
134
134
  "eslint-plugin-yml": "^1.14.0",
135
135
  "eslint-processor-vue-blocks": "^0.1.2",
136
136
  "globals": "^15.11.0",