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

Decaf /lib #287

Merged
merged 9 commits into from Apr 27, 2019

Conversation

Projects
None yet
3 participants
@Aerijo
Copy link
Member

commented Feb 5, 2019

Requirements

  • Filling out the template is required. Any pull request that does not include enough information to be reviewed in a timely manner may be closed at the maintainers' discretion.
  • All new code requires tests to ensure against regressions

Description of the Change

Decaffeinates the CoffeeScript files inside the /lib directory.

Also fixes a spec that expected 1 console warning, but mine was giving 5 (it didn't say what they were). As the spec tests the message wording however, it should be safe to change toBe 1 to toBeGreaterThan 0

Alternate Designs

NA

Benefits

I can understand them now & work on PRs

Possible Drawbacks

FIrst time decaffeinating. May have missed some safe manual conversions. I did note a lot of foo != null, so I wasn't sure if values would be coming in as null or undefined and left them mostly alone.

Similar with return values (I hate implicit return...). All the specs passed, but that's as much as I can really guarantee. Presumably the return value of a method would be tested if it's important or can vary.

Applicable Issues

@Arcanemagus

This comment has been minimized.

Copy link

commented Feb 5, 2019

Looks like the AppVeyor container for the beta build had networking issues, I restarted the build for that.

@Arcanemagus
Copy link

left a comment

Almost all of this is just changing for (let ...) to for (const ...) loops. decaffeinate emits for (let ...) since that's the safer option, and expects ESLint to be used to catch (and fix) cases where it can be written as for (const ...). Unfortunately the ESLint configuration used within standard is too simple to catch these automatically.

Other than that I saw a few minor style issues and a few things that actually require changes.

Show resolved Hide resolved lib/snippet-expansion.js Outdated
Show resolved Hide resolved lib/snippet-expansion.js Outdated
Show resolved Hide resolved lib/snippet-expansion.js Outdated
Show resolved Hide resolved lib/snippet-expansion.js Outdated
Show resolved Hide resolved lib/snippet.js Outdated
Show resolved Hide resolved lib/snippets.js Outdated
Show resolved Hide resolved lib/snippets.js Outdated
Show resolved Hide resolved lib/snippets.js Outdated
Show resolved Hide resolved lib/snippets.js Outdated
Show resolved Hide resolved lib/snippets.js Outdated
@Aerijo

This comment has been minimized.

Copy link
Member Author

commented Feb 6, 2019

@Arcanemagus I hope you didn't write out every comment each time... I'd have understood even with no comment 😄

@Arcanemagus

This comment has been minimized.

Copy link

commented Feb 6, 2019

Copy/paste meant it wasn't much more than the Ctrl + F to find them 😆.

@Arcanemagus
Copy link

left a comment

LGTM at least, now we just need somebody to give final approval.

@Aerijo Aerijo referenced this pull request Feb 7, 2019

Open

[WIP] LSP snippets #288

15 of 15 tasks complete
@rafeca

rafeca approved these changes Apr 26, 2019

Copy link
Contributor

left a comment

Thanks a lot!

I've glimpsed through the changes and didn't spot anything wrong, so we're good to go 😃

Show resolved Hide resolved lib/snippets.js Outdated

@rafeca rafeca self-assigned this Apr 26, 2019

🔥 return
Co-Authored-By: Aerijo <bengray178@gmail.com>

@rafeca rafeca merged commit bca7387 into atom:master Apr 27, 2019

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.