Skip to content

Bug: false positive @typescript-eslint/no-unused-vars errors since update #7399

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
4 tasks done
plehnen opened this issue Aug 2, 2023 · 1 comment
Closed
4 tasks done
Labels
bug Something isn't working external This issue is with another package, not typescript-eslint itself vue issues relating to vue support

Comments

@plehnen
Copy link

plehnen commented Aug 2, 2023

Before You File a Bug Report Please Confirm You Have Done The Following...

  • I have tried restarting my IDE and the issue persists.
  • I have updated to the latest version of the packages.
  • I have searched for related issues and found none that matched my issue.
  • I have read the FAQ and my problem is not listed.

Issue Description

After updating ...

"@typescript-eslint/eslint-plugin": "^5.62.0",
"@typescript-eslint/parser": "^5.62.0",

...to a newer version, running eslint shows many @typescript-eslint/no-unused-vars errors, which aren't errors:

i.e.

export const XY: InjectionKey<Ref<boolean | ((arg: string) => boolean)>> = Symbol('XY'); // 'arg' is defined but never used              @typescript-eslint/no-unused-vars

export type CustomFiltersType = Record<
  string,
  {
    label?: (value: any) => string; // 'value' is defined but never used  @typescript-eslint/no-unused-vars
  }

// in vue props:
    disabledDate: {
      type: Function as PropType<(date: string) => boolean>, // 'date' is defined but never used  @typescript-eslint/no-unused-vars
    },
>;

Maybe related to #7211, but what's written there didn't solve it.

Reproduction Repository Link

https://github.com/plehnen/eslint-demo

Repro Steps

  1. clone the repo
  2. yarn install
  3. yarn fix:lint

Versions

package version
@typescript-eslint/eslint-plugin ^6.2.1
@typescript-eslint/parser ^6.2.1
@typescript-eslint/typescript-estree ^6.2.1
TypeScript 5.1.6
ESLint 8.46.0
node 18.16.0
@plehnen plehnen added bug Something isn't working triage Waiting for team members to take a look labels Aug 2, 2023
@plehnen plehnen changed the title Bug: <short description of the issue> Bug: false positive @typescript-eslint/no-unused-vars errors since update Aug 2, 2023
@bradzacher
Copy link
Member

but what's written there didn't solve it.

We'll that makes sense because the instructions in #7211 instructed you to add overrides for .ts files.

But you're seeing problems in .vue files...

It looks like the Vue stack doesn't currently support our v6 yet (eg vuejs/eslint-config-typescript#57).

You will have to wait for them to update before moving to the major, unfortunately.

@bradzacher bradzacher closed this as not planned Won't fix, can't repro, duplicate, stale Aug 2, 2023
@bradzacher bradzacher added external This issue is with another package, not typescript-eslint itself vue issues relating to vue support and removed triage Waiting for team members to take a look labels Aug 2, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 10, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working external This issue is with another package, not typescript-eslint itself vue issues relating to vue support
Projects
None yet
Development

No branches or pull requests

2 participants