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 Boolean(foo.length) #951

Merged

Conversation

fisker
Copy link
Collaborator

@fisker fisker commented Dec 22, 2020

No description provided.

while (isLogicNotArgument(node)) {
isNegative = !isNegative;
node = node.parent;
while (true) {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@sindresorhus How do we write this? eslint-disable ?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, eslint-disable. Because in most cases when you want to use while (true), there's usually a safer alternative.

@sindresorhus sindresorhus merged commit f4577f7 into sindresorhus:master Dec 23, 2020
@fisker fisker deleted the explicit-length-check-boolean branch December 23, 2020 04:47
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.

2 participants