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

[no-dupe-args][no-redeclare] False positive with object destructuring and inline type #164

Closed
armano2 opened this issue Nov 9, 2018 · 2 comments
Labels
bug/incomplete rule unable to reproduce bugs that are unable to reproduce in master

Comments

@armano2
Copy link
Contributor

armano2 commented Nov 9, 2018

Tell us about your environment

  • eslint-plugin-typescript: 20.1.1

Please show your full configuration:

module.exports = {
  root: true,
  env: {
    browser: false,
    es6: true,
    node: false
  },
  extends: [
    'plugin:vue/essential',
    '@vue/standard'
  ],
  plugins: ['typescript'],
  parserOptions: {
    parser: 'typescript-eslint-parser',
    jsx: false
  }
}

What did you do? Please include the actual source code causing the issue.

function foo ({ v1, v2 }: { v1: number, v2: number }) {
}

What did you expect to happen?
year and month is not duplicated, its inline type definition

What actually happened? Please include the actual, raw output from ESLint.

Duplicate param 'v1'      no-dupe-args
Duplicate param 'v2'     no-dupe-args
'v1' is already defined   no-redeclare
'v2' is already defined  no-redeclare
@bradzacher bradzacher added requires investigation bug that require more investigation bug/incomplete rule labels Nov 16, 2018
@bradzacher bradzacher changed the title False positive no-dupe-args, no-redeclare [no-dupe-args][no-redeclare] False positive Nov 16, 2018
@bradzacher bradzacher changed the title [no-dupe-args][no-redeclare] False positive [no-dupe-args][no-redeclare] False positive with object destructuring and inline type Nov 16, 2018
@bradzacher
Copy link
Owner

https://astexplorer.net/#/gist/e44c8aa824da8a99ebd5f8776202a951/28e5e83ecdaeb426c83d826632562820e8459f99

looking at the version you said you're using (we are on 0.13) - it looks like you were using the latest version of the parser.

I am unable to reproduce this in master (parser v17).

@bradzacher bradzacher added unable to reproduce bugs that are unable to reproduce in master and removed requires investigation bug that require more investigation labels Nov 19, 2018
@armano2
Copy link
Contributor Author

armano2 commented Nov 19, 2018

issue is with parser not this plugin 👍
visitor-tree is not emitting it as type

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug/incomplete rule unable to reproduce bugs that are unable to reproduce in master
Projects
None yet
Development

No branches or pull requests

2 participants