@so1ve/eslint-plugin 3.5.1 → 3.5.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.js +3 -4
  2. package/package.json +1 -1
package/dist/index.js CHANGED
@@ -472,10 +472,9 @@ var vue_root_element_sort_attributes_default = createEslintRule({
472
472
  if (attribute.key.type !== "VIdentifier" || attribute.directive) continue;
473
473
  if (expectedOrder.includes(attribute.key.name)) attributesToCheck.push(attribute);
474
474
  }
475
- for (const attribute of attributesToCheck) {
476
- const index = expectedOrder.indexOf(attribute.key.name);
477
- if (index !== -1 && index !== attributesToCheck.indexOf(attribute)) reprintAttributes = true;
478
- }
475
+ const currentOrder = attributesToCheck.map((attr) => attr.key.name);
476
+ const expectedFilteredOrder = expectedOrder.filter((name) => currentOrder.includes(name));
477
+ if (JSON.stringify(currentOrder) !== JSON.stringify(expectedFilteredOrder)) reprintAttributes = true;
479
478
  if (reprintAttributes) context.report({
480
479
  node: element.startTag,
481
480
  messageId: "wrongOrder",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@so1ve/eslint-plugin",
3
- "version": "3.5.1",
3
+ "version": "3.5.3",
4
4
  "author": "Ray <i@mk1.io> (https://github.com/so1ve/)",
5
5
  "type": "module",
6
6
  "keywords": [