We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent a596dc4 commit 6165d15Copy full SHA for 6165d15
lib/rules/fixer-return.js
@@ -65,13 +65,11 @@ module.exports = {
65
onCodePathStart (codePath, node) {
66
const parent = node.parent;
67
const shouldCheck = node.type === 'FunctionExpression' &&
68
- node.body.type === 'BlockStatement' &&
69
- // check if it is context.report({fix})
70
- utils.getKeyName(parent) === 'fix' &&
71
parent.parent.type === 'ObjectExpression' &&
72
parent.parent.parent.type === 'CallExpression' &&
73
contextIdentifiers.has(parent.parent.parent.callee.object) &&
74
- parent.parent.parent.callee.property.name === 'report';
+ parent.parent.parent.callee.property.name === 'report' &&
+ utils.getReportInfo(parent.parent.parent.arguments).fix === node;
75
76
funcInfo = {
77
upper: funcInfo,
0 commit comments