2 * @fileoverview Rule to disallow an empty pattern
3 * @author Alberto RodrÃguez
7 //------------------------------------------------------------------------------
9 //------------------------------------------------------------------------------
16 description: "disallow empty destructuring patterns",
17 category: "Best Practices",
19 url: "https://eslint.org/docs/rules/no-empty-pattern"
25 unexpected: "Unexpected empty {{type}} pattern."
32 if (node.properties.length === 0) {
33 context.report({ node, messageId: "unexpected", data: { type: "object" } });
37 if (node.elements.length === 0) {
38 context.report({ node, messageId: "unexpected", data: { type: "array" } });