Enable eslint rules for Loop: comma related

RESOLVED FIXED in Firefox 40

Status

defect
P3
normal
Rank:
38
RESOLVED FIXED
4 years ago
4 years ago

People

(Reporter: standard8, Assigned: tomesh, Mentored)

Tracking

unspecified
mozilla40
Points:
---
Bug Flags:
firefox-backlog +
qe-verify -

Firefox Tracking Flags

(firefox40 fixed)

Details

(Whiteboard: [lang=js])

Attachments

(1 attachment)

(Reporter)

Description

4 years ago
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 (https://wiki.mozilla.org/Loop/Development#Developing).

If you need more help setting up eslint, see https://wiki.mozilla.org/Loop/Development#Additional_Requirements

Information about the eslint rules can be found here:

http://eslint.org/docs/rules/
(Assignee)

Comment 1

4 years ago
Hi, I would like to start working on this bug. Can you please assign me?
(Reporter)

Updated

4 years ago
Assignee: nobody → tomesm
(Assignee)

Comment 2

4 years ago
Attachment #8602132 - Flags: review?(standard8)

Updated

4 years ago
Rank: 38
Flags: firefox-backlog+
Priority: -- → P3
(Reporter)

Comment 3

4 years ago
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+
(Reporter)

Updated

4 years ago
Flags: qe-verify-
https://hg.mozilla.org/mozilla-central/rev/32df49355c68
Status: NEW → RESOLVED
Last Resolved: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla40
You need to log in before you can comment on or make changes to this bug.