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

refactor: enable no-unnecessary-condition #18798

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

sapphi-red
Copy link
Member

@sapphi-red sapphi-red commented Nov 27, 2024

Description

built on top of #18797

By combining with #18796, we can catch errors like

const { proxy } = config.server
if (proxy) { // this is always `true` should be something wrong
  //
}

Also I found many cases like above, even if we don't enable this rule, I think we should merge the change parts.

@sapphi-red sapphi-red added the p1-chore Doesn't change code behavior (priority) label Nov 27, 2024
@sapphi-red sapphi-red force-pushed the refactor/enable-no-unnecessary-condition branch from 91a3c3f to 07c94c8 Compare November 27, 2024 06:35
@sapphi-red sapphi-red force-pushed the refactor/enable-no-unnecessary-condition branch from e8a6abf to fa50e82 Compare November 27, 2024 07:35
@sapphi-red
Copy link
Member Author

Added exhaustiveness check suggested in typescript-eslint/typescript-eslint#10283 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p1-chore Doesn't change code behavior (priority)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant