如何绕过任何意外警告。指定其他类型@typescript eslint/no explicit any

如何绕过任何意外警告。指定其他类型@typescript eslint/no explicit any,typescript,eslint,Typescript,Eslint,我们有严格的零皮棉问题政策。这意味着需要修复所有错误和警告 在我们的React typescript项目中遇到此lint错误: 警告任何意外情况。指定其他类型@typescript eslint/no explicit any 在谷歌和lint网站上搜索。我没有找到这样的解决办法 尝试了以下操作://eslint:@typescript eslint/no explicit any:“off”无效 有人知道如何在React-typescript项目中绕过此eslint规则吗?当我试图绕过同一规则

我们有严格的零皮棉问题政策。这意味着需要修复所有错误和警告

在我们的React typescript项目中遇到此lint错误:

警告任何意外情况。指定其他类型@typescript eslint/no explicit any

在谷歌和lint网站上搜索。我没有找到这样的解决办法

尝试了以下操作:
//eslint:@typescript eslint/no explicit any:“off”
无效


有人知道如何在React-typescript项目中绕过此
eslint
规则吗?

当我试图绕过同一规则时,特别是对于重载方法,可以使用以下方法:
//eslint禁用下一行
,只要在问题行的正上方添加注释即可

或者,您可以通过以下方式忽略代码部分的规则:
/*eslint禁用规则名称*/您的代码块/*eslint启用规则名称*/
此处的注释必须是块注释。

您可以使用
未知
吗?e、 g.
HttpResponse

以下内容适用于您

/* eslint-disable @typescript-eslint/no-explicit-any*/

选中“@typescript eslint/no explicit any”:[“off”]

您能不能不只是修复错误?@PierreDuc不,我们想在我们的案例中绕过此错误您可以详细说明您的answare以澄清此方法解决问题的原因