AlloyTeam / eslint-config-alloy

Progressive ESLint config for your React/Vue/TypeScript projects
https://alloyteam.github.io/eslint-config-alloy/
2.65k stars 317 forks source link

安装typescript-eslint@6.0.0版本报错 #245

Closed hu243285237 closed 1 year ago

hu243285237 commented 1 year ago

@typescript-eslint/eslint-plugin

@typescript-eslint/parser

安装这俩都报错

binvb commented 1 year ago

补充一下报错:

Found: @typescript-eslint/parser@6.0.0
npm ERR! node_modules/@typescript-eslint/parser
npm ERR!   peer @typescript-eslint/parser@"^6.0.0 || ^6.0.0-alpha" from @typescript-eslint/eslint-plugin@6.0.0
npm ERR!   node_modules/@typescript-eslint/eslint-plugin
npm ERR!     peerOptional @typescript-eslint/eslint-plugin@">=5.55.0" from eslint-config-alloy@5.0.0
npm ERR!     node_modules/eslint-config-alloy
npm ERR!       dev eslint-config-alloy@"^5.0.0" from the root project
npm ERR! 
npm ERR! Could not resolve dependency:
npm ERR! peerOptional @typescript-eslint/parser@"5.x" from eslint-config-alloy@5.0.0
npm ERR! node_modules/eslint-config-alloy
npm ERR!   dev eslint-config-alloy@"^5.0.0" from the root project
npm ERR! 
npm ERR! Fix the upstream dependency conflict, or retry
npm ERR! this command with --force, or --legacy-peer-deps
npm ERR! to accept an incorrect (and potentially broken) dependency resolution.
npm ERR! 
npm ERR! See /Users/vb/.npm/eresolve-report.txt for a full report.
yanranxiaoxi commented 1 year ago

除此报错外,Prettier 3.0 现在也正式发布了,希望考虑支持

pawover commented 1 year ago

在配置中添加就可以支持 6.0 了 "parserOptions": { "project": "./tsconfig.json" }, , 如果是安装报错可以覆盖版本信息至 6.0

yanranxiaoxi commented 1 year ago

在配置中添加就可以支持 6.0 了 "parserOptions": { "project": "./tsconfig.json" },, 如果是安装报错可以覆盖版本信息至 6.0

感谢回复! 现在就是使用这个方式暂时解决了问题。

xcatliu commented 1 year ago

已支持 @typescript-eslint 6.0,现在使用 eslint-config-alloy@5.1.0 即可 @yanranxiaoxi 已升级到 Prettier 3.0