0

Calling grunt-eslint causes a Cannot find module 'eslint-plugin-react' error that doesn't happen when calling eslint directly from the command line.

I have eslint-plugin-react installed globally.

Is there an easy way to make grunt eslint behave the same way as eslint?

Carles Andres
  • 1,761
  • 1
  • 15
  • 22

1 Answers1

1

Assuming you don't want to install the node module locally for some reason, I can think of two options. 1. Use grunt-exec within your grunt file to run eslint, or 2. As per the answer in the link below setup a symbolic link to your global node modules folder: How to use grunt-html installed globally?

Community
  • 1
  • 1
DenizEng
  • 400
  • 4
  • 14