-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Enforce use of template literals #2242
Conversation
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 haven't read through the entire diff, but we're running eslint --fix
as a pre-commit hook so we should probably trust its output ;)
'' + foo
is a probably a quick n dirty cast to string?
Yea, I trust the diff is correct… though in some isolated cases it's making readability worse.
Yea, for sure! The |
Generated by 🚫 dangerJS |
# Conflicts: # .eslintrc.yml # services/readthedocs/readthedocs.service.js
This is consistent with what we're pretty much already doing, and saves us from making the request during code review.
These were all autofixed and most of them seem easier to read. Some in the legacy services should be rewritten in more legible forms during refactor (ie using intermediate variables, or using request’s qs option). There are some in helper functions and elsewhere that should get rewritten separately. I don't want to change them in this PR because the changes will get lost in this diff, though we could identify them here and fix them before or just after.
One surprising but common conversion is from
to
🤔