0

My app has lot of warnings which irritate me, so now i want to remove or hide all that warnings, so is there any way to do this.

Ashish
  • 410
  • 2
  • 11

1 Answers1

0

Yes, there is but It is not a good idea to supress warning, you should do something to fix it. Still here it is: suppose:

import Something from './Something';

But you are not using it. So you add this to the line above import to supress warning.

// eslint-disable-next-line 

So it would be

// eslint-disable-next-line 
import Something from './Something';

BOOM, your warning is gone.

Anish Arya
  • 518
  • 1
  • 7
  • 24
  • Thanks for reply,But i am asking about the cmd to disable all kind of warning and error something like --silent. – Ashish Mar 02 '20 at 11:59
  • use `/* eslint-disable */` to disable all warning in a file. This would be close to what you want. – Anish Arya Mar 02 '20 at 12:07
  • Check this out `https://reactjs.org/docs/optimizing-performance.html#brunch`. This will hide all react warnings. But it should be production build of your app. – Anish Arya Mar 04 '20 at 07:07