How to not show warnings in Create React App

For local Eslint, add a file to your project named .eslintignore and add any directories or files you want to ignore:

build/
src/
*.js

Though you might as well remove it entirely at this point.


This doesn't work with building or starting the code however, if you are using create-react-app. There is no way to disable Eslint without ejecting because it's built into react-scripts. Anytime any you build or start the server, it will run eslint using its internal configs aside from special cases defined in package.json. The only way around that is to eject or prepend each file with the disable comment as mentioned elsewhere. See this issue on Github for more information.


Those warnings come from eslint. To disable them add /* eslint-disable */ at the top of the file you don't want to follow the eslint rules.