javascript - eslint configures WeChat applet using co function*
曾经蜡笔没有小新
曾经蜡笔没有小新 2017-05-19 10:11:21
0
1
981
co(function* () {
      let wxUser = yield STORAGE.get(STORAGE.wxUserInfo);
})

The above code reports an error

[eslint] Unexpected unnamed generator function. (func-names)


How to configure the .eslintrc.js file

曾经蜡笔没有小新
曾经蜡笔没有小新

reply all(1)
左手右手慢动作

func-names Requires functions to have names, anonymous functions are not allowed. So just give the function a name. Such as:

co(function * test() {
  // func body
})

Attached document address: http://eslint.org/docs/rules/...

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!