Skip to content

Commit 5f620a7

Browse files
authored
Merge pull request #148 from xsnippet/upgrade-babel
Upgrade babel and eslint packages
2 parents d95f235 + 23b97ea commit 5f620a7

File tree

12 files changed

+21138
-17223
lines changed

12 files changed

+21138
-17223
lines changed

.babelrc

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
{
2-
"presets": ["react", "env"],
2+
"presets": [
3+
"@babel/preset-react",
4+
"@babel/preset-env"
5+
],
36
"plugins": [
4-
"syntax-dynamic-import",
5-
"transform-class-properties",
6-
"transform-object-rest-spread"
7+
"@babel/plugin-syntax-dynamic-import",
8+
"@babel/plugin-proposal-class-properties",
9+
"@babel/plugin-proposal-object-rest-spread"
710
]
811
}

.eslintrc.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111
"asyncArrow": "always",
1212
"named": "never"
1313
}],
14-
"jsx-quotes": ["error", "prefer-double"]
14+
"jsx-quotes": ["error", "prefer-double"],
15+
"react/jsx-fragments": "off"
1516
},
16-
"parser": "babel-eslint",
17+
"parser": "@babel/eslint-parser",
1718
"parserOptions": {
1819
"allowImportExportEverywhere": true
1920
}

package-lock.json

Lines changed: 20998 additions & 17088 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 17 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -45,26 +45,27 @@
4545
"redux-thunk": "^2.2.0"
4646
},
4747
"devDependencies": {
48-
"babel-core": "^6.26.3",
49-
"babel-eslint": "^8.2.3",
50-
"babel-loader": "^7.1.4",
51-
"babel-plugin-syntax-dynamic-import": "^6.18.0",
52-
"babel-plugin-transform-class-properties": "^6.24.1",
53-
"babel-plugin-transform-object-rest-spread": "^6.26.0",
54-
"babel-preset-env": "^1.7.0",
55-
"babel-preset-react": "^6.24.1",
48+
"@babel/core": "^7.0.0",
49+
"@babel/eslint-parser": "^7.12.1",
50+
"@babel/plugin-proposal-class-properties": "^7.0.0",
51+
"@babel/plugin-proposal-object-rest-spread": "^7.0.0",
52+
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
53+
"@babel/preset-env": "^7.0.0",
54+
"@babel/preset-react": "^7.0.0",
55+
"babel-core": "^7.0.0-bridge.0",
56+
"babel-jest": "^23.4.2",
57+
"babel-loader": "^8.0.0",
5658
"clean-webpack-plugin": "^0.1.17",
5759
"css-loader": "^0.28.7",
5860
"enzyme": "^3.3.0",
5961
"enzyme-adapter-react-16": "^1.1.1",
60-
"eslint": "^4.19.1",
61-
"eslint-config-standard": "^11.0.0",
62-
"eslint-config-standard-jsx": "^5.0.0",
63-
"eslint-plugin-import": "^2.12.0",
64-
"eslint-plugin-node": "^6.0.1",
65-
"eslint-plugin-promise": "^3.7.0",
66-
"eslint-plugin-react": "^7.8.2",
67-
"eslint-plugin-standard": "^3.1.0",
62+
"eslint": "^7.17.0",
63+
"eslint-config-standard": "^16.0.2",
64+
"eslint-config-standard-jsx": "^10.0.0",
65+
"eslint-plugin-import": "^2.22.1",
66+
"eslint-plugin-node": "^11.1.0",
67+
"eslint-plugin-promise": "^4.2.1",
68+
"eslint-plugin-react": "^7.22.0",
6869
"fetch-mock": "^6.0.0-beta.2",
6970
"file-loader": "^1.1.5",
7071
"glob": "^7.1.2",

src/actions/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export const postSnippet = (snippet, onSuccess, onError = () => {}) => dispatch
5757
fetch(getApiUri('snippets'), {
5858
method: 'POST',
5959
headers: {
60-
'Accept': 'application/json',
60+
Accept: 'application/json',
6161
'Content-Type': 'application/json',
6262
},
6363
body: JSON.stringify(snippet),

src/components/ListBox.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { useState, useEffect } from 'react'
22
import { Scrollbars } from 'react-custom-scrollbars'
33

44
const ListBox = (props) => {
5-
const [ selected, setSelected ] = useState(null)
5+
const [selected, setSelected] = useState(null)
66
const { items, className } = props
77

88
useEffect(() => {

src/components/Snippet.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { existingSnippetOptions } from '../entries/aceEditorOptions'
2020
import '../styles/Snippet.styl'
2121

2222
const Snippet = ({ snippet, fetchSnippet, match }) => {
23-
const [ isShowEmbed, setIsShowEmbed ] = useState(false)
23+
const [isShowEmbed, setIsShowEmbed] = useState(false)
2424
const embeddedRef = useRef()
2525

2626
useEffect(() => {

src/components/common/Title.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React from 'react'
33
import '../../styles/common/Title.styl'
44

55
const Title = ({ title, additionalClass }) => (
6-
<div className={`title ${additionalClass}`}>{ title }</div>
6+
<div className={`title ${additionalClass}`}>{title}</div>
77
)
88

99
export default Title

src/entries/snippetValidation.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ const reasons = details => {
2727

2828
errors.push(messages.has(reason)
2929
? messages.get(reason)
30-
: messages.get('default')
30+
: messages.get('default'),
3131
)
3232
})
3333

src/hoc/withSearch.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import React, { Fragment, useState, useCallback } from 'react'
33
import { regExpEscape } from '../misc/reqExp'
44

55
const withSearch = BaseComponent => (props) => {
6-
const [ searchQuery, setSearchQuery ] = useState(null)
6+
const [searchQuery, setSearchQuery] = useState(null)
77
const { items, onClick, className } = props
88

99
const onSearch = useCallback(e => {

0 commit comments

Comments
 (0)