File tree Expand file tree Collapse file tree 6 files changed +12
-28
lines changed Expand file tree Collapse file tree 6 files changed +12
-28
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -19,11 +19,6 @@ const WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeM
1919const getClientEnvironment = require ( './env' ) ;
2020const paths = require ( './paths' ) ;
2121
22- // @remove -on-eject-begin
23- // `path` is not used after eject - see https://github.com/facebookincubator/create-react-app/issues/1174
24- const path = require ( 'path' ) ;
25- // @remove -on-eject-end
26-
2722// Webpack uses `publicPath` to determine where the app is being served from.
2823// In development, we always serve from the root. This makes config easier.
2924const publicPath = '/' ;
@@ -121,7 +116,9 @@ module.exports = {
121116 // @remove -on-eject-begin
122117 // Point ESLint to our predefined config.
123118 options : {
124- configFile : path . join ( __dirname , '../eslintrc' ) ,
119+ baseConfig : {
120+ extends : [ 'react-app' ] ,
121+ } ,
125122 useEslintrc : false ,
126123 } ,
127124 // @remove -on-eject-end
Original file line number Diff line number Diff line change @@ -19,11 +19,6 @@ const InterpolateHtmlPlugin = require('react-dev-utils/InterpolateHtmlPlugin');
1919const paths = require ( './paths' ) ;
2020const getClientEnvironment = require ( './env' ) ;
2121
22- // @remove -on-eject-begin
23- // `path` is not used after eject - see https://github.com/facebookincubator/create-react-app/issues/1174
24- const path = require ( 'path' ) ;
25- // @remove -on-eject-end
26-
2722// Webpack uses `publicPath` to determine where the app is being served from.
2823// It requires a trailing slash, or the file assets will get an incorrect path.
2924const publicPath = paths . servedPath ;
@@ -122,7 +117,9 @@ module.exports = {
122117 options : {
123118 // TODO: consider separate config for production,
124119 // e.g. to enable no-console and no-debugger only in production.
125- configFile : path . join ( __dirname , '../eslintrc' ) ,
120+ baseConfig : {
121+ extends : [ 'react-app' ] ,
122+ } ,
126123 useEslintrc : false ,
127124 } ,
128125 // @remove -on-eject-end
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1111 "url" : " https://github.com/facebookincubator/create-react-app/issues"
1212 },
1313 "files" : [
14- " babelrc" ,
15- " eslintrc" ,
1614 " bin" ,
1715 " config" ,
1816 " scripts" ,
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