@vue-jsx-vapor/eslint 2.3.2 → 2.3.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.
package/dist/index.cjs CHANGED
@@ -161,8 +161,8 @@ function shouldSortToEnd(node) {
161
161
  function contextCompare(a, b, options) {
162
162
  let aProp = getPropName(a);
163
163
  let bProp = getPropName(b);
164
- const aPropWithoutNamespace = aProp.split(":")[0];
165
- const bPropWithoutNamespace = bProp.split(":")[0];
164
+ const aPropNamespace = aProp.split(":")[0];
165
+ const bPropNamespace = bProp.split(":")[0];
166
166
  const aSortToEnd = shouldSortToEnd(a);
167
167
  const bSortToEnd = shouldSortToEnd(b);
168
168
  if (aSortToEnd && !bSortToEnd) return 1;
@@ -172,14 +172,14 @@ function contextCompare(a, b, options) {
172
172
  const bIndex = getReservedPropIndex(bProp, options.reservedList);
173
173
  if (aIndex > -1 && bIndex === -1) return -1;
174
174
  if (aIndex === -1 && bIndex > -1) return 1;
175
- if (aIndex > -1 && bIndex > -1 && aPropWithoutNamespace !== bPropWithoutNamespace) return aIndex > bIndex ? 1 : -1;
175
+ if (aIndex > -1 && bIndex > -1 && aPropNamespace !== bPropNamespace) return aIndex > bIndex ? 1 : -1;
176
176
  }
177
177
  if (options.reservedLast.length > 0) {
178
178
  const aLastIndex = getReservedPropIndex(aProp, options.reservedLast);
179
179
  const bLastIndex = getReservedPropIndex(bProp, options.reservedLast);
180
180
  if (aLastIndex > -1 && bLastIndex === -1) return 1;
181
181
  if (aLastIndex === -1 && bLastIndex > -1) return -1;
182
- if (aLastIndex > -1 && bLastIndex > -1 && aPropWithoutNamespace !== bPropWithoutNamespace) return aLastIndex > bLastIndex ? 1 : -1;
182
+ if (aLastIndex > -1 && bLastIndex > -1 && aPropNamespace !== bPropNamespace) return aLastIndex > bLastIndex ? -1 : 1;
183
183
  }
184
184
  if (options.callbacksLast) {
185
185
  const aIsCallback = isCallbackPropName(aProp);
@@ -435,6 +435,8 @@ const rule = {
435
435
  if (decl.type === "JSXSpreadAttribute") return attrs[idx + 1];
436
436
  let previousPropName = getPropName(memo);
437
437
  let currentPropName = getPropName(decl);
438
+ const previousReservedNamespace = previousPropName.split(":")[0];
439
+ const currentReservedNamespace = currentPropName.split(":")[0];
438
440
  const previousValue = memo.value;
439
441
  const currentValue = decl.value;
440
442
  const previousIsCallback = isCallbackPropName(previousPropName);
@@ -455,6 +457,7 @@ const rule = {
455
457
  reportNodeAttribute(decl, "listReservedPropsFirst", node, context, nodeReservedList);
456
458
  return memo;
457
459
  }
460
+ if (previousReservedIndex > -1 && currentReservedIndex > -1 && currentReservedIndex > previousReservedIndex && previousReservedNamespace !== currentReservedNamespace) return decl;
458
461
  }
459
462
  if (reservedLastList.length > 0) {
460
463
  const previousReservedIndex = getReservedPropIndex(previousPropName, reservedLastList);
@@ -464,6 +467,7 @@ const rule = {
464
467
  reportNodeAttribute(decl, "listReservedPropsLast", node, context, nodeReservedList);
465
468
  return memo;
466
469
  }
470
+ if (previousReservedIndex > -1 && currentReservedIndex > -1 && currentReservedIndex > previousReservedIndex && previousReservedNamespace !== currentReservedNamespace) return decl;
467
471
  }
468
472
  if (callbacksLast) {
469
473
  if (!previousIsCallback && currentIsCallback) return decl;
@@ -543,10 +547,10 @@ var src_default = ({ rules = {},...options } = {}) => ({
543
547
  "v-model"
544
548
  ],
545
549
  reservedLast: [
546
- "v-text",
547
- "v-html",
550
+ "v-slot",
548
551
  "v-slots",
549
- "v-slot"
552
+ "v-text",
553
+ "v-html"
550
554
  ]
551
555
  }],
552
556
  "vue-jsx-vapor/define-style": rules["vue-jsx-vapor/define-style"] || "warn"
package/dist/index.js CHANGED
@@ -136,8 +136,8 @@ function shouldSortToEnd(node) {
136
136
  function contextCompare(a, b, options) {
137
137
  let aProp = getPropName(a);
138
138
  let bProp = getPropName(b);
139
- const aPropWithoutNamespace = aProp.split(":")[0];
140
- const bPropWithoutNamespace = bProp.split(":")[0];
139
+ const aPropNamespace = aProp.split(":")[0];
140
+ const bPropNamespace = bProp.split(":")[0];
141
141
  const aSortToEnd = shouldSortToEnd(a);
142
142
  const bSortToEnd = shouldSortToEnd(b);
143
143
  if (aSortToEnd && !bSortToEnd) return 1;
@@ -147,14 +147,14 @@ function contextCompare(a, b, options) {
147
147
  const bIndex = getReservedPropIndex(bProp, options.reservedList);
148
148
  if (aIndex > -1 && bIndex === -1) return -1;
149
149
  if (aIndex === -1 && bIndex > -1) return 1;
150
- if (aIndex > -1 && bIndex > -1 && aPropWithoutNamespace !== bPropWithoutNamespace) return aIndex > bIndex ? 1 : -1;
150
+ if (aIndex > -1 && bIndex > -1 && aPropNamespace !== bPropNamespace) return aIndex > bIndex ? 1 : -1;
151
151
  }
152
152
  if (options.reservedLast.length > 0) {
153
153
  const aLastIndex = getReservedPropIndex(aProp, options.reservedLast);
154
154
  const bLastIndex = getReservedPropIndex(bProp, options.reservedLast);
155
155
  if (aLastIndex > -1 && bLastIndex === -1) return 1;
156
156
  if (aLastIndex === -1 && bLastIndex > -1) return -1;
157
- if (aLastIndex > -1 && bLastIndex > -1 && aPropWithoutNamespace !== bPropWithoutNamespace) return aLastIndex > bLastIndex ? 1 : -1;
157
+ if (aLastIndex > -1 && bLastIndex > -1 && aPropNamespace !== bPropNamespace) return aLastIndex > bLastIndex ? -1 : 1;
158
158
  }
159
159
  if (options.callbacksLast) {
160
160
  const aIsCallback = isCallbackPropName(aProp);
@@ -410,6 +410,8 @@ const rule = {
410
410
  if (decl.type === "JSXSpreadAttribute") return attrs[idx + 1];
411
411
  let previousPropName = getPropName(memo);
412
412
  let currentPropName = getPropName(decl);
413
+ const previousReservedNamespace = previousPropName.split(":")[0];
414
+ const currentReservedNamespace = currentPropName.split(":")[0];
413
415
  const previousValue = memo.value;
414
416
  const currentValue = decl.value;
415
417
  const previousIsCallback = isCallbackPropName(previousPropName);
@@ -430,6 +432,7 @@ const rule = {
430
432
  reportNodeAttribute(decl, "listReservedPropsFirst", node, context, nodeReservedList);
431
433
  return memo;
432
434
  }
435
+ if (previousReservedIndex > -1 && currentReservedIndex > -1 && currentReservedIndex > previousReservedIndex && previousReservedNamespace !== currentReservedNamespace) return decl;
433
436
  }
434
437
  if (reservedLastList.length > 0) {
435
438
  const previousReservedIndex = getReservedPropIndex(previousPropName, reservedLastList);
@@ -439,6 +442,7 @@ const rule = {
439
442
  reportNodeAttribute(decl, "listReservedPropsLast", node, context, nodeReservedList);
440
443
  return memo;
441
444
  }
445
+ if (previousReservedIndex > -1 && currentReservedIndex > -1 && currentReservedIndex > previousReservedIndex && previousReservedNamespace !== currentReservedNamespace) return decl;
442
446
  }
443
447
  if (callbacksLast) {
444
448
  if (!previousIsCallback && currentIsCallback) return decl;
@@ -518,10 +522,10 @@ var src_default = ({ rules = {},...options } = {}) => ({
518
522
  "v-model"
519
523
  ],
520
524
  reservedLast: [
521
- "v-text",
522
- "v-html",
525
+ "v-slot",
523
526
  "v-slots",
524
- "v-slot"
527
+ "v-text",
528
+ "v-html"
525
529
  ]
526
530
  }],
527
531
  "vue-jsx-vapor/define-style": rules["vue-jsx-vapor/define-style"] || "warn"
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue-jsx-vapor/eslint",
3
- "version": "2.3.2",
3
+ "version": "2.3.4",
4
4
  "description": "Vue JSX Vapor ESLint Plugin",
5
5
  "type": "module",
6
6
  "keywords": [