[eslint] Reduce the cyclomatic complexity in browser/components

ASSIGNED
Assigned to

Status

()

ASSIGNED
2 years ago
2 years ago

People

(Reporter: squib, Assigned: squib)

Tracking

(Blocks: 1 bug)

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

(Assignee)

Description

2 years ago
Currently, we set the max cyclomatic complexity for browser/components/* to be 70 because of BG__migrateUI. We should just make an exception for this function rather than the entire subdirectory.
Comment hidden (mozreview-request)
Comment on attachment 8858880 [details]
Bug 1356322 - [eslint] Reduce the cyclomatic complexity in browser/components/

https://reviewboard.mozilla.org/r/130868/#review133496

This is fine with me but please run this by Standard8 so that he knows about this change in direction.

::: commit-message-05c21:1
(Diff revision 1)
> +Bug 1356322 - [eslint] Reduce the cyclomatic complexity in browser/components  r?jaws

This comment is a little too broad. It is reducing it but it's not explaining why or how. This needs to be more specific before this patch lands. See https://groups.google.com/forum/#!topic/mozilla.dev.platform/qERnoJniCds
Attachment #8858880 - Flags: review?(jaws) → review+
Comment hidden (mozreview-request)
(Assignee)

Updated

2 years ago
Attachment #8858880 - Flags: review?(standard8)

Comment 4

2 years ago
mozreview-review
Comment on attachment 8858880 [details]
Bug 1356322 - [eslint] Reduce the cyclomatic complexity in browser/components/

https://reviewboard.mozilla.org/r/130868/#review133912

::: commit-message-05c21:1
(Diff revision 2)
> +Bug 1356322 - [eslint] Reduce the cyclomatic complexity in browser/components/  r?jaws

I would change this slightly to "Reduce the maximum allowed cyclomatic..."

::: browser/components/nsBrowserGlue.js:205
(Diff revision 2)
>      Cu.import("resource://services-sync/main.js");
>      Weave.Service.scheduler.delayedAutoConnect(delay);
>    },
>  
>    // nsIObserver implementation
> +  // eslint-disable-next-line complexity

Please can you file bugs for these 4 disabling, so that we can get a recorded discussion/decision as to if we are going to work to reduce the complexity of them or not.

Bonus points for adding bug references in the comments.
Attachment #8858880 - Flags: review?(standard8) → review+
See Also: → bug 1358949
Comment hidden (mozreview-request)
I wasted precious time on this again in bug 1363118.
You need to log in before you can comment on or make changes to this bug.