Files
react-native-devtools-frontend/front_end/console_test_runner
Patrick Brosset e65aaac861 Enable the no-return-assign ESLint rule
This rule disallows assigning a value in a return statement.
It also works in one-liner arrow functions.

For instance, a => a = 2 will trigger a warning.
This is to avoid cases where you actually meant to compare a to 2, not
assign the value 2 (maybe you wanted to return a boolean in a filter
callback).
These sorts of issues can easily pass review and cause weird problems
that are hard to track down later.

The rule is enabled in this CL, and all warnings are fixed with this CL.

More info about the rule: https://eslint.org/docs/rules/no-return-assign

Bug: 1093379
Change-Id: I38b98ea59ecaedc83a7f69073b17980808f9a3bf
Reviewed-on: https://chromium-review.googlesource.com/c/devtools/devtools-frontend/+/2242761
Reviewed-by: Patrick Brosset <patrick.brosset@microsoft.com>
Reviewed-by: Jose Leal <joselea@microsoft.com>
Reviewed-by: Tim van der Lippe <tvanderlippe@chromium.org>
Commit-Queue: Patrick Brosset <patrick.brosset@microsoft.com>
2020-06-22 08:34:42 +00:00
..
2020-04-14 05:35:23 +00:00