Upgrade Web UI to Create-React-App 4 and React 17 (#1105)

* Upgrade to CRA 4.0.3

* Try to fix tests. No lucky

* Fix new ESLint errors

* Fix JS tests and remove unwanted dependency. (#1106)

* Fix tests

* Fix lint

* Remove React v16 workaround (fixed in v17)

* Force eslint to break on warnings

* Lint now needs to be called explicitly in the pipeline

Co-authored-by: Yash Jipkate <34203227+YashJipkate@users.noreply.github.com>
This commit is contained in:
Deluan Quintão
2021-05-25 09:58:06 -04:00
committed by GitHub
parent d9f268266c
commit 5631493cc4
15 changed files with 6337 additions and 6515 deletions
+27 -13
View File
@@ -17,24 +17,25 @@
"lodash.pick": "^4.4.0",
"lodash.throttle": "^4.1.1",
"prop-types": "^15.7.2",
"ra-data-json-server": "^3.15.2",
"ra-i18n-polyglot": "^3.15.2",
"react": "^16.14.0",
"react-admin": "^3.15.2",
"react-dom": "^16.14.0",
"ra-data-json-server": "^3.15.1",
"ra-i18n-polyglot": "^3.15.1",
"react": "^17.0.2",
"react-admin": "^3.15.1",
"react-dom": "^17.0.2",
"react-drag-listview": "^0.1.8",
"react-ga": "^3.3.0",
"react-hotkeys": "^2.0.0",
"react-icons": "^4.2.0",
"react-image-lightbox": "^5.1.1",
"react-jinke-music-player": "^4.24.1",
"react-jinke-music-player": "^4.24.0",
"react-measure": "^2.5.2",
"react-redux": "^7.2.4",
"react-router-dom": "^5.2.0",
"react-scripts": "^3.4.3",
"react-scripts": "^4.0.3",
"redux": "^4.1.0",
"redux-saga": "^1.1.3",
"uuid": "^8.3.2"
"uuid": "^8.3.2",
"web-vitals": "^0.2.4"
},
"devDependencies": {
"@testing-library/jest-dom": "^5.12.0",
@@ -42,15 +43,14 @@
"@testing-library/react-hooks": "^5.1.2",
"@testing-library/user-event": "^13.1.8",
"css-mediaquery": "^0.1.2",
"jest-environment-jsdom-sixteen": "^2.0.0",
"prettier": "2.3.0",
"ra-test": "^3.15.2"
"ra-test": "^3.15.1"
},
"scripts": {
"start": "react-scripts start",
"build": "react-scripts build",
"test": "react-scripts test --env=jest-environment-jsdom-sixteen",
"lint": "eslint -c node_modules/eslint-config-react-app/index.js src/**/*.js",
"test": "react-scripts test",
"lint": "eslint --max-warnings 0 src/**/*.js",
"eject": "react-scripts eject",
"prettier": "prettier --write src/*.js src/**/*.js",
"check-formatting": "prettier -c src/*.js src/**/*.js"
@@ -58,7 +58,21 @@
"homepage": ".",
"proxy": "http://localhost:4633/",
"eslintConfig": {
"extends": "react-app"
"extends": [
"react-app",
"react-app/jest"
],
"overrides": [
{
"files": [
"src/**/index.js",
"src/themes/*.js"
],
"rules": {
"import/no-anonymous-default-export": "off"
}
}
]
},
"browserslist": {
"production": [