mozillascience / PaperBadger

Issuing badges to credit authors for their work on academic papers
https://badges.mozillascience.org/
Mozilla Public License 2.0
95 stars 45 forks source link

changes to make jshint happy #165

Closed josmas closed 8 years ago

josmas commented 8 years ago

A few changes after running npm lint run. Tested on Firefox/Chrome.

I changed latedef = nofunc so that function definitions can be used before declaration, but not so variables (to avoid hoisting).

@acabunoc could you please review? thanks!

abbycabs commented 8 years ago

Hey @josmas thanks for your work here :)

We were originally using jshint (with that configuration!) since it was part of the Mozilla Foundation style guide. However, they migrated to eslint earlier this year.

I'll make an issue to migrate to the new style guide! Good catch with the quotes :) I'll take a closer look to make sure these changes don't have be reversed when we migrate to the new style guide.

Thanks again, Jos! Really appreciate your attention to detail here!

abbycabs commented 8 years ago

New issue for ESLint in #166

josmas commented 8 years ago

Hey @acabunoc I had a look at mofo-style and it turns out it is already installed; it is run through jscs when calling npm run lint, so I guess #166 is redundant.

abbycabs commented 8 years ago

Thanks @josmas! It's installed but I think we're just using it on jsbeautify https://github.com/mozillascience/PaperBadger/blob/master/package.json#L15 & jscs https://github.com/mozillascience/PaperBadger/blob/master/package.json#L12 (and an old versions I think!)

I'd like to update to use the new version that has eslint!

josmas commented 8 years ago

Hey @acabunoc yes, apologies I missed that one!

I have tried upgrading the package, but it seems like a much bigger jump that I had anticipated. More details in #166

josmas commented 8 years ago

@acabunoc I am finding that the same changes done here are needed for #166. Would you consider merging this one? Would be nice to have a little less work to do on the other side! :)

abbycabs commented 8 years ago

Done, thanks for flagging :)

josmas commented 8 years ago

Thanks @acabunoc I'll rebase the mofo branch I'm working on and take it from there!