Skip to content

Commit 9ffee6d

Browse files
committed
fix: #24 disable lastIndexOf reverse rule for now. Should write a smarter auto fix for it
1 parent a4d865b commit 9ffee6d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

rules/avoid-reverse.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ const { isMethod } = require("../lib/helpers/call-expression"),
99
REPLACEMENTS = {
1010
indexOf: "lastIndexOf",
1111
reduce: "reduceRight",
12-
lastIndexOf: "indexOf",
12+
// lastIndexOf: "indexOf", would need some more logic for the auto fixer (array.length - array.lastIndefOf)
1313
reduceRight: "reduce"
1414
};
1515

0 commit comments

Comments
 (0)