原因:版本过低,es2021在eslint v7.8.0才被添加,如图:
https://github.com/eslint/eslint/releases/tag/v7.8.0
1638241044681_6889E37E-CDE4-41f0-8A7D-E25FDDB1C29F.png解决方法:将eslint降级:
先卸载原eslint:
npm
装eslint至7.X.X:
npm i eslint@7 -D
原因:版本过低,es2021在eslint v7.8.0才被添加,如图:
https://github.com/eslint/eslint/releases/tag/v7.8.0
1638241044681_6889E37E-CDE4-41f0-8A7D-E25FDDB1C29F.png解决方法:将eslint降级:
先卸载原eslint:
npm
装eslint至7.X.X:
npm i eslint@7 -D
本文标题:ESLint出现Environment key "es2021"
本文链接:https://www.haomeiwen.com/subject/pcfdxrtx.html
网友评论