由eslint标记的数组销毁和未使用的变量

Ale*_*.P. 2 javascript destruction eslint

我的代码中有这样的代码:

let [a, b, c, d, e] = await component.getState.call(game.gameId);
Run Code Online (Sandbox Code Playgroud)

变量b,c,e下面使用的代码,但不ad.同时我有一个标记未使用变量的eslint检查.

有没有办法编写更正确的破坏来解决这个问题?我知道esling-disable-line no-unused但更愿意避免它.

kid*_*ils 9

用空占位符替换它:

let [, b, c, , e] = await component.getState.call(game.gameId);
Run Code Online (Sandbox Code Playgroud)