Last Comment Bug 1326511 - Enable brace-style and no-multi-spaces eslint rules for toolkit
: Enable brace-style and no-multi-spaces eslint rules for toolkit
Status: RESOLVED FIXED
:
Product: Toolkit
Classification: Components
Component: General (show other bugs)
: unspecified
: Unspecified Unspecified
-- normal (vote)
: mozilla53
Assigned To: Jared Wein [:jaws] (please needinfo? me)
:
:
Mentors:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2016-12-30 18:47 PST by Jared Wein [:jaws] (please needinfo? me)
Modified: 2017-01-03 18:41 PST (History)
1 user (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---
fixed

MozReview Requests
Submitter Diff Changes Open Issues Last Updated
Loading...
Error loading review requests:
Show discarded requests

Attachments
Bug 1326511 - Enable brace-style and no-multi-spaces eslint rules for toolkit. (59 bytes, text/x-review-board-request)
2016-12-30 19:01 PST, Jared Wein [:jaws] (please needinfo? me)
MattN+bmo: review+
Details | Review

Description User image Jared Wein [:jaws] (please needinfo? me) 2016-12-30 18:47:01 PST

    
Comment 1 User image Jared Wein [:jaws] (please needinfo? me) 2016-12-30 19:01:36 PST Comment hidden (mozreview-request)
Comment 2 User image Matthew N. [:MattN] (PM if requests are blocking you) 2016-12-31 10:32:03 PST
Comment on attachment 8822809 [details]
Bug 1326511 - Enable brace-style and no-multi-spaces eslint rules for toolkit.

https://reviewboard.mozilla.org/r/101594/#review102122

In the future it would be good to separate the --fix from the manual fixes and separate the two rule changes.

::: browser/base/content/browser.js:5703
(Diff revision 1)
> -                                                return ""; });
> + changed = true;
> +                                                return "";

Identation seems off here

::: browser/base/content/utilityOverlay.js:122
(Diff revision 1)
>   *    (Currently, the Alt isn't sent here at all for menu items, but that will change in bug 126189.)
>   * - Alt is hard to use in context menus, because pressing Alt closes the menu.
>   * - Alt can't be used on the bookmarks toolbar because Alt is used for "treat this as something draggable".
>   * - The button is ignored for the middle-click-paste-URL feature, since it's always a middle-click.
>   */
> -function whereToOpenLink( e, ignoreButton, ignoreAlt )
> +function whereToOpenLink( e, ignoreButton, ignoreAlt ) {

There's extra spacing around these args which should also be normalized at some point. Feel free to fix this here if you want while you're touching the line.

::: browser/base/content/utilityOverlay.js:570
(Diff revision 1)
>    }
>    return true;
>  }
>  
>  // Gather all descendent text under given document node.
> -function gatherTextUnder( root )
> +function gatherTextUnder( root ) {

I guess there's more of it in this file…

::: toolkit/components/satchel/test/test_bug_511615.html:96
(Diff revision 1)
> -  dnEvent.initKeyEvent("keydown",  true, true, null, false, false, false, false, alwaysval, 0);
> +  dnEvent.initKeyEvent("keydown", true, true, null, false, false, false, false, alwaysval, 0);
>    prEvent.initKeyEvent("keypress", true, true, null, false, false, false, false, keycode, charcode);
> -  upEvent.initKeyEvent("keyup",    true, true, null, false, false, false, false, alwaysval, 0);
> +  upEvent.initKeyEvent("keyup", true, true, null, false, false, false, false, alwaysval, 0);

FYI: extra spaces were used in test files to align arguments and you will be breaking that. One option would be to add more exceptions to the rule for test directories.
Comment 3 User image Jared Wein [:jaws] (please needinfo? me) 2017-01-03 08:47:20 PST Comment hidden (mozreview-request)
Comment 4 User image Pulsebot 2017-01-03 08:49:35 PST
Pushed by jwein@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/06698dfb3784
Enable brace-style and no-multi-spaces eslint rules for toolkit. r=MattN
Comment 5 User image Phil Ringnalda (:philor) 2017-01-03 18:41:21 PST
https://hg.mozilla.org/mozilla-central/rev/06698dfb3784

Note You need to log in before you can comment on or make changes to this bug.