diff --git a/docs/rules/sort-attrs.md b/docs/rules/sort-attrs.md index f2fb7ced..a599b50c 100644 --- a/docs/rules/sort-attrs.md +++ b/docs/rules/sort-attrs.md @@ -1,6 +1,6 @@ # sort-attrs -This rule enforces alphabetical sorting of attributes. +This rule enforces priority-based and alphabetical sorting of attributes. ## How to use diff --git a/packages/eslint-plugin/lib/rules/sort-attrs.js b/packages/eslint-plugin/lib/rules/sort-attrs.js index ca3edb9b..3ec56b43 100644 --- a/packages/eslint-plugin/lib/rules/sort-attrs.js +++ b/packages/eslint-plugin/lib/rules/sort-attrs.js @@ -24,7 +24,7 @@ module.exports = { type: "code", docs: { - description: "Enforce attributes alphabetical sorting", + description: "Enforce priority and alphabetical sorting of attributes", category: RULE_CATEGORY.STYLE, recommended: false, url: getRuleUrl("sort-attrs"), @@ -60,7 +60,8 @@ module.exports = { }, ], messages: { - [MESSAGE_IDS.UNSORTED]: "Attributes should be sorted alphabetically", + [MESSAGE_IDS.UNSORTED]: + "Attributes should be sorted by priority and alphabetically", }, }, create(context) {