-
Notifications
You must be signed in to change notification settings - Fork 265
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
Add xo
as a linting tool
#64
Conversation
Looks great! But I think the |
return n; | ||
return n | ||
default: | ||
return undefined |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had to add a default case, which keeps the current behavior, but you might want to add a different behavior somehow (return NaN or something?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why should we add a different behavior (instead of returning undefined
)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
After reviewing the code a bit more, I don't think you should. Maybe you wanted to always return a string, but the function already returns undefined in some cases, so this should be fine.
It was more of a "Hey, you may have forgotten this case" reminder. The linter warned me of it, and I wanted to warn you too, before this warning gets lost forever ;)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it! Let's keep this for now.
Sorry, forgot to mention that. I'm fine with adding the |
@jfmengels Ahhh, you're right. We're not transpiring anything atm, so we also shouldn't add the property! |
Will probably do a few more repos later today/this week-end. Let me know if you need help for the |
@jfmengels Cool, thanks! 😊 Yea, I definitely need help there... What's the best way to handle that? Can you copy my branch and work from there? |
Oh, we also need the badge! 😄 |
Sure, I'll try that. And you're right, forgot the badge. Will make PRs for that ;) |
@jfmengels Perfect! I already added the badge to async-throttle and ms 😊 |
This adds XO as a linting tool to have a consistent linter and style accross the Zeit projects, as requested by @leo.