Repository: eslint/eslint
File: tests/lib/rules/no-empty-pattern.js (JavaScript)

Code before:
            parserOptions: { ecmaVersion: 6 },
            errors: [{
                messageId: "unexpected",
                data: { type: "object" },
                type: "ObjectPattern"
            }]
        },
        {
            code: "function foo({a: []}) {}",
            parserOptions: { ecmaVersion: 6 },
            errors: [{
                messageId: "unexpected",
                data: { type: "array" },
                type: "ArrayPattern"
            }]
        },
        {
            code: "function foo({}) {}",
            options: [{ allowObjectPatternsAsParameters: false }],
            parserOptions: { ecmaVersion: 6 },
            errors: [{
                messageId: "unexpected",
                data: { type: "object" },
                type: "ObjectPattern"
            }]
        },
        {
            code: "var foo = function({}) {}",
            options: [{ allowObjectPatternsAsParameters: false }],
            parserOptions: { ecmaVersion: 6 },
            errors: [{
                messageId: "unexpected",
                data: { type: "object" },
                type: "ObjectPattern"
            }]
        },
        {
            code: "var foo = ({}) => {}",
            options: [{ allowObjectPatternsAsParameters: false }],
            parserOptions: { ecmaVersion: 6 },
            errors: [{
                messageId: "unexpected",
                data: { type: "object" },
                type: "ObjectPattern"
            }]
        },
        {
            code: "function foo({} = {}) {}",
            options: [{ allowObjectPatternsAsParameters: false }],
            parserOptions: { ecmaVersion: 6 },
            errors: [{

Review comment (suggestion):
It would be good to add a test with an empty options object to verify that the default value in the schema is `false`:

```js
{
    code: "function foo({}) {}",
    options: [{}],
    parserOptions: { ecmaVersion: 6 },
    errors: [{
        messageId: "unexpected",
        data: { type: "object" },
        type: "ObjectPattern"
    }]
},
```

Code after:
            parserOptions: { ecmaVersion: 6 },
            errors: [{
                messageId: "unexpected",
                data: { type: "object" },
                type: "ObjectPattern"
            }]
        },
        {
            code: "function foo({a: []}) {}",
            parserOptions: { ecmaVersion: 6 },
            errors: [{
                messageId: "unexpected",
                data: { type: "array" },
                type: "ArrayPattern"
            }]
        },
        {
            code: "function foo({}) {}",
            options: [{}],
            parserOptions: { ecmaVersion: 6 },
            errors: [{
                messageId: "unexpected",
                data: { type: "object" },
                type: "ObjectPattern"
            }]
        },
        {
            code: "var foo = function({}) {}",
            options: [{}],
            parserOptions: { ecmaVersion: 6 },
            errors: [{
                messageId: "unexpected",
                data: { type: "object" },
                type: "ObjectPattern"
            }]
        },
        {
            code: "var foo = ({}) => {}",
            options: [{}],
            parserOptions: { ecmaVersion: 6 },
            errors: [{
                messageId: "unexpected",
                data: { type: "object" },
                type: "ObjectPattern"
            }]
        },
        {
            code: "function foo({} = {}) {}",
            options: [{}],
            parserOptions: { ecmaVersion: 6 },
            errors: [{