Skip to content
This repository was archived by the owner on Jan 19, 2019. It is now read-only.
This repository was archived by the owner on Jan 19, 2019. It is now read-only.

[no-empty-pattern] gets triggered on a non-destructuring array declaration #155

@mcuelenaere

Description

@mcuelenaere

Minimal testcase that should reproduce the error:

.eslintrc.json:

{
  "extends": [
    "typescript"
  ]
}

test.js:

const x = [];
const y = x.reduce(a => a, []).indexOf('abc') !== -1;

eslint test.js:

/Users/mcuelenaere/test.js
  2:28  error  Unexpected empty array pattern  no-empty-pattern

✖ 1 problem (1 error, 0 warnings)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions