Expected '===' and instead saw '==' (eqeqeq) at XXXX
1 error found.
You may use special comments to disable some warnings.
Use // eslint-disable-next-line to ignore the next line.
Use /* eslint-disable */ to ignore all warnings in a file.
有个js判断语句
必须用==,用全等判断不出来。
const ua = window.navigator.userAgent.toLowerCase()
// eslint-disable-next-line
if (ua.match(/MicroMessenger/i) == 'micromessenger') {
//是微信浏览器的操作
this.isToast = true
} else {
//不是微信浏览器的做法
this.isToast = false
this.download()
}
已经有提示了,解决方法:
在行后加一条//eslint-disable-line
Use // eslint-disable-next-line to ignore the next line. 下一行代码不让eslint检测,我用的这个
Use / eslint-disable / to ignore all warnings in a file. // 整个文件不让eslint检测