Reputation: 28780
Am I correct in saying that it is not possible to use this eslint plugin with tslint?
I tried adding this to my 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
Upvotes: 2
Views: 3568
Reputation: 1103
You can use the following library for nesting-react-hooks error.
https://github.com/Gelio/tslint-react-hooks
There is a PR pending from the same contributor in the core tslint repo.
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.
https://github.com/Gelio/tslint-react-hooks/issues/9
Upvotes: 2