+
Skip to content
This repository was archived by the owner on Aug 31, 2023. It is now read-only.

feat: add no extra boolean cast #2992

Closed
wants to merge 2 commits into from
Closed

feat: add no extra boolean cast #2992

wants to merge 2 commits into from

Conversation

ktfth
Copy link
Contributor

@ktfth ktfth commented Aug 2, 2022

Description
From umbrella ticket #2642

noExtraBooleanCast
Disallow unnecessary boolean casts
Example fix:
if (Boolean(foo)) {} -> if (foo) {}

ktfth added 2 commits August 2, 2022 17:07
add analysis for extra boolean cast
add js call expression query to check no extra boolean cast
@IWANABETHATGUY
Copy link
Contributor

#2868, seems duplicate.

@ematipico
Copy link
Contributor

Thank you @ktfth for your contribution, but unfortunately there's already a PR to implement this rule.

I suggest to check first if a rule hasn't been claimed/assigned by anyone, so we can avoid duplicates. In the umbrella issue we also wrote instructions of how to claim a rule.

@ematipico ematipico closed this Aug 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
点击 这是indexloc提供的php浏览器服务,不要输入任何密码和下载