Skip to content

Commit 0b0e462

Browse files
committed
sort-comp #1858 PR amendments
1 parent 2f56e47 commit 0b0e462

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

lib/rules/sort-comp.js

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -133,9 +133,7 @@ module.exports = {
133133
function getRefPropIndexes(method) {
134134
const methodGroupIndexes = [];
135135

136-
for (let groupIndex = 0; groupIndex < methodsOrder.length; groupIndex++) {
137-
const currentGroup = methodsOrder[groupIndex];
138-
136+
methodsOrder.forEach((currentGroup, groupIndex) => {
139137
switch (currentGroup) {
140138
case 'getters': {
141139
if (method.getter) {
@@ -218,7 +216,7 @@ module.exports = {
218216
break;
219217
}
220218
}
221-
}
219+
});
222220

223221
// No matching pattern, return 'everything-else' index
224222
if (methodGroupIndexes.length === 0) {

0 commit comments

Comments
 (0)