Closed Bug 1181239 Opened 9 years ago Closed 9 years ago

Enable eslint "use strict" function rule for content code

Categories

(Hello (Loop) :: Client, defect)

defect
Not set
normal
Points:
1

Tracking

(firefox42 fixed)

RESOLVED FIXED
mozilla42
Iteration:
42.1 - Jul 13
Tracking Status
firefox42 --- fixed

People

(Reporter: standard8, Assigned: standard8)

References

Details

Attachments

(1 file)

Our chrome code has "use strict" enabled already. We should enable the rule for our content code as well.
Simple additions. I had to re-indent some blocks for the ui/ files, but this seemed better than adding "use strict" for every individual function.
Attachment #8630589 - Flags: review?(dmose)
Blocks: 1150279
Comment on attachment 8630589 [details] [diff] [review]
Enable eslint 'use strict' function rule for Loop's content code.

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

r=dmose on .eslintrc, rs=dmose on all the rest.  Thanks for the patch!

::: browser/components/loop/.eslintrc
@@ +60,5 @@
>      "no-use-before-define": 0,    // TODO: Remove (use default)
>      "object-curly-spacing": 0,    // [2, "always"],
>      "quotes": [2, "double", "avoid-escape"],
>      "spaced-comment": [2, "always"],
> +    "strict": [2, "function"],                  // [2, "function"],

You can probably remove the comment here, or maybe replace it with a link to http://eslint.org/docs/rules/strict#function-mode
Attachment #8630589 - Flags: review?(dmose) → review+
https://hg.mozilla.org/mozilla-central/rev/fe15e80f18f2
Status: NEW → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla42
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: