Closed odanzhou closed 4 years ago
{
...
plugins: [
'react-hooks',
],
rules: {
...
'react-hooks/rules-of-hooks': 'error', // Checks rules of Hooks
'react-hooks/exhaustive-deps': 'error', // Checks effect dependencies
}
}
如楼上所示,在eslint配置中使用
@furylee @xiaohuoni 放在 .eslingtrc 文件里面吗?我放在里面没起作用
@furylee @xiaohuoni 放在 .eslingtrc 文件里面吗?我放在里面没起作用
您好请问您解决了吗 我在umi中也遇到了这个问题
.eslintrc.js
这里面配置,应该是有效的。
Background
使用了 hooks 写代码,配置了 eslint-plugin-react-hooks 但没起作用,编译器控制台没有警告信息