更新时间:2022-06-14 17:18:12
从eslint>=7.5.0
开始,本地支持空位合并运算符.
Nullish coalescing operator is natively supported starting from eslint>=7.5.0
.
最简单的方法是在package.json中设置ES2020:
The easiest is set ES2020 in your package.json:
{
"eslintConfig":
{
"parserOptions":
{
"ecmaVersion": 2020
}
}
}