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

explicit-length-check: Check more cases #941

Merged
merged 3 commits into from Dec 21, 2020

Conversation

fisker
Copy link
Collaborator

@fisker fisker commented Dec 20, 2020

This rule should work in any cases return a boolean, add missing

  • while (foo.length){}
  • do {} while (foo.length);
  • if (; foo.length;){}

I'll send more if I figure something else, this is actually preparing for #887


Coming changes in my mind:

  • !foo.length should check in any place, I'll fix in another PR.
  • LogicExpression not in if should check too.

@fisker
Copy link
Collaborator Author

fisker commented Dec 21, 2020

Merging this, so I can continue work on it, let me know if you found something wrong

@fisker fisker merged commit 83a6453 into sindresorhus:master Dec 21, 2020
@fisker fisker deleted the explicit-length-check-extend branch December 21, 2020 01:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant