[英]enabling the react-hooks eslint plugin in typescript. no plugins in tslint
Am I correct in saying that it is not possible to use this eslint plugin with tslint? 我在说,这是不可能使用纠正这个 eslint与tslint插件?
I tried adding this to my tslint.json: 我尝试将其添加到我的tslint.json中:
"plugins": ["react-hooks"],
"rules: {
"react-hooks/rules-of-hooks": "error",
"react-hooks/exhaustive-deps": "warn",
But I see the following errors in the console: 但是我在控制台中看到以下错误:
Could not find implementations for the following rules specified in the configuration:
react-hooks/rules-of-hooks
react-hooks/exhaustive-deps
You can use the following library for nesting-react-hooks error. 您可以将以下库用于nesting-react-hooks错误。
https://github.com/Gelio/tslint-react-hooks https://github.com/Gelio/tslint-react-hooks
There is a PR pending from the same contributor in the core tslint repo. tslint核心仓库中有来自同一贡献者的PR待定。 For the exhaustive deps rule which was introduced recently i have asked the author to add it into the same repo but still waiting for the response.
对于最近引入的详尽的dep规则,我已要求作者将其添加到同一回购中,但仍在等待响应。 https://github.com/Gelio/tslint-react-hooks/issues/9
https://github.com/Gelio/tslint-react-hooks/issues/9
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.