codeclimate / codeclimate-eslint

Code Climate Engine for ESLint
MIT License
95 stars 93 forks source link

Add support for 'react-hooks/rules-of-react' #439

Closed guilherme6191 closed 5 years ago

guilherme6191 commented 5 years ago

Hello everyone.

Would it be possible to add support for react-hooks/rules-of-hooks?

Just updated React to 16.8 and started using react hooks, its new feature. They suggest the usage of the eslint-plugin-react-hooks. Codeclimate complains with this error on every file: Definition for rule 'react-hooks/rules-of-hooks' was not found.

Thanks!

joeycozza commented 5 years ago

I made a pr for it https://github.com/codeclimate/codeclimate-eslint/pull/441

Sebdevar commented 5 years ago

Can the mentioned PR be merged if ready? Our project is getting failed build because of the eslint plugin not being supported

ale7714 commented 5 years ago

Thank you @joeycozza for opening a PR. We have merged it. Thank you for you patience all!

aleksandrlat commented 5 years ago

@ale7714 I see issue is closed. But when it is possible to use it? I just added this plugin to my project and got bunch of errors Definition for rule 'react-hooks/rules-of-hooks' was not found and Definition for rule 'react-hooks/exhaustive-deps' was not found

Pillar-Zhang commented 4 years ago

{ "plugins": [ // ... "react-hooks" ], "rules": { // ... "react-hooks/rules-of-hooks": "error", "react-hooks/exhaustive-deps": "warn" } }

xivig commented 4 years ago

Thanks Pillar-Zhang. I was actually forgetting to include the "react-hooks" in the plugins