October 2020 (version 1.42.0)
1.42.0 Update
Welcome to the new DeepScan updates!
Please kindly go ahead with the highlights for the latest release.
New Rules
The following Vue.js rules are introduced:
- VUE_MISSING_RETURN_VALUE_IN_VALIDATOR - Do not miss a return value in the validator functions for Vue props and event
- VUE_MISUSED_API_AFTER_AWAIT - Do not use the lifecycle hooks and watchers after
await
in an async function - VUE_SETUP_INVALID_THIS - Do not use
this
object in the Vuesetup
function
ESLint Integration
As for the supporting ESLint plugins, the following has changed:
- Add eslint-plugin-simple-import-sort
- Add eslint-plugin-vue-a11y
- Update eslint-plugin-jest to the latest version 24.1
- Update eslint-plugin-vue to the stable version 7.1.0
- Add a
react
dependency for eslint-plugin-react, which fixes an analysis fail in the ESLint 5 version
See here to find out which version of ESLint plugins DeepScan is using.
Miscellaneous
- IntelliJ plugin now supports IntelliJ IDEA 2020 versions
- Support async components at VUE_MISMATCHED_TYPE_OF_PROP
- Support
setup()
and Composition API lifecycle hooks at VUE_MISSING_CLEANUP_IN_LIFECYCLE - Support Composition API lifecycle hooks at VUE_BAD_API_RETURN_VALUE
- Recognize the return values of
defineComponent()
andVue.extend()
as Vue components - Recognize template literal without embedded expression as a syntactic constant, which improves overall analysis precision
Bug Fixes
- A false alarm for SYNTAX_ERROR may occur when a binary operator appears after TypeScript
as
assertion - SYNTAX_ERROR is not reported for incorrectly placed default values at object shorthand property
- SYNTAX_ERROR is not reported for TypeScript
declare
function having function body - Expressions at Vue
v-else-if
orv-slot
directives may reference incorrect variables getCurrentInstance()
is not recognized as a Vue API