Custom eslint config with create-react-app

The problem

Nobody expected react-app-rewired, ha ha!

  1. npm i -D react-app-rewired react-app-rewire-eslint
  2. In project root directory createconfig-overrides.js file and
  3. Edit the file:
//config-overrides.jsconst rewireEslint = require(‘react-app-rewire-eslint’);
module.exports = function override(config, env) {
config = rewireEslint(config, env);
return config;
“scripts”: {
“start”: “react-app-rewired start”,
“build”: “react-app-rewired build”,
“test”: “react-app-rewired test — env=jsdom”,
“eject”: “react-scripts eject”

That’s all!




Web developer | React

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Adam Dziendziel

Adam Dziendziel

Web developer | React

More from Medium

Complete Tutorial On Redux Using With React JS | Devstringx

Redux Using With React JS |

Package React components for npm [1/3]

Screenshot of interface with React and Babel selected, generating a basic webpack.config.js

Ways to use React in Spring app

React Router V5 vs V6