vbenjs / vue-vben-admin

A modern vue admin. It is based on Vue3, vite and TypeScript. It's fast!
https://vben.vvbin.cn/
MIT License
22.88k stars 6.24k forks source link

eslint 校验 报 SyntaxError: Unexpected token '||=' #3931

Open miaobowei opened 1 week ago

miaobowei commented 1 week ago

⚠️ 重要 ⚠️ 在进一步操作之前,请检查下列选项。如果您忽视此模板或者没有提供关键信息,您的 Issue 将直接被关闭

描述 Bug

使用Webstorm运行项目,eslint报错 `SyntaxError: Failed to load plugin '@typescript-eslint' declared in '.eslintrc.cjs » @vben/eslint-config': Unexpected token '||=' Referenced from: C:\Users\MR\Documents\code\vben\vue-vben-admin\internal\eslint-config\dist\index.cjs

C:\Users\MR\Documents\code\vben\vue-vben-admin\node_modules.pnpm\@typescript-eslint+scope-manager@7.7.0\node_modules\@typescript-eslint\scope-manager\dist\referencer\ClassVisitor.js:121 withMethodDecorators ||= ^^^

SyntaxError: Unexpected token '||=' at wrapSafe (internal/modules/cjs/loader.js:1029:16) at Module._compile (internal/modules/cjs/loader.js:1078:27) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10) at Module.load (internal/modules/cjs/loader.js:979:32) at Function.Module._load (internal/modules/cjs/loader.js:819:12) at Module.require (internal/modules/cjs/loader.js:1003:19) at require (internal/modules/cjs/helpers.js:107:18) at Object. (C:\Users\MR\Documents\code\vben\vue-vben-admin\node_modules.pnpm\@typescript-eslint+scope-manager@7.7.0\node_modules\@typescript-eslint\scope-manager\dist\referencer\Referencer.js:20:24) at Module._compile (internal/modules/cjs/loader.js:1114:14) at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)` image image

复现 Bug

使用WebStorm运行项目

系统信息