Closed xqyi closed 7 months ago
我试了下没问题呀,而且这个规则consistent-type-assertions不是「Require Type Info」的,应该是不需要 project 配置的。
是不是 @typescript-eslint/eslint-plugin 的版本和我不一样?
我是 5.57.0
基本确认了应该是某个依赖的包的版本不一致出现的问题,我将package.json中的依赖包全部升级到了最新版。 在自己的已有项目中使用时文档中的 npm i xxx 命令安装,出现问题可能也是某个依赖包版本太新了导致出现一些问题,package.json 中依赖包很多,只能一个一个和 example/typescript-vue 中的对比版本吗?
确认了:文档中给的安装脚本 npm install --save-dev @babel/core @babel/eslint-parser @typescript-eslint/eslint-plugin @typescript-eslint/parser @vue/eslint-config-typescript eslint eslint-config-alloy eslint-plugin-vue vue-eslint-parser
,其中 @typescript-eslint/eslint-plugin 和 @typescript-eslint/parser 会自动安装最新的 6.y.z 版本,将这两个包降级到 5.y.z 就正常了
此项目现在还有人维护吗?仓库里提供的 /examples/typescript-vue 中的例子无法使用:
直接提示错误:
根据提示在 .eslintrc.js 的 parserOptions 中添加 project 指向 './tsconfig.json' ,执行 pnpm eslint 后还是提示同样的错误提示