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

fix(rome_js_analyze): remove double negation check #3488

Merged
merged 3 commits into from
Oct 26, 2022

Conversation

ematipico
Copy link
Contributor

Summary

Closes #3454

I run this rule in the Rome classic code base this case popped up all over the place, for cases that were all valid. We should not consider these cases as errors.

Test Plan

Moved the previous test case as valid

@ematipico ematipico temporarily deployed to netlify-playground October 26, 2022 07:41 Inactive
@netlify
Copy link

netlify bot commented Oct 26, 2022

Deploy Preview for rometools canceled.

Name Link
🔨 Latest commit 4b59b71
🔍 Latest deploy log https://app.netlify.com/sites/rometools/deploys/6358e9eb1346fa0009a92332

@MichaReiser
Copy link
Contributor

What about suggesting Boolean(a) instead or only reporting a!! inside of logical expressions as explained in #3454

@github-actions
Copy link

github-actions bot commented Oct 26, 2022

@ematipico
Copy link
Contributor Author

ematipico commented Oct 26, 2022

What about suggesting Boolean(a) instead or only reporting a!! inside of logical expressions as explained in #3454

We already have a rule for that https://rome.tools/docs/lint/rules/noextrabooleancast/

Any changes, should be added to that rule I think

@ematipico ematipico requested a review from a team October 26, 2022 07:51
@ematipico ematipico temporarily deployed to netlify-playground October 26, 2022 07:51 Inactive
@MichaReiser
Copy link
Contributor

What about suggesting Boolean(a) instead or only reporting a!! inside of logical expressions as explained in #3454

We already have a rule for that rome.tools/docs/lint/rules/noextrabooleancast

Any changes, should be added to that rule I think

Good point. Rome currently flags this error twice... uff play

@ematipico ematipico temporarily deployed to netlify-playground October 26, 2022 08:03 Inactive
@ematipico ematipico merged commit 6accb0d into main Oct 26, 2022
@ematipico ematipico deleted the fix/use-simplified-logic-expression branch October 26, 2022 09:06
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.

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