Open
Description
As seen here, the deprecated/function-style format of ESLint rules can actually export deprecated
and schema
properties, and we should ensure that eslint-plugin/prefer-object-rule ports those over to the meta
object when converting a rule to the modern object-style rule.
Before:
module.exports = function(context) {
return {
// callback functions
};
};
module.exports.schema = [{ /* options */ }];
module.exports.deprecated = true;
After (desired):
module.exports = {
meta: {
deprecated: true,
schema: [{ /* options */ }];
},
create() { ... }
};