小编Mar*_*ldo的帖子

“预计‘this’将被类方法使用”

我收到来自 ESlint 的错误,但我不明白为什么。我读过这些:

\n\n\n\n

和这个:

\n\n\n\n

我仍然不明白我做错了什么。

\n\n

我的课

\n\n

\r\n
\r\n
/* eslint-disable no-plusplus */\r\n/* eslint-disable no-undef */\r\nclass Player {\r\n  constructor(imagePlayer, name, score, positionY, positionX) {\r\n    this.imagePlayer = imagePlayer;\r\n    this.name = name;\r\n    this.score = score;\r\n    this.x = positionX;\r\n    this.y = positionY;\r\n  }\r\n\r\n  drawPlayer() {\r\n    app.map.mapGame[this.y][this.x] = this.imagePlayer;\r\n  }\r\n\r\n  obstacle(y, x) {\r\n    let colision = false;\r\n    if (app.map.mapGame[y][x] === 1) {\r\n      console.log("evaluaci\xc3\xb3n");\r\n      colision = true;\r\n    }\r\n    return …
Run Code Online (Sandbox Code Playgroud)

javascript eslint

3
推荐指数
1
解决办法
9987
查看次数

标签 统计

eslint ×1

javascript ×1