Skip to content

Commit 109b625

Browse files
authored
Merge pull request #307 from code-dot-org/switch-to-function-components
Switch to React functional components
2 parents 06769b8 + 234606d commit 109b625

32 files changed

Lines changed: 3261 additions & 3208 deletions

‎.eslintrc.js‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -6,12 +6,14 @@ module.exports = {
66
"globals": {
77
},
88
"plugins": [
9-
"jsx-a11y"
9+
"jsx-a11y",
10+
"react-hooks"
1011
],
1112
"extends": [
1213
'plugin:react/recommended',
1314
"eslint:recommended",
14-
"plugin:jsx-a11y/recommended"
15+
"plugin:jsx-a11y/recommended",
16+
"plugin:react-hooks/recommended"
1517
],
1618
"env": {
1719
"browser": true,
@@ -23,14 +25,11 @@ module.exports = {
2325
"version": "detect"
2426
}
2527
},
26-
"parser": "babel-eslint",
28+
"parser": "@babel/eslint-parser",
2729
"parserOptions": {
2830
"sourceType": "module",
2931
"ecmaFeatures": {
30-
"jsx": true,
31-
"modules": true,
32-
"ecmaVersion": 6,
33-
"experimentalObjectRestSpread": true
32+
"jsx": true
3433
}
3534
},
3635
"rules": {
@@ -58,6 +57,7 @@ module.exports = {
5857
"no-useless-escape": "off",
5958
"no-with": "error",
6059
"object-curly-spacing": "off",
60+
"react/react-in-jsx-scope": "off",
6161
"react/button-has-type": "error",
6262
"react/display-name": "off",
6363
"react/jsx-closing-bracket-location": "error", // autofixable

‎babel.config.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"presets": [
33
["@babel/preset-env", {"loose": true}],
4-
"@babel/preset-react"
4+
["@babel/preset-react", {"runtime": "automatic"}]
55
]
66
}

‎package.json‎

Lines changed: 16 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -32,32 +32,33 @@
3232
},
3333
"devDependencies": {
3434
"@babel/core": "^7.29.0",
35+
"@babel/eslint-parser": "^7.28.6",
3536
"@babel/preset-env": "^7.29.2",
3637
"@babel/preset-react": "^7.28.5",
37-
"babel-eslint": "^9.0.0",
38-
"babel-jest": "29",
38+
"babel-jest": "^29.7.0",
3939
"babel-loader": "^10.1.1",
40-
"copy-webpack-plugin": "11",
40+
"copy-webpack-plugin": "^11.0.0",
4141
"core-js": "^3",
4242
"css-loader": "^7.1.4",
43-
"eslint": "6.1.0",
44-
"eslint-plugin-jsx-a11y": "^6.4.1",
45-
"eslint-plugin-react": "7.14.3",
43+
"eslint": "^8.57.1",
44+
"eslint-plugin-jsx-a11y": "^6.10.2",
45+
"eslint-plugin-react": "^7.37.5",
46+
"eslint-plugin-react-hooks": "^7.0.1",
4647
"identity-obj-proxy": "^3.0.0",
47-
"jest": "29",
48-
"messageformat": "2.3.0",
48+
"jest": "^29.7.0",
49+
"messageformat": "^2.3.0",
4950
"ml-knn": "^3.0.0",
50-
"query-string": "4.1.0",
51-
"react": "~15.4.0",
52-
"react-dom": "~15.4.0",
51+
"query-string": "^4.1.0",
52+
"react": "^18.3.1",
53+
"react-dom": "^18.3.1",
5354
"react-papaparse": "^3.8.0",
54-
"react-redux": "^5.0.0",
55+
"react-redux": "^9.2.0",
5556
"redux": "^4.0.5",
5657
"style-loader": "^4.0.0",
57-
"webpack": "5",
58+
"webpack": "^5.106.0",
5859
"webpack-bundle-analyzer": "^3.6.0",
59-
"webpack-cli": "5",
60-
"webpack-dev-server": "5"
60+
"webpack-cli": "^5.1.4",
61+
"webpack-dev-server": "^5.2.3"
6162
},
6263
"files": [
6364
"dist/**/!(mainDev.js)",

0 commit comments

Comments
 (0)