@moso/eslint-config 3.0.2 → 3.0.3

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 (2) hide show
  1. package/dist/index.mjs +58 -9
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -687,7 +687,7 @@ const ignores = async (options) => {
687
687
  var package_default = {
688
688
  name: "@moso/eslint-config",
689
689
  type: "module",
690
- version: "3.0.2",
690
+ version: "3.0.3",
691
691
  description: "@moso's sharable ESLint config",
692
692
  author: {
693
693
  "name": "Morten Sørensen",
@@ -2455,15 +2455,64 @@ const perfectionist = async (options) => {
2455
2455
  ignoreCase: true,
2456
2456
  type: "alphabetical"
2457
2457
  }],
2458
- "perfectionist/sort-jsx-props": ["error", {
2459
- ...commonOptions,
2460
- fallbackSort: {
2461
- order: "asc",
2462
- type: "natural"
2458
+ "perfectionist/sort-jsx-props": [
2459
+ "error",
2460
+ {
2461
+ ...commonOptions,
2462
+ type: "unsorted",
2463
+ useConfigurationIf: { tagMatchesPattern: "^[a-z][^.]*$" }
2463
2464
  },
2464
- ignoreCase: true,
2465
- type: "alphabetical"
2466
- }],
2465
+ {
2466
+ ...commonOptions,
2467
+ customGroups: [
2468
+ {
2469
+ elementNamePattern: ["^role$", "^aria-.+$"],
2470
+ groupName: "a11y"
2471
+ },
2472
+ {
2473
+ elementNamePattern: [
2474
+ "^type$",
2475
+ "^id$",
2476
+ "^className$",
2477
+ "^href$",
2478
+ "^src$",
2479
+ "^srcSet$",
2480
+ "^name$",
2481
+ "^style$"
2482
+ ],
2483
+ groupName: "almost-props"
2484
+ },
2485
+ {
2486
+ elementNamePattern: "^on.+",
2487
+ groupName: "callback"
2488
+ },
2489
+ {
2490
+ elementNamePattern: "^(?:class|client|is|server|set|transition):",
2491
+ groupName: "directive"
2492
+ },
2493
+ {
2494
+ elementNamePattern: ["^ref$", "^key$"],
2495
+ groupName: "reserved"
2496
+ }
2497
+ ],
2498
+ fallbackSort: {
2499
+ order: "asc",
2500
+ type: "natural"
2501
+ },
2502
+ ignoreCase: true,
2503
+ groups: [
2504
+ "reserved",
2505
+ "almost-props",
2506
+ "unknown",
2507
+ "directive",
2508
+ "a11y",
2509
+ "shorthand-prop",
2510
+ "callback",
2511
+ "multiline-prop"
2512
+ ],
2513
+ type: "alphabetical"
2514
+ }
2515
+ ],
2467
2516
  "perfectionist/sort-maps": [
2468
2517
  "error",
2469
2518
  {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@moso/eslint-config",
3
3
  "type": "module",
4
- "version": "3.0.2",
4
+ "version": "3.0.3",
5
5
  "description": "@moso's sharable ESLint config",
6
6
  "author": {
7
7
  "name": "Morten Sørensen",