sveltejs / eslint-plugin-svelte

ESLint plugin for Svelte using AST
https://sveltejs.github.io/eslint-plugin-svelte/
MIT License
290 stars 33 forks source link

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

Open marekdedic opened 1 year ago

marekdedic commented 1 year ago

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

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 ```json { "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