Eslint 在 vs code 中不稳定

Eslint is unstable in vs code

我正在使用 VS 代码和 eslint 扩展。

有时 eslint 会因以下错误而崩溃:

(node:1615011) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 257)
(node:1615011) UnhandledPromiseRejectionWarning: Error: Unhandled method eslint/confirmESLintExecution
    at /home/desktop/.vscode-server/extensions/dbaeumer.vscode-eslint-2.1.14/server/out/eslintServer.js:1:53829
    at /home/desktop/.vscode-server/extensions/dbaeumer.vscode-eslint-2.1.14/server/out/eslintServer.js:1:54123
    at Immediate.<anonymous> (/home/desktop/.vscode-server/extensions/dbaeumer.vscode-eslint-2.1.14/server/out/eslintServer.js:1:54488)
    at processImmediate (internal/timers.js:439:21)
(node:1615011) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejection id: 258)

为什么?什么是错误的,我该如何解决?

Eslint 扩展: 2.1.14

VSCODE:

Version: 1.52.1 (user setup)
Commit: ea3859d4ba2f3e577a159bc91e3074c5d85c0523
Date: 2020-12-16T16:34:46.910Z
Electron: 9.3.5
Chrome: 83.0.4103.122
Node.js: 12.14.1
V8: 8.3.110.13-electron.0
OS: Windows_NT x64 10.0.18363

官方 GitHub repo 提出了一个问题,你可以在那里跟进

https://github.com/microsoft/vscode-eslint/issues/1156