no-empty-pattern
eslint
No autofixRecommended
eslint.config.js
export default [
{
rules: {
"no-empty-pattern": "error",
},
},
];const {} = foo;
const [] = foo;
const {a: {}} = foo;
const {a: []} = foo;
function foo({}) {}
function bar([]) {}
function baz({a: {}}) {}
function qux({a: []}) {}const {a = {}} = foo;
const {b = []} = foo;
function foo({a = {}}) {}
function bar({a = []}) {}Examples from the ESLint documentation.
no-empty-pattern
eslint
export default [
{
rules: {
"no-empty-pattern": "error",
},
},
];no-empty-pattern
eslint plugin · correctness
{
"rules": {
"no-empty-pattern": "error"
}
}correctness/noEmptyPattern
correctness · since 1.0.0
{
"linter": {
"rules": {
"correctness": {
"noEmptyPattern": "error"
}
}
}
}Disallow empty destructuring patterns in <template>
Disallow assignments where both sides are exactly the same
Disallow empty character classes in regular expressions
Enforce comparing typeof expressions against valid strings
Disallow unnecessary escape characters