小编Ben*_*Ben的帖子

如何在 VSCode 中的同一项目中的 .ts 文件和 .js 文件上运行 typescript-eslint

我有一个包含 javascript 和 typescript 文件的混合代码库。我想让 eslint 在 .js 文件上运行,而 typescript-eslint 在 VSCode 中的 .ts 文件上运行。

我已经成功配置了我的 .eslintrc.json 文件来让 typescript-eslint 在 .ts 文件上运行。问题是它最终也会在 .js 文件上运行 typescript-eslint,而不是普通的旧 eslint。

这看起来应该很简单而且相当普遍,但尽管在互联网上搜索,我仍然无法找到解决方案。

javascript typescript eslint visual-studio-code

21
推荐指数
2
解决办法
8955
查看次数