diff --git a/src/rules/order.js b/src/rules/order.js index 7c8a14f53..170091de6 100644 --- a/src/rules/order.js +++ b/src/rules/order.js @@ -222,7 +222,7 @@ function mutateRanksToAlphabetize(imported) { // Create the unsorted lists of imports const importedItemNamesByRank = imported.reduce(function (acc, importedItem) { - acc[importedItem.rank] = (acc[importedItem.rank] || []) + acc[importedItem.rank] = acc[importedItem.rank] || [] acc[importedItem.rank].push(importedItem.name) return acc }, {}) @@ -423,7 +423,10 @@ module.exports = { }, alphabetize: { type: 'boolean', - } + 'description': + 'If `true`, imports are be expected to be sorted alphabetically within groups', + 'default': false, + }, }, additionalProperties: false, },