December 2020 (version 1.44.0)

Welcome to the new DeepScan updates. 2020 has been a very hard year and here we hope you are staying healthy and safe and we'll see you next in 2021.

Thank you for your continual love and support!

New Rules

The following rules are introduced:

Analysis Improvements

  • Support ES2020 globalThis
  • Support ES2020 String.prototype.matchAll()
  • Support ES2020 Promise.allSettled()
  • Support TypeScript ambient class/function merging
  • Support TypeScript type annotation at catch clause binding
  • Support TypeScript labeled tuple element
  • Support spreading types anywhere inside TypeScript tuple
  • Support as clause at TypeScript mapped type
  • Support paths config without baseUrl in TypeScript tsconfig.json
  • Improve recognizing React JSX expressions to handle the new JSX transform of React 17
  • Detect BAD_TYPE_COERCION alarm when objects are converted to numbers at binary -, *, /, %, or ** operator
  • Detect BAD_TYPE_COERCION alarm when non-numeric strings are converted to number at unary + or - operator
  • Restrict BAD_TYPE_COERCION detection on object values at comparison operators to the case that the other operand is a number

Bug Fixes

  • Defect merging does not work when the code fragment contains CR in it(\r)
  • A false alarm for SYNTAX_ERROR occurs when an optional binding pattern is used in TypeScript ambient contexts
  • A false alarm for SYNTAX_ERROR occurs for TypeScript optional async method
  • Syntax errors may not be reported for incorrectly placed TypeScript type annotations