tools,lib: enable strict equality lint rule
Enablie a lint rule to require ===
and !==
instead of ==
and !=
except in some well-defined cases:
- comparing against
null
as a shorthand for also checking forundefined
- comparing the result of
typeof
- comparing literal values
In cases where ==
or !=
are being used as optimizations, use an
ESLint comment to disable the eqeqeq
rule for that line explicitly. I
rather like this because it's a signal that the usage is intentional and
not a mistake.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
commit message follows commit guidelines
Affected core subsystem(s)
tools lib