Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

refactor: enable no-unnecessary-condition #18798

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)

@sapphi-red
Copy link
Member Author

#18797 (comment)

@sapphi-red sapphi-red closed this Dec 5, 2024
@sapphi-red sapphi-red deleted the refactor/enable-no-unnecessary-condition branch December 5, 2024 10:17
# for free to join this conversation on GitHub. Already have an account? # 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