tools: enforce consistent operator linebreak style
Checklist
-
make -j8 test
(UNIX), orvcbuild test nosign
(Windows) passes -
commit message follows commit guidelines
Affected core subsystem(s)
lib, test, tools
Description of change
Commit 1:
lib,test: use consistent operator linebreak style
We have a tacit rule that for multiline statements, the operator should
be placed before the linebreak. This commit commit fixes the few
violations of this rule in the code base.
This allows us to enable the corresponding ESLint rule.
Commit 2:
tools: enforce consistent operator linebreak style
Adds the `operator-linebreak` rule to our ESLint config.
I disabled the check for the ternary operators because ESLint has a special case for it (rule is inverted) and it's not obvious what we want. There are about 30 violations for each case (linebreak before or after the operator). I personally would like it to be after, like everything else.