UNPKG

eslint-plugin-destructuring

Version:
17 lines (15 loc) 535 B
'use strict'; //------------------------------------------------------------------------------ // Rule Definition //------------------------------------------------------------------------------ module.exports = { create: function inMethodsParams(context) { return { ObjectPattern: function ObjectPattern(node) { if (node.parent && node.parent.parent && node.parent.parent.type === 'MethodDefinition') { context.report(node, 'Do not use destructuring in method params.'); } } }; } };