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

Enforce use of template literals #2242

Merged
merged 6 commits into from
Nov 2, 2018
Merged

Enforce use of template literals #2242

merged 6 commits into from
Nov 2, 2018

Conversation

paulmelnikow
Copy link
Member

@paulmelnikow paulmelnikow commented Oct 31, 2018

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

'' + foo

to

`${foo}`

🤔

@paulmelnikow paulmelnikow added the developer-experience Dev tooling, test framework, and CI label Oct 31, 2018
chris48s
chris48s previously approved these changes Oct 31, 2018
Copy link
Member

@chris48s chris48s left a 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?

@paulmelnikow
Copy link
Member Author

paulmelnikow commented Oct 31, 2018

Yea, I trust the diff is correct… though in some isolated cases it's making readability worse.

'' + foo is a probably a quick n dirty cast to string?

Yea, for sure! The ${foo} construction I'd seen once before, but didn't realize it was doing the same thing.

@paulmelnikow paulmelnikow temporarily deployed to shields-staging-pr-2242 October 31, 2018 21:31 Inactive
@shields-ci
Copy link

shields-ci commented Oct 31, 2018

Warnings
⚠️

This PR modified helper functions in lib/ but not accompanying tests.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for github but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for hackage but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for homebrew but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for imagelayers but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for gem but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for jenkins but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for jetbrains but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for jira but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for jitpack but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for lgtm but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for dub but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for liberapay but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for docker but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for librariesio but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for discourse but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for luarocks but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for david but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for maven-central but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for crates but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for nexus but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for cran but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for nuget but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for cpan but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for osstracker but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for coverity but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for packagecontrol but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for coveralls but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for packagist but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for cookbook but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for php-eye but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for continuousphp but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for pub but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for conda but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for puppetforge but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for codetally but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for redmine but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for codeship but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for scrutinizer but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for codecov but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for sensiolabs but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for codeclimate but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for shippable but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for codacy but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for sonarqube but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for cocoapods but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for sourceforge but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for clojars but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for sourcegraph but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for chrome-web-store but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for stackexchange but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for buildkite but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for teamcity but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for bugzilla but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for travis but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for bountysource but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for twitter but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for bitrise but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for vaadin-directory but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for bitbucket but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for vscode-marketplace but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for bintray but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for waffle but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for beerpay but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for website but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for amo but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for wheelmap but not its test code.
That's okay so long as it's refactoring existing code.

⚠️

This PR modified service code for itunes but not its test code.
That's okay so long as it's refactoring existing code.

Messages
📖

✨ Thanks for your contribution to Shields, @paulmelnikow!

Generated by 🚫 dangerJS

@paulmelnikow paulmelnikow temporarily deployed to shields-staging-pr-2242 October 31, 2018 21:33 Inactive
chris48s
chris48s previously approved these changes Nov 1, 2018
# Conflicts:
#	.eslintrc.yml
#	services/readthedocs/readthedocs.service.js
@paulmelnikow paulmelnikow temporarily deployed to shields-staging-pr-2242 November 1, 2018 23:36 Inactive
@paulmelnikow paulmelnikow requested a deployment to shields-staging-pr-2242 November 2, 2018 21:10 Abandoned
@paulmelnikow paulmelnikow merged commit 83ac6ff into master Nov 2, 2018
@paulmelnikow paulmelnikow deleted the template-literals branch November 2, 2018 21:11
@shields-deployment
Copy link

This pull request was merged to master branch. This change is now waiting for deployment, which will usually happen within a few days. Stay tuned by joining our #ops channel on Discord!

After deployment, changes are copied to gh-pages branch:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
developer-experience Dev tooling, test framework, and CI
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants