June 2020 (version 1.38.0)

1.38.0 Update

Welcome to the new DeepScan updates! We hope that you are doing well in the current public health crisis.

Please kindly go ahead with the highlights for the latest release.

New Rules

Check out the newly introduced rules!

Analysis Improvements

  • Detect BAD_REMOVE_EVENT_LISTENER alarm when the undefined return value of addEventListener() is used to remove the listener
  • Provide a fix suggestion for UNUSED_VAR_ASSIGN alarms caused by possibly swapped assignments
  • Recognize the props argument of React setState() and Redux connect() callbacks

Deliberate Alarm Filtering

By our internal benchmarks with open source projects, we have deliberately filtered some alarms.

  • Filter-out AWAIT_NON_PROMISE alarms on constant expressions at test code because it is often intended
  • Filter-out CONSTANT_CONDITION alarms on the compatibility checks for Symbol()
  • Filter-out NO_EFFECT_CALL alarms on JSON.stringify() at test code because a cyclic object check could be intended


  • Always analyze the result of dynamic import operator as a Promise object
  • Do not detect BAD_CONDITIONAL_OPERATOR alarm when the condition is a binary operation with a numeric or string right operand
  • Do not detect UNDEFINED_IMPORT alarm for built-in Object prototype methods
  • Increase the impact of CONSTANT_CONDITION alarm when the condition evaluates to a boolean-valued function because it is likely that a function call is missing
  • Increase the impact of UNUSED_EXPR alarm on the relation operators like <
  • Recognize UNUSED_EXPR alarms on compound expressions as ESLint no-unused-expressions

Bug Fixes

  • A false alarm for CONSTANT_CONDITION may occur when object properties are updated at callee functions
  • A false alarm for REACT_BAD_EVENT_HANDLER_RETURN_FALSE may occur when the handler function is used for other purposes
  • A false alarm for VUE_MISMATCHED_TYPE_OF_OPTION may occur for the mixins property when the vue-class-component decorator is used
  • Analyzer may abnormally terminate when a destructuring argument is annotated as void type
  • Analyzer may abnormally terminate when a directory named ... exists
  • Analyzer may abnormally terminate when a regular expression ends with an incomplete named backreference
  • REFERENCE_BEFORE_LEXICAL_DECL alarms are not detected for variables declared inside a loop