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.
            Asked
            
        
        
            Active
            
        
            Viewed 285 times
        
    0
            
            
        - 
                    2Warnings are there for a reason. You are supposed to do something to overcome the problem. Silencing them defeats the purpose. – Ahmad Mar 02 '20 at 08:20
 - 
                    But, i want the control over that. – Ashish Mar 02 '20 at 12:00
 
1 Answers
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