jellyfin / jellyfin-chromecast

Chromecast Client for Jellyfin
https://jellyfin.org
GNU General Public License v2.0
141 stars 43 forks source link

Enable no-unnecessary-type-assertion ts eslint rule #657

Closed 3flex closed 3 weeks ago

3flex commented 4 weeks ago

This is enabled by default in the recommended type checked rule set.

ferferga commented 4 weeks ago

Then why it's necessary?

3flex commented 4 weeks ago

Sorry I don't understand the question?

The type assertions that were removed are not necessary. An ESLint rule is enabled that detects this (and prevents future violations).

3flex commented 4 weeks ago

Are you asking why the rule needs to be enabled at all?

It's because the recommended type checked rules aren't currently enabled in this project, so I've enabled the rule on its own and fixed the violations.

ferferga commented 3 weeks ago

@3flex And why can't we enable the preset? It's a matter of adding tseslint.configs.strictTypeChecked and tseslint.configs.stylisticTypeChecked

3flex commented 3 weeks ago

There are currently hundreds of violations if those rule sets are enabled.

Do you want to enable the rulesets then disable all the rules that have violations? Or add eslint ignore rules to each line that triggers a rule on that ruleset?

nielsvanvelzen commented 3 weeks ago

I think enabling a few rules at a time until we have all/most of them and then switch to the preset would be preferred so the pull requests are small.