Update ESLint and plugin packages
R=jacktfranklin@chromium.org
Bug: none
Change-Id: If1b2420ba6e1c100c3d6b2013815ff1a555ea987
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/3369367
Auto-Submit: Tim Van der Lippe <tvanderlippe@chromium.org>
Reviewed-by: Jack Franklin <jacktfranklin@chromium.org>
Commit-Queue: Jack Franklin <jacktfranklin@chromium.org>
diff --git a/node_modules/eslint-plugin-mocha/lib/rules/handle-done-callback.js b/node_modules/eslint-plugin-mocha/lib/rules/handle-done-callback.js
index f5e5ea1..29a7d6b 100644
--- a/node_modules/eslint-plugin-mocha/lib/rules/handle-done-callback.js
+++ b/node_modules/eslint-plugin-mocha/lib/rules/handle-done-callback.js
@@ -7,7 +7,8 @@
meta: {
type: 'problem',
docs: {
- description: 'Enforces handling of callbacks for async tests'
+ description: 'Enforces handling of callbacks for async tests',
+ url: 'https://github.com/lo1tuma/eslint-plugin-mocha/blob/master/docs/rules/handle-done-callback.md'
},
schema: [
{
@@ -38,7 +39,7 @@
}
function isReferenceHandled(reference) {
- const parent = context.getNodeByRangeIndex(reference.identifier.range[0]).parent;
+ const parent = context.getSourceCode().getNodeByRangeIndex(reference.identifier.range[0]).parent;
return parent.type === 'CallExpression';
}
@@ -54,7 +55,10 @@
const callbackVariable = findParamInScope(callbackName, scope);
if (callbackVariable && !hasHandledReferences(callbackVariable.references)) {
- context.report(callback, 'Expected "{{name}}" callback to be handled.', { name: callbackName });
+ context.report({
+ node: callback,
+ message: 'Expected "{{name}}" callback to be handled.', data: { name: callbackName }
+ });
}
}