Merge pull request #133 from provectus/chore/update_react

[CHORE] Update dependencies. Clean linter warnings
This commit is contained in:
Oleg Shur 2020-12-07 14:46:09 +03:00 committed by GitHub
commit f5ed4a4d1b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 8121 additions and 3510 deletions

View file

@ -27,3 +27,5 @@ yarn-error.log*
# generated sources # generated sources
src/generated-sources src/generated-sources
.eslintcache

View file

@ -0,0 +1 @@
v12.13.1

File diff suppressed because it is too large Load diff

View file

@ -3,24 +3,25 @@
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"dependencies": { "dependencies": {
"@types/react-datepicker": "^3.0.2", "@types/react-datepicker": "^3.1.1",
"@types/uuid": "^8.3.0", "@types/uuid": "^8.3.0",
"bulma": "^0.8.0", "bulma": "^0.8.2",
"bulma-switch": "^2.0.0", "bulma-switch": "^2.0.0",
"classnames": "^2.2.6", "classnames": "^2.2.6",
"date-fns": "^2.14.0", "date-fns": "^2.16.1",
"eslint-import-resolver-node": "^0.3.4",
"eslint-import-resolver-typescript": "^2.3.0", "eslint-import-resolver-typescript": "^2.3.0",
"immer": "^6.0.5", "immer": "^6.0.5",
"lodash": "^4.17.15", "lodash": "^4.17.20",
"pretty-ms": "^6.0.1", "pretty-ms": "^6.0.1",
"react": "^16.12.0", "react": "^17.0.1",
"react-datepicker": "^3.0.0", "react-datepicker": "^3.3.0",
"react-dom": "^16.12.0", "react-dom": "^17.0.1",
"react-hook-form": "^4.5.5", "react-hook-form": "^4.10.2",
"react-json-tree": "^0.13.0", "react-json-tree": "^0.13.0",
"react-multi-select-component": "^2.0.12", "react-multi-select-component": "^2.0.14",
"react-redux": "^7.1.3", "react-redux": "^7.2.2",
"react-router-dom": "^5.1.2", "react-router-dom": "^5.2.0",
"redux": "^4.0.5", "redux": "^4.0.5",
"redux-thunk": "^2.3.0", "redux-thunk": "^2.3.0",
"reselect": "^4.0.0", "reselect": "^4.0.0",
@ -66,22 +67,22 @@
}, },
"devDependencies": { "devDependencies": {
"@testing-library/jest-dom": "^4.2.4", "@testing-library/jest-dom": "^4.2.4",
"@testing-library/react": "^9.3.2", "@testing-library/react": "^9.5.0",
"@testing-library/user-event": "^7.1.2", "@testing-library/user-event": "^7.1.2",
"@types/classnames": "^2.2.9", "@types/classnames": "^2.2.11",
"@types/jest": "^24.0.25", "@types/jest": "^24.9.1",
"@types/lodash": "^4.14.149", "@types/lodash": "^4.14.165",
"@types/node": "^12.12.24", "@types/node": "^12.19.8",
"@types/react": "^16.9.17", "@types/react": "^17.0.0",
"@types/react-dom": "^16.9.0", "@types/react-dom": "^17.0.0",
"@types/react-redux": "^7.1.5", "@types/react-redux": "^7.1.11",
"@types/react-router-dom": "^5.1.3", "@types/react-router-dom": "^5.1.6",
"@types/redux": "^3.6.0", "@types/redux": "^3.6.0",
"@types/redux-thunk": "^2.1.0", "@types/redux-thunk": "^2.1.0",
"@typescript-eslint/eslint-plugin": "^4.8.2", "@typescript-eslint/eslint-plugin": "^4.9.0",
"@typescript-eslint/parser": "^4.8.2", "@typescript-eslint/parser": "^4.9.0",
"dotenv": "^8.2.0", "dotenv": "^8.2.0",
"eslint": "^6.8.0", "eslint": "^7.14.0",
"eslint-config-airbnb": "^18.2.1", "eslint-config-airbnb": "^18.2.1",
"eslint-config-airbnb-typescript": "^12.0.0", "eslint-config-airbnb-typescript": "^12.0.0",
"eslint-config-prettier": "^6.15.0", "eslint-config-prettier": "^6.15.0",
@ -93,11 +94,11 @@
"esprint": "^0.6.0", "esprint": "^0.6.0",
"husky": "^4.3.0", "husky": "^4.3.0",
"json-server": "^0.15.1", "json-server": "^0.15.1",
"lint-staged": "^10.5.1", "lint-staged": "^10.5.2",
"node-sass": "^4.13.1", "node-sass": "^4.14.1",
"prettier": "^2.1.2", "prettier": "^2.2.1",
"react-scripts": "3.4.4", "react-scripts": "4.0.1",
"typescript": "~3.7.4" "typescript": "~4.1.2"
}, },
"proxy": "http://localhost:8080" "proxy": "http://localhost:8080"
} }

View file

@ -37,7 +37,9 @@ const CustomParamSelect: React.FC<Props> = ({
return valid || 'Custom Parameter must be unique'; return valid || 'Custom Parameter must be unique';
}; };
const onChange = (inputName: string) => (event: any) => { const onChange = (inputName: string) => (
event: React.ChangeEvent<HTMLSelectElement>
) => {
triggerValidation(inputName); triggerValidation(inputName);
onNameChange(index, event.target.value); onNameChange(index, event.target.value);
}; };

View file

@ -35,9 +35,10 @@ const CustomParams: React.FC<Props> = ({ isSubmitting, config }) => {
) )
: {}; : {};
const [formCustomParams, setFormCustomParams] = React.useState< const [
TopicFormCustomParams formCustomParams,
>({ setFormCustomParams,
] = React.useState<TopicFormCustomParams>({
byIndex, byIndex,
allIndexes: Object.keys(byIndex), allIndexes: Object.keys(byIndex),
}); });

View file

@ -1,6 +1,6 @@
import React from 'react'; import React from 'react';
type Callback = () => any; type Callback = () => void;
const useInterval = (callback: Callback, delay: number) => { const useInterval = (callback: Callback, delay: number) => {
const savedCallback = React.useRef<Callback>(); const savedCallback = React.useRef<Callback>();

View file

@ -0,0 +1,6 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"jsx": "react-jsxdev"
}
}

View file

@ -17,8 +17,9 @@
"resolveJsonModule": true, "resolveJsonModule": true,
"isolatedModules": true, "isolatedModules": true,
"noEmit": true, "noEmit": true,
"jsx": "react", "jsx": "react-jsx",
"baseUrl": "src" "baseUrl": "src",
"noFallthroughCasesInSwitch": true
}, },
"include": [ "include": [
"src" "src"

3
package-lock.json generated
View file

@ -1,3 +0,0 @@
{
"lockfileVersion": 1
}