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

Fixed #707 Replaced var with const and let and added strict mode #712

Merged
merged 3 commits into from Feb 1, 2019

Conversation

Projects
None yet
5 participants
@hjpatel16
Copy link
Contributor

hjpatel16 commented Jan 30, 2019

No description provided.

@codecov-io

This comment has been minimized.

Copy link

codecov-io commented Jan 30, 2019

Codecov Report

Merging #712 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #712   +/-   ##
=======================================
  Coverage   86.71%   86.71%           
=======================================
  Files          16       16           
  Lines        1746     1746           
=======================================
  Hits         1514     1514           
  Misses        232      232
Impacted Files Coverage Δ
src/fs-watcher.js 92.3% <100%> (ø) ⬆️
src/shell/environment.js 100% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 26b47ee...ce8011f. Read the comment docs.

@DavidLi119

This comment has been minimized.

Copy link
Contributor

DavidLi119 commented Jan 30, 2019

Hi hjpatel16, great edit of your file, however you forgot to change lines 14-16 from var to let/const. Also, though it may be redundant, please include a description of what you did to the code.

@hjpatel16

This comment has been minimized.

Copy link
Contributor Author

hjpatel16 commented Jan 30, 2019

Thanks @DavidLi119, I was confused to use let for those remaining variables but I did make some changes

@humphd
Copy link
Contributor

humphd left a comment

This is looking good. I left a few notes of places where you should use const vs. let. Also, I notice that your Pull Request doesn't have a description. Make sure you always include one, and also reference the issue number you are fixing, for example, "Fixes #707".

Let me know when you've made these changes and pushed again, and I'll re-review.

@@ -46,12 +48,12 @@ function FSWatcher() {
recursivePathPrefix = filename === '/' ? '/' : filename + '/';
}

var intercom = Intercom.getInstance();
let intercom = Intercom.getInstance();

This comment has been minimized.

@humphd

humphd Jan 31, 2019

Contributor

This could be const, since intercom won't change again.

intercom.on('change', onchange);
};

self.close = function() {
var intercom = Intercom.getInstance();
let intercom = Intercom.getInstance();

This comment has been minimized.

@humphd

humphd Jan 31, 2019

Contributor

Same thing here, you can use const

@Harsh2777

This comment has been minimized.

Copy link

Harsh2777 commented Feb 1, 2019

Fixed #707 for fs-watcher.js file to use let and const instead of var where applicable. You can check under the files changed tab to review my changes

@humphd

humphd approved these changes Feb 1, 2019

Copy link
Contributor

humphd left a comment

Great, looks good.

@humphd humphd merged commit 701849e into filerjs:master Feb 1, 2019

1 check passed

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.