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

Enable @typescript-eslint/no-unnecessary-condition rule #1177

Open
JKRhb opened this issue Nov 29, 2023 · 1 comment
Open

Enable @typescript-eslint/no-unnecessary-condition rule #1177

JKRhb opened this issue Nov 29, 2023 · 1 comment
Assignees
Labels

Comments

@JKRhb
Copy link
Member

JKRhb commented Nov 29, 2023

In the context of #1176, I noticed that we currently perform a lot of checks and nullish coalescing that are actually not really necessary based on our current typings. In some cases, this makes the code less readable, in other cases this can pave the way for potential bugs since some possible null values are hidden behind typecasts.

eslint provides the rule @typescript-eslint/no-unnecessary-condition which makes it possible to detect and fix these problems. As another step toward more type safety, this rule could be added on a per-package basis again, which should ultimately make the library more reliable.

@JKRhb JKRhb added good first issue Good for newcomers refactoring labels Nov 29, 2023
@lchauha
Copy link

lchauha commented Nov 30, 2023

Hi @JKRhb I would like to work on this issue. Can you please assign this to me?

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

No branches or pull requests

2 participants