@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.
- package/dist/index.js +3 -4
- 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
|
-
|
|
476
|
-
|
|
477
|
-
|
|
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",
|