wepy开发小程序eslint报错error 'getApp' is not defined no-undef

wepy开发小程序使用getApp().globalData保存全局数据很方便,但是会在控制台看到很多报错:“error 'getApp' is not defined no-undef”,这是eslint报错。

解决办法:在.eslintrc.js文件中加入   globals: { getApp: true }

原文地址:https://www.cnblogs.com/sgqwjr/p/9305204.html