Skip to content

Commit 4fbb759

Browse files
committed
lint
1 parent 27ac79c commit 4fbb759

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

rules/isolated-functions.js

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -50,21 +50,18 @@ const create = context => {
5050

5151
const nodeScope = sourceCode.getScope(node);
5252

53-
for (const ref of nodeScope.through) {
54-
const {identifier} = ref;
53+
for (const reference of nodeScope.through) {
54+
const {identifier} = reference;
5555

5656
if (allowedGlobals.includes(identifier.name)) {
5757
continue;
5858
}
5959

60-
// If (!options.considerTypeOf && hasTypeOfOperator(identifier)) {
61-
// return;
62-
// }
60+
// Could consider checking for typeof operator here, like in no-undef?
6361

6462
context.report({
6563
node: identifier,
6664
messageId: MESSAGE_ID_EXTERNALLY_SCOPED_VARIABLE,
67-
// Message: `Variable ${identifier.name} is used from outside the scope of an isolated function. Function is isolated because: ${reason}.`,
6865
data: {name: identifier.name, reason},
6966
});
7067
}
@@ -108,7 +105,7 @@ const create = context => {
108105
}
109106
}
110107

111-
return undefined;
108+
112109
};
113110

114111
return Object.fromEntries(functionTypes.map(type => [

0 commit comments

Comments
 (0)