Query module ImplicitOperandConversion
- Implicit operand conversion
- Relying on implicit conversion of operands is error-prone and makes code hard to read.
- reliability readability external/cwe/cwe-704
The right-hand operand of
An expression that appears in a syntactic position where its value may be implicitly converted.
An implicit conversion with a whitelist of types for which the implicit conversion is harmless.
Property names in index expressions are converted to strings, so they should be Booleans, strings or numbers.
An expression whose value should not be
Operands of arithmetic and bitwise operations are converted to numbers, so they should be Booleans, numbers or Dates.
Expressions that are interpreted as objects shouldn’t be primitive values.
Property names in
Operands of relational operators are converted to strings or numbers, and hence should be strings, numbers or Dates.
Template literal elements are converted to strings, and hence should not be