找不到规则“反应钩/穷举滴水"的定义 [英] Definition for rule 'react-hooks/exhaustive-deps' was not found

查看:88
本文介绍了找不到规则“反应钩/穷举滴水"的定义的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的代码中添加//eslint-disable-next-line react-hooks/exhaustive-deps 后,出现以下eslint错误.

I am getting the following eslint error after adding // eslint-disable-next-line react-hooks/exhaustive-deps in my code.

8:14错误规则'react-hooks/exhaustive-deps'的定义未找到

8:14 error Definition for rule 'react-hooks/exhaustive-deps' was not found

我引用了​​此帖子进行修复这,但提到的解决方案不适用于我的情况.有什么线索可以解决这个 eslint 错误吗?

I referred to this post to fix this but the solution mentioned doesn't work in my case. Any clue how to suppress this eslint error?

PS我正在结合使用 standardjs .

PS I'm using standardjs in conjuction.

推荐答案

不是完美的解决方案,但需要更改:

// eslint-disable-next-line react-hooks/exhaustive-deps

收件人:

// eslint-disable-next-line

抑制了该错误.

这篇关于找不到规则“反应钩/穷举滴水"的定义的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆