File tree Expand file tree Collapse file tree
packages/react-scripts/scripts Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -100,12 +100,6 @@ prompt(
100100
101101 const ownPackage = require ( path . join ( ownPath , 'package.json' ) ) ;
102102 const appPackage = require ( path . join ( appPath , 'package.json' ) ) ;
103- const babelConfig = JSON . parse (
104- fs . readFileSync ( path . join ( ownPath , '.babelrc' ) , 'utf8' )
105- ) ;
106- const eslintConfig = JSON . parse (
107- fs . readFileSync ( path . join ( ownPath , '.eslintrc' ) , 'utf8' )
108- ) ;
109103
110104 console . log ( cyan ( 'Updating the dependencies' ) ) ;
111105 const ownPackageName = ownPackage . name ;
@@ -154,11 +148,15 @@ prompt(
154148
155149 // Add Babel config
156150 console . log ( ` Adding ${ cyan ( 'Babel' ) } preset` ) ;
157- appPackage . babel = babelConfig ;
151+ appPackage . babel = {
152+ presets : [ 'react-app' ] ,
153+ } ;
158154
159155 // Add ESlint config
160156 console . log ( ` Adding ${ cyan ( 'ESLint' ) } configuration` ) ;
161- appPackage . eslintConfig = eslintConfig ;
157+ appPackage . eslintConfig = {
158+ extends : 'react-app' ,
159+ } ;
162160
163161 fs . writeFileSync (
164162 path . join ( appPath , 'package.json' ) ,
You can’t perform that action at this time.
0 commit comments