Skip to content

Commit 3f8417e

Browse files
committed
chore: use for..of instead of for..in
And no, that selector isn't a seceret
1 parent 11e73b3 commit 3f8417e

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

rules/no-unnecessary-this-arg.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,11 @@ export default {
8787
create(context) {
8888
return {
8989
"CallExpression:exit"(node) {
90-
for(const functionName in arrayFunctions) {
91-
checkArrayFunction(functionName, arrayFunctions[functionName], node, context);
90+
for(const [
91+
functionName,
92+
functionBody,
93+
] of Object.entries(arrayFunctions)) {
94+
checkArrayFunction(functionName, functionBody, node, context);
9295
}
9396

9497
for(const functionName of methods) {

rules/prefer-flat.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ export default {
3636
},
3737
});
3838
},
39+
// eslint-disable-next-line no-secrets/no-secrets
3940
'CallExpression[callee.type="MemberExpression"][callee.property.name="reduce"][arguments.length=2][arguments.1.type=ArrayExpression][arguments.1.elements.length=0] > *:function[params.length=2][params.0.type=Identifier][params.1.type=Identifier] > CallExpression[callee.type="MemberExpression"][callee.property.name="concat"][arguments.length=1][arguments.0.type=Identifier]'(node) {
4041
const reduceCallbackParameters = node.parent.params;
4142

0 commit comments

Comments
 (0)