在TypeScript Analyzer中使用linter插件

问题描述

我想在使用Visual Studio 2017开发的项目中使用一些棉绒。 我已经在Visual Studiovs marketplace)中添加TypeScript Analyzer扩展名,该扩展名已经预定义了很多提示,警告和错误

但是,我想使用其他插件,尤其是用于ReactJS插件

我已经添加

  • npm install eslint-plugin-react --save-dev
  • npm install eslint-plugin-react-hooks --save-dev

到我的项目。

在我的tslint.json添加

"extends": [
    "eslint:recommended","plugin:@typescript-eslint/recommended"
]

编辑任何.tsx文件O时,错误列表窗口中都会显示以下消息

C:\Users\...\Source\Repos\...\tslint.json: Invalid "extends" configuration value - Could not require "eslint:recommended". Review the Node lookup algorithm (https://nodejs.org/api/modules.html#modules_all_together) for the approximate method TSLint uses to find the referenced configuration file.

我不知道该怎么办。

我已经添加一个.eslintrc.js,因为我可以在几个站点上找到它,但是看来这完全被忽略了。

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)