December 2019 (version 1.32.0)

1.32.0 Update

Time flies!

This is the last 2019 update and we want to say thank you to everyone!

Here we are wishing you an enjoyable JavaScript development in the new year.

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:

New Rules

We are enhancing our rules. Check out the newly introduced rules!

Analysis Improvements

Recognize object property accesses at iterator application points such as for-of loop and array spread. This enables detecting more NULL_POINTER and INSUFFICIENT_NULL_CHECK alarms like the following:

  async getWalletOrders ({ commit, state }, params) {
    let { data } = await api.getWalletOrders(params)
    // If 'data' is null, a TypeError will be thrown at the array spread '...data'.
    const unionList = _.unionBy([...state.list, ...data], 'id')
    commit(TYPES.UPDATE_WALLET, { list: unionList })
    // INSUFFICIENT_NULL_CHECK alarm is detected because the below check implies that 'data' may be null.
    return data || []
  },

ESLint Integration

To support the following configs, typescript-eslint plugin was upgraded to v2.10.

  • plugin:@typescript-eslint/eslint-recommended
  • plugin:@typescript-eslint/recommended
  • plugin:@typescript-eslint/recommended-requiring-type-checking

Also now we shows failure messages in more detail so you can directly see what is the problem such as missing plugins.

Miscellaneous

  • The locations of some UNREACHABLE_CODE alarms are changed slightly due to minor changes in our internal code representation

Bug Fixes

  • Variables exported through let declaration are omitted from inter-module analysis
  • Analyzer may abnormally terminate for some invalid export statements
  • The only accepted owner can leave the team although all the other owners are 'Declined' members