Closed Bug 1181825 Opened 5 years ago Closed 4 years ago

Enable eslint rules for Loop: no-extra-boolean cast, no-redeclare

Categories

(Hello (Loop) :: Client, defect)

defect
Not set

Tracking

(firefox42 fixed)

RESOLVED FIXED
mozilla42
Iteration:
42.2 - Jul 27
Tracking Status
firefox42 --- fixed

People

(Reporter: dmose, Assigned: frsela)

References

Details

(Whiteboard: [lang=js][tech-debt])

Attachments

(1 file, 1 obsolete file)

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

no-extra-boolean-cast - disallow double-negation boolean casts in a boolean context
no-redeclare - disallow declaring the same variable more than once

Both of these rules can be enabled by delete the relevant lines in  browser/components/loop/.eslintrc.

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 .jsx file that is affected: fix the 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: nobody → frsela
Attached patch Bug1181825.patch (obsolete) — Splinter Review
Attachment #8636484 - Flags: review?(dmose)
Comment on attachment 8636484 [details] [diff] [review]
Bug1181825.patch

Review of attachment 8636484 [details] [diff] [review]:
-----------------------------------------------------------------

Looks great; thanks for the patch!
Attachment #8636484 - Flags: review?(dmose) → review+
Patch rebased against current fx-team
Attachment #8636484 - Attachment is obsolete: true
Attachment #8637696 - Flags: review+
Thanks for the patch.  It's exciting to see our infrastructure keep improving so we can write code more effectively!
https://hg.mozilla.org/mozilla-central/rev/6940314afe11
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
Iteration: --- → 42.2 - Jul 27
Flags: firefox-backlog+
You need to log in before you can comment on or make changes to this bug.