Inspectopedia 2024.3 Help

Probable bugs

'for' loop where update or condition does not use loop variable   New in this release

Reports a for loop where the condition or update does not use the for loop variable.

'typeof' comparison with non-standard value   New in this release

Reports a comparison of a typeof expression with a literal string which is not one of the standard types: undefined, object, boolean, number, string, function, or symbol.

Comparison of expressions having incompatible types   New in this release

Reports a comparison with operands of incompatible types or an operand with a type without possible common values.

Comparison with NaN   New in this release

Reports a comparison with NaN.

Consecutive commas in array literal   New in this release

Reports a consecutive comma in an array literal.

Division by zero   New in this release

Reports division by zero or a remainder by zero.

Equality operator may cause type coercion  

Reports a usage of an equality operator that may cause unexpected type coercions.

Infinite loop statement   New in this release

Reports a for, while, or do statement which can only exit by throwing an exception.

Infinite recursion   New in this release

Reports a function which must either recurse infinitely or throw an exception.

Possibly incorrect target of indexed property access   New in this release

Reports a potentially invalid indexed property access, for example, Array[1].

Potentially invalid constructor usage   New in this release

Reports a usage of a potentially invalid constructor function, for example: a function that is not a constructor after new, using a constructor's prototype or calling a constructor without new.

Potentially invalid reference to 'this' from closure   New in this release

Reports a this in closure that is used for referencing properties of outer context.

Potentially invalid reference to 'this' of a class from closure   New in this release

Reports an attempt to reference a member of an ECMAScript class via the this.

Result of object allocation ignored   New in this release

Reports object allocation where the result of the allocated object is ignored, for example, new Error(); as a statement, without any assignment.

Suspicious '=+' assignment   New in this release

Reports an assignment in the form a =+ b.

Suspicious usage of 'bind' with arrow function   New in this release

Reports bind used together with an arrow function.

Suspicious variable/parameter name combination   New in this release

Reports an assignment or a function call where the name of the target variable or the function parameter does not match the name of the value assigned to it.

Void function return value used   New in this release

Reports a return value of a function that doesn't return anything.

Last modified: 11 September 2024