Update checked-in dependencies
This commit is contained in:
parent
4fad06f438
commit
40a500c743
4168 changed files with 298222 additions and 374905 deletions
6
node_modules/eslint/lib/rules/no-loop-func.js
generated
vendored
6
node_modules/eslint/lib/rules/no-loop-func.js
generated
vendored
|
|
@ -156,7 +156,7 @@ module.exports = {
|
|||
docs: {
|
||||
description: "Disallow function declarations that contain unsafe references inside loop statements",
|
||||
recommended: false,
|
||||
url: "https://eslint.org/docs/rules/no-loop-func"
|
||||
url: "https://eslint.org/docs/latest/rules/no-loop-func"
|
||||
},
|
||||
|
||||
schema: [],
|
||||
|
|
@ -168,6 +168,8 @@ module.exports = {
|
|||
|
||||
create(context) {
|
||||
|
||||
const sourceCode = context.sourceCode;
|
||||
|
||||
/**
|
||||
* Reports functions which match the following condition:
|
||||
*
|
||||
|
|
@ -183,7 +185,7 @@ module.exports = {
|
|||
return;
|
||||
}
|
||||
|
||||
const references = context.getScope().through;
|
||||
const references = sourceCode.getScope(node).through;
|
||||
const unsafeRefs = references.filter(r => !isSafe(loopNode, r)).map(r => r.identifier.name);
|
||||
|
||||
if (unsafeRefs.length > 0) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue