Skip to content
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

@typescript-eslint/no-redundant-type-constituents false positive with $$Generic #541

Open
2 tasks done
marekdedic opened this issue Jul 11, 2023 · 0 comments
Open
2 tasks done

Comments

@marekdedic
Copy link
Contributor

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.

What version of ESLint are you using?

v8.44.0

What version of eslint-plugin-svelte are you using?

2.32.2

What did you do?

Configuration
{
  "rules": {
      "@typescript-eslint/no-redundant-type-constituents": "error"
  }
}
<script>
  type KeyType = $$Generic<number | string>

  export let selected: KeyType | null
</script>

What did you expect to happen?

No error

What actually happened?

4:24 error  'any' overrides all other types in this union type  @typescript-eslint/no-redundant-type-constituents

Link to GitHub Repo with Minimal Reproducible Example

Additional comments

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant