January 2019 (version 1.21.0)

1.21.0 Update

Happy new year!

This is our first release of this year. Keep a watchful eye on us!

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

Release Summary

This version includes a number of updates that we hope you've found some of them helpful.
The key highlights are:

Extended Language Support

We have added support for useful language features currently in ECMAScript and TypeScript.

  • Support TypeScript type import()
  • Allow top-level await as some browsers support it

Analysis Improvements

More Aggressive Alarm Filtering

  • Filter-out ASSIGN_SAME_VALUE alarms when type assertions are present (e.g., foo = foo as number;)
  • Filter-out EMPTY_BLOCK alarms when code comment exists before the block
  • Filter-out REACT_INEFFICIENT_PURE_COMPONENT_PROP alarms inside test cases because the prop values are transient and the efficiency is irrelevant in test code
  • Filter-out UNINITIALIZED_LOCAL_VAR alarms when the uninitialized access appears after the variable declaration because it is often intended in practice
  • Filter-out UNUSED_EXPR alarms for property and variable accesses appearing as separate statements because they are usually harmless and often intended for various purposes
  • Filter-out UNUSED_EXPR alarms on void expressions because it could mean that the expression is not to be used.
  • Filter-out UNUSED_EXPR alarms occurring when variable references are used as for loop initializer because it is often used to enhance code readability (e.g., for (i; i < len; i++))
  • Filter-out UNUSED_EXPR alarms when type assertions are present (e.g., (error: empty);)
  • Filter-out UNUSED_VAR_ASSIGN and UNUSED_DECL alarms occurring at array destructuring because it is often intended for code readability (e.g., let [x, y] = foo();)
  • Filter-out UNUSED_VAR_ASSIGN and UNUSED_DECL alarms occurring at `this` context assignment because it is often used as boilerplate (e.g., let self = this;)

Visual Studio Code extension (Embedded mode)

While DeepScan provides Visual Studio Code extension, it has the limitation for transferring the file to the DeepScan server and analyzing a file one by one.

New embedded mode works standalone without DeepScan server. It works with the local language server so you can directly analyze the whole project on your local.

Note: This feature is only available under a paid license. To activate this, contact us at support@deepscan.io.

Visual Studio Code Extension: Inspect Project

IntelliJ plugin

We've prepared a IntelliJ plugin for DeepScan. (Applied for WebStorm also)

You can directly inspect your JavaScript code on the fly in your IntelliJ, so find your code issues at development time earlier.

Note: This feature is only available under a paid license. To activate this, contact us at support@deepscan.io.

IntelliJ Plugin: Settings

Miscellaneous

  • Pinpoint alarm cause locations with shorter code range
  • Distinguish arrays from objects in alarm cause messages
  • Provide alarm cause locations for more CONSTANT_CONDITION alarms
  • Provide more specific type descriptions at MISMATCHED_TYPE_OF_ARG alarm messages
  • Lower impact to Medium for REACT_BAD_INITIAL_STATE_TYPE because it corresponds to a React waring not runtime error
  • Do not detect CONSTANT_CONDITION alarms on assert() conditions because being constant is often what is intended

Bug Fixes