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

Fix linting errors from XO 0.17 #149

Merged
merged 1 commit into from
Oct 12, 2016
Merged

Fix linting errors from XO 0.17 #149

merged 1 commit into from
Oct 12, 2016

Conversation

jfmengels
Copy link
Contributor

Fix linting errors from XO 0.17

@@ -51,7 +51,7 @@ const create = context => {
.filter(info => info.ended);

// If this segment or any previous segment is already ended, further statements are not allowed, report as an error.
if (ended.length) {
if (ended.length !== 0) {
Copy link
Member

Choose a reason for hiding this comment

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

Would be more natural here to use > 0.

Copy link
Member

Choose a reason for hiding this comment

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

I've changed it on merge.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure, fine by me.

If this nitpick happens a lot for you, then it could probably deserve a linting rule, or options for the explicit-length-check rule. We could have another linting rule for comparing the result of .indexOf.

Copy link
Member

Choose a reason for hiding this comment

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

An option sounds good. Care to open an issue about it?

Copy link
Member

Choose a reason for hiding this comment

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

And yes to the indexOf idea.

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

2 participants