How to add to WebStorm linting to help with new React Hooks Proposal

I would like webstorm to show me errors that don't conform to the react hooks proposal in react. See the attached screen shot for the config I'm looking to setup in react.



Hmm... And what is the problem? Do you mean that eslint-plugin-react-hooks errors are not shown in the IDE when ESLint support is enabled?


I'm expecting that the code below should show a lint error because hooks are only suppose to work in functions.


import React, {useState} from 'react';
import AxiosHooks from "../src/AxiosHooks";

class axioshooks extends Component {
render() {
const [data, setData] = useState([]);
return (
export default axioshooks;

Must be an issue with react-hooks ESLint plugin

I have checked that errors are correctly highlighted in Webstorm when using hooks in if(), for example:

And the same issue is reported when running ESLint in terminal:

error    React Hook "useEffect" is called conditionally. React Hooks must be called in the exact same order in every component render  react-hooks/rules-of-hooks

but no issues are reported when using hooks in class componets similar to yours, neither in editor nor in cli/while building the app.

I'd suggest reporting this to


Please sign in to leave a comment.