In a fixable rule, missing return from a fixer function will not apply fixes.
This rule enforces always return from a fixer function.
Examples of incorrect code for this rule:
/* eslint eslint-plugin/fixer-return: error */
module.exports = {
create: function(context) {
context.report( {
fix: function(fixer) {
fixer.foo();
}
});
}
};
Examples of correct code for this rule:
/* eslint eslint-plugin/fixer-return: error */
module.exports = {
create: function(context) {
context.report( {
fix: function(fixer) {
return fixer.foo();
}
});
}
};
If you don't want to enforce always return from a fixer function, do not enable this rule.