eslint-plugin-mocha
Advanced tools
Comparing version 10.4.1 to 10.4.2
@@ -52,3 +52,3 @@ 'use strict'; | ||
function checkAsyncMochaFunction(functionExpression) { | ||
const scope = context.getScope(); | ||
const scope = context.sourceCode.getScope(functionExpression); | ||
const callback = functionExpression.params[0]; | ||
@@ -55,0 +55,0 @@ const callbackName = callback.name; |
@@ -51,3 +51,3 @@ 'use strict'; | ||
if (astUtils.isDescribe(node)) { | ||
const scope = context.getScope(); | ||
const scope = context.sourceCode.getScope(node); | ||
@@ -54,0 +54,0 @@ if (isTopLevelScope(scope)) { |
@@ -83,3 +83,6 @@ 'use strict'; | ||
const text = getStringIfConstant(description, context.getScope()); | ||
const text = getStringIfConstant( | ||
description, | ||
context.sourceCode.getScope(mochaCallExpression) | ||
); | ||
@@ -86,0 +89,0 @@ if (!isStaticallyAnalyzableDescription(description, text)) { |
@@ -24,3 +24,3 @@ 'use strict'; | ||
const callee = node.callee; | ||
const scope = context.getScope(); | ||
const scope = context.sourceCode.getScope(node); | ||
@@ -27,0 +27,0 @@ if (astUtils.isTestCase(node) && isGlobalScope(scope)) { |
@@ -289,3 +289,3 @@ 'use strict'; | ||
// Skip recursive functions. | ||
const nameVar = context.getDeclaredVariables(node)[0]; | ||
const nameVar = context.sourceCode.getDeclaredVariables(node)[0]; | ||
@@ -297,3 +297,3 @@ if (isFunctionName(nameVar) && nameVar.references.length > 0) { | ||
// Skip if it's using arguments. | ||
const variable = getVariableOfArguments(context.getScope()); | ||
const variable = getVariableOfArguments(context.sourceCode.getScope(node)); | ||
@@ -300,0 +300,0 @@ if (variable && variable.references.length > 0) { |
@@ -86,3 +86,6 @@ 'use strict'; | ||
const descriptionArgument = args[0]; | ||
const description = getStringIfConstant(descriptionArgument, context.getScope()); | ||
const description = getStringIfConstant( | ||
descriptionArgument, | ||
context.sourceCode.getScope(mochaCallExpression) | ||
); | ||
@@ -89,0 +92,0 @@ if (description) { |
@@ -85,3 +85,6 @@ 'use strict'; | ||
const testDescriptionArgument = args[0]; | ||
const description = getStringIfConstant(testDescriptionArgument, context.getScope()); | ||
const description = getStringIfConstant( | ||
testDescriptionArgument, | ||
context.sourceCode.getScope(mochaCallExpression) | ||
); | ||
@@ -88,0 +91,0 @@ if (description) { |
@@ -137,3 +137,3 @@ 'use strict'; | ||
if (isMochaFunctionCall(node)) { | ||
const scope = context.getScope(); | ||
const scope = context.sourceCode.getScope(node); | ||
@@ -140,0 +140,0 @@ if (!isCallToShadowedReference(node, scope)) { |
{ | ||
"name": "eslint-plugin-mocha", | ||
"version": "10.4.1", | ||
"version": "10.4.2", | ||
"description": "Eslint rules for mocha.", | ||
@@ -5,0 +5,0 @@ "engines": { |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
94316
2250