eslint / typescript-eslint-parser

An ESLint custom parser which leverages TypeScript ESTree to allow for ESLint to lint TypeScript source code.
Other
915 stars 92 forks source link

Imported interfaces destructured in function argument gives no-shadow #545

Closed avocadowastaken closed 5 years ago

avocadowastaken commented 5 years ago

Error occurred after upgrade from typescript-eslint-parser^20.0.0. Potentially related to #540.

What version of TypeScript are you using?

3.1.6

What version of typescript-eslint-parser are you using?

20.1.1

What code were you trying to parse?

import { Foo } from "./Foo";

function foo(args: Foo) {} // No error
function bar([...args]: Foo) {} // No error
function baz({ ...args }: Foo) {} //  'Foo' is already declared in the upper scope

const foo = Foo; // No error
const [...foo] = Foo; // No error
const { ...foo } = Foo; // No error
mysticatea commented 5 years ago

Thank you for the report.

This looks the same problem as #535. It should be fixed by #540.