3

I am trying to install and use the eslint-plugin-react-hooks plugin in a project. Usually I'd simply run npm install or yarn add but the directions say to use react-scripts because I'm using create-react-app. How do I do that? Do I add a script and list it as a dependency on the package.json file or is there some other way?

Any help is appreciated.

Selino
  • 111
  • 3
  • 12
  • It should work? What is the exact error? – wentjun Jun 05 '20 at 05:06
  • 1
    I think that maybe I'm just misreading the directions. "Note: If you're using Create React App, please use react-scripts >= 3 instead of adding it directly." Does that mean that if I use react-scripts >=3 then this plugin is included? I don't have to install anything? – Selino Jun 07 '20 at 05:41
  • I can't really rmb the exact specifications of CRA react-scripts, but I have used both react-scripts and eslint-hooks plugin without any issues. All I did is to run `npm i -D` or `yarn add -D` that plugin and configure it on my eslint.js file. Works without issues. Have you tried it? – wentjun Jun 07 '20 at 06:01
  • @wentjun Not sure are you are spreading the wrong info. CRA react project doesn't have eslint.js. Did you read the question before posting the comment? – AndroidEngineX Jan 16 '21 at 22:07
  • @AtulGupta I added the eslint configuration file on my own. It is not part of CRA. – wentjun Jan 17 '21 at 03:21

0 Answers0