1

I was writing a code to access webcam, click a picture through my react app or browse and upload the picture from your files. For using react-html5-camera-phot and grommet I was getting these errors, Basically the error was import/no-extraneous-dependencies error.

For resolving this, I ran the suggested commands but the issue persisted and I kept getting the same error.

Therefore to remove these errors i went through stack overflow, and got a solution that suggested to post import/no-extraneous-dependencies": ["error", {"devDependencies": false, "optionalDependencies": false, "peerDependencies": false}] in my .eslintrc file. I posted this and now I am getting this error:

ESLint configuration in .eslintrc is invalid: - Unexpected top-level property "import/no-extraneous-dependencies".

I tried resolving this error too but could not find anything helpful. Please if you can tell me what I am doing wrong, itll be very helpful! Thanks in advance.

NISHTHA GUPTA
  • 11
  • 1
  • 2

1 Answers1

1

You need to put under rules object:

"rules": {
    "import/no-extraneous-dependencies": ["error",  {"devDependencies": true}],
    ...
}