Skip to content

Commit 408fa37

Browse files
trungdq88JohnNilsson
authored andcommitted
ESLint 4 (#2735)
* Update eslint-loader 1.7.1 -> 1.9.0 * Add eslintPath option * Update eslint 3.19.0 -> 4.1.1 * Update peer dependencies * Move eslintPath config to outside @remove-on-eject
1 parent f9277da commit 408fa37

File tree

3 files changed

+6
-22
lines changed

3 files changed

+6
-22
lines changed

packages/eslint-config-react-app/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
],
1313
"peerDependencies": {
1414
"babel-eslint": "^7.2.3",
15-
"eslint": "^3.19.0",
15+
"eslint": "^4.1.1",
1616
"eslint-plugin-flowtype": "^2.33.0",
1717
"eslint-plugin-import": "^2.2.0",
1818
"eslint-plugin-jsx-a11y": "^5.0.3",

packages/react-scripts/config/webpack.config.dev.js

+4-15
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,7 @@ module.exports = {
144144
enforce: 'pre',
145145
include: paths.appSrc,
146146
},
147-
{
148-
test: /\.js$/,
149-
loader: require.resolve('source-map-loader'),
150-
enforce: 'pre',
151-
include: paths.appSrc,
152-
},
147+
153148
// ** ADDING/UPDATING LOADERS **
154149
// The "file" loader handles all assets unless explicitly excluded.
155150
// The `exclude` list *must* be updated with every change to loader extensions.
@@ -162,14 +157,8 @@ module.exports = {
162157
{
163158
exclude: [
164159
/\.html$/,
165-
// We have to write /\.(js|jsx)(\?.*)?$/ rather than just /\.(js|jsx)$/
166-
// because you might change the hot reloading server from the custom one
167-
// to Webpack's built-in webpack-dev-server/client?/, which would not
168-
// get properly excluded by /\.(js|jsx)$/ because of the query string.
169-
// Webpack 2 fixes this, but for now we include this hack.
170-
// https://github.com/facebookincubator/create-react-app/issues/1713
171-
/\.(js|jsx)(\?.*)?$/,
172-
/\.(ts|tsx)(\?.*)?$/,
160+
/\.(js|jsx)$/,
161+
/\.(ts|tsx)$/,
173162
/\.css$/,
174163
/\.json$/,
175164
/\.bmp$/,
@@ -237,7 +226,7 @@ module.exports = {
237226
],
238227
},
239228
// ** STOP ** Are you adding a new loader?
240-
// Remember to add the new extension(s) to the "url" loader exclusion list.
229+
// Remember to add the new extension(s) to the "file" loader exclusion list.
241230
],
242231
},
243232
plugins: [

packages/react-scripts/config/webpack.config.prod.js

+1-6
Original file line numberDiff line numberDiff line change
@@ -144,12 +144,7 @@ module.exports = {
144144
enforce: 'pre',
145145
include: paths.appSrc,
146146
},
147-
{
148-
test: /\.js$/,
149-
loader: require.resolve('source-map-loader'),
150-
enforce: 'pre',
151-
include: paths.appSrc,
152-
},
147+
153148
// ** ADDING/UPDATING LOADERS **
154149
// The "file" loader handles all assets unless explicitly excluded.
155150
// The `exclude` list *must* be updated with every change to loader extensions.

0 commit comments

Comments
 (0)