Skip to content
This repository has been 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

Closed
mcuelenaere opened this issue Sep 13, 2018 · 2 comments
Closed
Labels
bug/incomplete rule parser bug bugs with typescript-eslint-parser / typescript-estree
Milestone

Comments

@mcuelenaere
Copy link

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)
@madbence
Copy link

@mcuelenaere i think this is the same problem as JamesHenry/typescript-estree#18

@bradzacher
Copy link
Owner

I tested this locally with typescript-eslint-parser@20.0.0, and typescript-estree@4.0.0, and it seemed to work fine.

Closing this has a dependency on:

  1. typescript-eslint-parser updating its typescript-estree dependency to 4.0.0.
  2. updating our dependency typescript-eslint-parser to that version.

@bradzacher bradzacher changed the title no-empty-pattern rule gets triggered on a non-destructuring array declaration [no-empty-pattern] gets triggered on a non-destructuring array declaration Nov 16, 2018
@bradzacher bradzacher added this to the 1.0.0 milestone Nov 17, 2018
@bradzacher bradzacher added the parser bug bugs with typescript-eslint-parser / typescript-estree label Nov 26, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug/incomplete rule parser bug bugs with typescript-eslint-parser / typescript-estree
Projects
None yet
Development

No branches or pull requests

3 participants