添加后出现以下 eslint 错误// eslint-disable-next-line react-hooks/exhaustive-deps
在我的代码中。
8:14 错误 未找到规则“react-hooks/exhaustive-deps”的定义
我提到this https://stackoverflow.com/questions/55383611/definition-for-rule-react-require-extension-was-not-found发布来解决此问题,但提到的解决方案在我的情况下不起作用。任何线索如何抑制这个eslint error?
PS我正在使用标准js https://standardjs.com/结合起来。
这通常发生是因为react-hooks
插件中缺少.eslintrc
插件配置。确保您已添加react-hooks
如下例所示:
"plugins": ["react", "react-hooks",],
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)