Open Bug 1553449 Opened 5 years ago Updated 2 years ago

[meta] Remove the `eslint-disable complexity` flags from DevTools

Categories

(DevTools :: General, task, P3)

task

Tracking

(Not tracked)

People

(Reporter: pbro, Unassigned)

References

(Depends on 34 open bugs)

Details

(Keywords: meta)

Some of the functions in the DevTools codebase are rather long and complex.
ESLint has a special rule for warning about complex functions: https://eslint.org/docs/rules/complexity

Because some of the functions are more complex than the current complexity limit, a few eslint-disable complexity flags have been added here and there in the code.

The current list of these places is: https://searchfox.org/mozilla-central/search?q=eslint-disable%20complexity&path=devtools

The goal of this bug is to track all of the bugs we'll need to fix to get rid of these flags.
Getting rid of them means re-writing the corresponding functions to be less complex. Often that means extracting some parts of these functions to other, smaller, functions.

I gathered all of the functions in DevTools that have a complexity higher than 20: https://docs.google.com/spreadsheets/d/1w3jl9lbDsG7EHazAYkZ0s7id5uo20sGKjZ5MeiK0hx0/edit#gid=1748770914

See Also: → 1553451
Depends on: 1554866
Depends on: 1554867
Depends on: 1554868
Depends on: 1554869
Depends on: 1554871
Depends on: 1554872
Depends on: 1554873
Depends on: 1554874
Depends on: 1554875
Depends on: 1554876
Depends on: 1554878
Depends on: 1554879
Depends on: 1554880
Depends on: 1554881
Depends on: 1554882
Depends on: 1554883
Depends on: 1554884
Depends on: 1554885
Depends on: 1554886
Depends on: 1554887
Depends on: 1554888
Depends on: 1554889
Depends on: 1554890
Depends on: 1554891
Depends on: 1554892
Depends on: 1554893
Depends on: 1554894
Depends on: 1554895
Depends on: 1554896
Depends on: 1554897
Depends on: 1554898
Depends on: 1554899
Depends on: 1554900
Depends on: 1554901
Depends on: 1554902
Depends on: 1554903
Depends on: 1554904
Depends on: 1554905
Depends on: 1554906
Depends on: 1554907
Depends on: 1554908
Depends on: 1554909
Depends on: 1554910
Depends on: 1554911
Depends on: 1554913
Depends on: 1554914
Depends on: 1554915
Depends on: 1554916
Depends on: 1554917
Depends on: 1554918
Depends on: 1554919
Depends on: 1554920
Depends on: 1554921
Depends on: 1554922
Depends on: 1554924
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.