Skip to content

Commit 51ff994

Browse files
chore: upgrade babel, prettier, eslint (#60)
1 parent f8807e8 commit 51ff994

File tree

18 files changed

+885
-771
lines changed

18 files changed

+885
-771
lines changed

package.json

Lines changed: 21 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -24,34 +24,34 @@
2424
"check": "yarn run is-pretty && yarn run lint && yarn run build && yarn run test -- -- -w 1"
2525
},
2626
"devDependencies": {
27-
"@babel/cli": "^7.4.4",
28-
"@babel/core": "^7.4.5",
29-
"@babel/plugin-proposal-class-properties": "^7.4.4",
30-
"@babel/plugin-proposal-object-rest-spread": "^7.4.4",
27+
"@babel/cli": "^7.6.0",
28+
"@babel/core": "^7.6.0",
29+
"@babel/plugin-proposal-class-properties": "^7.5.5",
30+
"@babel/plugin-proposal-object-rest-spread": "^7.5.5",
3131
"@babel/plugin-syntax-dynamic-import": "^7.2.0",
32-
"@babel/plugin-transform-runtime": "^7.4.4",
33-
"@babel/preset-env": "^7.4.5",
32+
"@babel/plugin-transform-runtime": "^7.6.0",
33+
"@babel/preset-env": "^7.6.0",
3434
"@babel/preset-flow": "^7.0.0",
3535
"@babel/preset-react": "^7.0.0",
36-
"@babel/runtime": "^7.4.5",
37-
"babel-core": "^7.0.0-bridge.0",
38-
"babel-eslint": "^10.0.1",
36+
"@babel/runtime": "^7.6.0",
37+
"babel-eslint": "^10.0.3",
3938
"babel-jest": "^24.8.0",
4039
"babel-loader": "^8.0.6",
4140
"babel-watch": "git://github.com/kmagiera/babel-watch.git",
4241
"cross-env": "^5.0.1",
4342
"css-loader": "^1.0.0",
44-
"eslint": "^5.16.0",
45-
"eslint-config-airbnb": "^17.1.0",
46-
"eslint-config-prettier": "^3.0.1",
47-
"eslint-import-resolver-lerna": "^1.0.0",
48-
"eslint-loader": "^2.1.0",
49-
"eslint-plugin-flowtype": "^2.50.0",
50-
"eslint-plugin-import": "^2.14.0",
51-
"eslint-plugin-jest": "^22.6.4",
52-
"eslint-plugin-jsx-a11y": "^6.1.1",
53-
"eslint-plugin-prettier": "^2.6.2",
54-
"eslint-plugin-react": "^7.11.1",
43+
"eslint": "^6.3.0",
44+
"eslint-config-airbnb": "^18.0.1",
45+
"eslint-config-prettier": "^6.3.0",
46+
"eslint-import-resolver-lerna": "^1.1.0",
47+
"eslint-loader": "^3.0.0",
48+
"eslint-plugin-flowtype": "^4.3.0",
49+
"eslint-plugin-import": "^2.18.2",
50+
"eslint-plugin-jest": "^22.17.0",
51+
"eslint-plugin-jsx-a11y": "^6.2.3",
52+
"eslint-plugin-prettier": "^3.1.0",
53+
"eslint-plugin-react": "^7.14.3",
54+
"eslint-plugin-react-hooks": "^1.7.0",
5555
"flow-bin": "^0.78.0",
5656
"flow-copy-source": "^2.0.2",
5757
"husky": "^0.14.3",
@@ -61,7 +61,7 @@
6161
"lerna": "^3.15.0",
6262
"lint-staged": "^7.2.0",
6363
"npm-publish-git": "git://github.com/hedgepigdaniel/npm-publish-git.git",
64-
"prettier": "^1.14.2",
64+
"prettier": "^1.18.2",
6565
"prop-types": "^15.6.2",
6666
"react": "^16.8.0",
6767
"react-dom": "^16.8.0",

packages/boilerplate/package.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,9 @@
2121
"lint": "eslint ."
2222
},
2323
"dependencies": {
24-
"@babel/polyfill": "^7.4.4",
2524
"@respond-framework/react": "^0.1.1-test.3",
2625
"@respond-framework/rudy": "^0.1.1-test.4",
26+
"core-js": "^3.2.1",
2727
"express": "^4.15.2",
2828
"react": "^16.8.0",
2929
"react-dom": "^16.8.0",
@@ -32,6 +32,7 @@
3232
"react-universal-component": "^3.0.3",
3333
"redux": "^4.0.4",
3434
"redux-devtools-extension": "^2.13.5",
35+
"regenerator-runtime": "^0.13.3",
3536
"serve-favicon": "^2.4.5",
3637
"source-map-support": "^0.5.6",
3738
"webpack-flush-chunks": "^2.0.3"

packages/boilerplate/server/serveDev.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
/* eslint-disable import/no-extraneous-dependencies */
22

33
import 'source-map-support/register'
4-
import '@babel/polyfill'
4+
import 'core-js/stable'
5+
import 'regenerator-runtime/runtime'
56
import path from 'path'
67
import express from 'express'
78
import favicon from 'serve-favicon'

packages/boilerplate/server/serveProd.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import 'source-map-support/register'
2-
import '@babel/polyfill'
2+
import 'core-js/stable'
3+
import 'regenerator-runtime/runtime'
34
import { resolve } from 'path'
45
import express from 'express'
56
import favicon from 'serve-favicon'

packages/boilerplate/server/webpack.config.babel.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,8 @@ export default (env) => {
2525
isClient &&
2626
isDev &&
2727
'webpack-hot-middleware/client?path=/__webpack_hmr&timeout=20000&reload=false&quiet=false&noInfo=false',
28-
isClient && '@babel/polyfill',
28+
isClient && 'core-js/stable',
29+
isClient && 'regenerator-runtime/runtime',
2930
res(isServer ? '../src/render.server.js' : '../src/render.browser.js'),
3031
].filter(Boolean),
3132
},

packages/middleware-change-page-title/src/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,10 @@ export default (options) => {
1313
window.document.title = title
1414
},
1515
} = options || {}
16-
const selectTitleState = createSelector('title', keyOrSelector)
16+
const selectTitleState = createSelector(
17+
'title',
18+
keyOrSelector,
19+
)
1720

1821
return (api) => async (req, next) => {
1922
const title = selectTitleState(api.getState())

packages/react/src/link.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
// @flow
2+
/* eslint-disable react/prop-types,react/jsx-props-no-spreading */
23

34
import React from 'react'
45
import { connect } from 'react-redux'

packages/rudy/.codeclimate.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ engines:
66
enabled: true
77
config:
88
languages:
9-
- ? javascript
9+
- javascript:
1010
fixme:
1111
enabled: true
1212
eslint:

packages/rudy/src/core/compose.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,10 @@ export default (
6060
result !== undefined
6161
? result // as below in the standard use-case, this insures last middleware dictates return
6262
: res === req.action
63-
? req.redirect // `transformAction` + `enter` middleware return original action dispatched, but we never want to return that value of the action redirected from
64-
: res !== undefined
65-
? res
66-
: req.redirect) // usually the result returned will be the result of the pipeline redirected to, but we honor explicit different returns (`res`)
63+
? req.redirect // `transformAction` + `enter` middleware return original action dispatched, but we never want to return that value of the action redirected from
64+
: res !== undefined
65+
? res
66+
: req.redirect) // usually the result returned will be the result of the pipeline redirected to, but we honor explicit different returns (`res`)
6767
}
6868

6969
// if a middleware return `false`, the pipeline is terminated and now there is no longer a "pending" route change

packages/rudy/src/core/createRequest.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -246,8 +246,8 @@ export class Request {
246246
const action = isAction(act)
247247
? act
248248
: typeof act === 'string' && (type = this.isActionType(act))
249-
? { type }
250-
: { payload: act }
249+
? { type }
250+
: { payload: act }
251251

252252
action.type =
253253
action.type ||

0 commit comments

Comments
 (0)