Inspectopedia Help

Probable bugs

'for' loop where update or condition does not use loop variable  

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

'typeof' comparison with non-standard value  

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  

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

Comparison with NaN  

Reports a comparison with NaN.

Consecutive commas in array literal  

Reports a consecutive comma in an array literal.

Division by zero  

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  

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

Infinite recursion  

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

Possibly incorrect target of indexed property access  

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

Potentially invalid constructor usage  

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  

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

Potentially invalid reference to 'this' of a class from closure  

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

Result of object allocation ignored  

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

Suspicious '=+' assignment  

Reports an assignment in the form a =+ b.

Suspicious usage of 'bind' with arrow function  

Reports bind used together with an arrow function.

Suspicious variable/parameter name combination  

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  

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

Last modified: 29 April 2024