錯誤情況:=> 會爆紅提示:ESLint: Parsing error: Unexpected token. Did you mean
{'>'}
or>
?
function().then((res) => {console.log(res.data);
}
解決方法:修改.eslintrc或者.eslintrc.js的配置
module.exports = {// 其他配置..."parserOptions": {// 允許使用較新的 ECMAScript 特性"ecmaVersion": 2022,// 或者:"ecmaFeatures": {"jsx": false // 關閉JSX語法支持}},
};