Closed Bug 1160489 Opened 6 years ago Closed 6 years ago

Enable eslint rules for Loop: comma related


(Hello (Loop) :: Client, defect, P3)



(firefox40 fixed)

Tracking Status
firefox40 --- fixed


(Reporter: standard8, Assigned: tomesh, Mentored)



(Whiteboard: [lang=js])


(1 file)

Enable some more eslint rules for Loop. Rules to enable in this bug:

* comma-dangle (no commas at end of sections)
* comma-spacing (trailing space after comma)

To enable the rule, remove the line from browser/components/loop/.eslintrc and save it.

Then you can run eslint in the browser/components/loop directory with:

  eslint  --ext .js --ext .jsm --ext .jsx .

The errors listed in the output are to be fixed.

If there's errors in a .js file that has an associated .jsx file, then fix the jsx file and run the react tools to generate the .js file (

If you need more help setting up eslint, see

Information about the eslint rules can be found here:
Hi, I would like to start working on this bug. Can you please assign me?
Assignee: nobody → tomesm
Attachment #8602132 - Flags: review?(standard8)
Rank: 38
Flags: firefox-backlog+
Priority: -- → P3
Comment on attachment 8602132 [details] [diff] [review]
rev1 - eslint comma related errors corrected.

Review of attachment 8602132 [details] [diff] [review]:

Great patch! Thanks for that. There's one minor nit, plus an additional couple of changes from what I checked in earlier today.

Given the simplicity of the fixes, I'll just fix them when I land in a couple of mins.

::: browser/components/loop/test/xpcshell/test_loopservice_busy.js
@@ +53,5 @@
>    setupFakeLoopServer();
>    // Setup fake login state so we get FxA requests.
>    const MozLoopServiceInternal = Cu.import("resource:///modules/loop/MozLoopService.jsm", {}).MozLoopServiceInternal;
> +  MozLoopServiceInternal.fxAOAuthTokenData = {token_type:"bearer", access_token:"1bad3e44b12f77a88fe09f016f6a37c42e40f974bc7a8b432bb0d2f0e37e1752", scope:"profile"};

I know its not your fault, but whilst we're here, this line is a bit long, so we should reformat it the way we format the rest of our objects (I think its called json style, but its not quite!):

MozLoopServiceInternal.fxAOAuthTokenData = {
  token_type: "bearer",
  access_token: "1bad3e44b12f77a88fe09f016f6a37c42e40f974bc7a8b432bb0d2f0e37e1752",
  scope: "profile"
Attachment #8602132 - Flags: review?(standard8) → review+
Flags: qe-verify-
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.