File tree 6 files changed +12
-28
lines changed
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
19
19
const getClientEnvironment = require ( './env' ) ;
20
20
const paths = require ( './paths' ) ;
21
21
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
-
27
22
// Webpack uses `publicPath` to determine where the app is being served from.
28
23
// In development, we always serve from the root. This makes config easier.
29
24
const publicPath = '/' ;
@@ -121,7 +116,9 @@ module.exports = {
121
116
// @remove -on-eject-begin
122
117
// Point ESLint to our predefined config.
123
118
options : {
124
- configFile : path . join ( __dirname , '../eslintrc' ) ,
119
+ baseConfig : {
120
+ extends : [ 'react-app' ] ,
121
+ } ,
125
122
useEslintrc : false ,
126
123
} ,
127
124
// @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');
19
19
const paths = require ( './paths' ) ;
20
20
const getClientEnvironment = require ( './env' ) ;
21
21
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
-
27
22
// Webpack uses `publicPath` to determine where the app is being served from.
28
23
// It requires a trailing slash, or the file assets will get an incorrect path.
29
24
const publicPath = paths . servedPath ;
@@ -122,7 +117,9 @@ module.exports = {
122
117
options : {
123
118
// TODO: consider separate config for production,
124
119
// 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
+ } ,
126
123
useEslintrc : false ,
127
124
} ,
128
125
// @remove -on-eject-end
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 11
11
"url" : " https://github.com/facebookincubator/create-react-app/issues"
12
12
},
13
13
"files" : [
14
- " babelrc" ,
15
- " eslintrc" ,
16
14
" bin" ,
17
15
" config" ,
18
16
" scripts" ,
Original file line number Diff line number Diff line change @@ -100,12 +100,6 @@ prompt(
100
100
101
101
const ownPackage = require ( path . join ( ownPath , 'package.json' ) ) ;
102
102
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
- ) ;
109
103
110
104
console . log ( cyan ( 'Updating the dependencies' ) ) ;
111
105
const ownPackageName = ownPackage . name ;
@@ -154,11 +148,15 @@ prompt(
154
148
155
149
// Add Babel config
156
150
console . log ( ` Adding ${ cyan ( 'Babel' ) } preset` ) ;
157
- appPackage . babel = babelConfig ;
151
+ appPackage . babel = {
152
+ presets : [ 'react-app' ] ,
153
+ } ;
158
154
159
155
// Add ESlint config
160
156
console . log ( ` Adding ${ cyan ( 'ESLint' ) } configuration` ) ;
161
- appPackage . eslintConfig = eslintConfig ;
157
+ appPackage . eslintConfig = {
158
+ extends : 'react-app' ,
159
+ } ;
162
160
163
161
fs . writeFileSync (
164
162
path . join ( appPath , 'package.json' ) ,
You can’t perform that action at this time.
0 commit comments