From 3f5dd4bd52b28637f90f8ddf1a5f1cdb105772a8 Mon Sep 17 00:00:00 2001 From: lqqyt2423 <974923609@qq.com> Date: Thu, 29 Apr 2021 11:47:28 +0800 Subject: [PATCH] js to ts --- addon/web/client/.eslintignore | 1 + addon/web/client/.eslintrc.yml | 33 + addon/web/client/README.md | 24 - addon/web/client/build/asset-manifest.json | 30 +- addon/web/client/build/index.html | 2 +- ...a0e0.chunk.css => main.451c1dcc.chunk.css} | 2 +- .../static/css/main.451c1dcc.chunk.css.map | 1 + .../static/css/main.cb45a0e0.chunk.css.map | 1 - .../build/static/js/2.68265363.chunk.js | 3 - .../build/static/js/2.68265363.chunk.js.map | 1 - .../build/static/js/2.88d332b9.chunk.js | 3 + ...SE.txt => 2.88d332b9.chunk.js.LICENSE.txt} | 10 +- .../build/static/js/2.88d332b9.chunk.js.map | 1 + .../build/static/js/3.a88e738d.chunk.js | 2 + .../build/static/js/3.a88e738d.chunk.js.map | 1 + .../build/static/js/3.f3a1fc42.chunk.js | 2 - .../build/static/js/3.f3a1fc42.chunk.js.map | 1 - .../build/static/js/main.5904c112.chunk.js | 2 + .../static/js/main.5904c112.chunk.js.map | 1 + .../build/static/js/main.6b681f56.chunk.js | 2 - .../static/js/main.6b681f56.chunk.js.map | 1 - ...n.48e80cd2.js => runtime-main.bcda7d85.js} | 4 +- ...d2.js.map => runtime-main.bcda7d85.js.map} | 2 +- addon/web/client/package-lock.json | 36070 ++++++++++++++++ addon/web/client/package.json | 21 +- addon/web/client/src/App.css | 62 +- .../client/src/{App.test.js => App.test.tsx} | 1 + addon/web/client/src/{App.js => App.tsx} | 154 +- .../{BreakPoint.js => BreakPoint.tsx} | 32 +- .../components/{EditFlow.js => EditFlow.tsx} | 52 +- addon/web/client/src/{flow.js => flow.ts} | 23 +- addon/web/client/src/{index.js => index.tsx} | 0 .../web/client/src/{message.js => message.ts} | 101 +- addon/web/client/src/react-app-env.d.ts | 1 + ...{reportWebVitals.js => reportWebVitals.ts} | 4 +- .../src/{setupTests.js => setupTests.ts} | 0 addon/web/client/src/{utils.js => utils.ts} | 8 +- addon/web/client/tsconfig.json | 26 + addon/web/client/yarn.lock | 3815 +- 39 files changed, 38416 insertions(+), 2084 deletions(-) create mode 100644 addon/web/client/.eslintignore create mode 100644 addon/web/client/.eslintrc.yml rename addon/web/client/build/static/css/{main.cb45a0e0.chunk.css => main.451c1dcc.chunk.css} (94%) create mode 100644 addon/web/client/build/static/css/main.451c1dcc.chunk.css.map delete mode 100644 addon/web/client/build/static/css/main.cb45a0e0.chunk.css.map delete mode 100644 addon/web/client/build/static/js/2.68265363.chunk.js delete mode 100644 addon/web/client/build/static/js/2.68265363.chunk.js.map create mode 100644 addon/web/client/build/static/js/2.88d332b9.chunk.js rename addon/web/client/build/static/js/{2.68265363.chunk.js.LICENSE.txt => 2.88d332b9.chunk.js.LICENSE.txt} (87%) create mode 100644 addon/web/client/build/static/js/2.88d332b9.chunk.js.map create mode 100644 addon/web/client/build/static/js/3.a88e738d.chunk.js create mode 100644 addon/web/client/build/static/js/3.a88e738d.chunk.js.map delete mode 100644 addon/web/client/build/static/js/3.f3a1fc42.chunk.js delete mode 100644 addon/web/client/build/static/js/3.f3a1fc42.chunk.js.map create mode 100644 addon/web/client/build/static/js/main.5904c112.chunk.js create mode 100644 addon/web/client/build/static/js/main.5904c112.chunk.js.map delete mode 100644 addon/web/client/build/static/js/main.6b681f56.chunk.js delete mode 100644 addon/web/client/build/static/js/main.6b681f56.chunk.js.map rename addon/web/client/build/static/js/{runtime-main.48e80cd2.js => runtime-main.bcda7d85.js} (75%) rename addon/web/client/build/static/js/{runtime-main.48e80cd2.js.map => runtime-main.bcda7d85.js.map} (94%) create mode 100644 addon/web/client/package-lock.json rename addon/web/client/src/{App.test.js => App.test.tsx} (90%) rename addon/web/client/src/{App.js => App.tsx} (64%) rename addon/web/client/src/components/{BreakPoint.js => BreakPoint.tsx} (83%) rename addon/web/client/src/components/{EditFlow.js => EditFlow.tsx} (80%) rename addon/web/client/src/{flow.js => flow.ts} (68%) rename addon/web/client/src/{index.js => index.tsx} (100%) rename addon/web/client/src/{message.js => message.ts} (50%) create mode 100644 addon/web/client/src/react-app-env.d.ts rename addon/web/client/src/{reportWebVitals.js => reportWebVitals.ts} (75%) rename addon/web/client/src/{setupTests.js => setupTests.ts} (100%) rename addon/web/client/src/{utils.js => utils.ts} (80%) create mode 100644 addon/web/client/tsconfig.json diff --git a/addon/web/client/.eslintignore b/addon/web/client/.eslintignore new file mode 100644 index 0000000..378eac2 --- /dev/null +++ b/addon/web/client/.eslintignore @@ -0,0 +1 @@ +build diff --git a/addon/web/client/.eslintrc.yml b/addon/web/client/.eslintrc.yml new file mode 100644 index 0000000..a24e5e2 --- /dev/null +++ b/addon/web/client/.eslintrc.yml @@ -0,0 +1,33 @@ +env: + browser: true + es2021: true +extends: + - 'eslint:recommended' + - 'plugin:react/recommended' + - 'plugin:@typescript-eslint/recommended' +parser: '@typescript-eslint/parser' +parserOptions: + ecmaFeatures: + jsx: true + ecmaVersion: 12 + sourceType: module +plugins: + - react + - '@typescript-eslint' +rules: + indent: + - error + - 2 + linebreak-style: + - error + - unix + quotes: + - error + - single + semi: + - error + - never + '@typescript-eslint/explicit-module-boundary-types': + - 0 + '@typescript-eslint/no-explicit-any': + - 0 diff --git a/addon/web/client/README.md b/addon/web/client/README.md index 02aac3f..b58e0af 100644 --- a/addon/web/client/README.md +++ b/addon/web/client/README.md @@ -44,27 +44,3 @@ You don’t have to ever use `eject`. The curated feature set is suitable for sm You can learn more in the [Create React App documentation](https://facebook.github.io/create-react-app/docs/getting-started). To learn React, check out the [React documentation](https://reactjs.org/). - -### Code Splitting - -This section has moved here: [https://facebook.github.io/create-react-app/docs/code-splitting](https://facebook.github.io/create-react-app/docs/code-splitting) - -### Analyzing the Bundle Size - -This section has moved here: [https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size](https://facebook.github.io/create-react-app/docs/analyzing-the-bundle-size) - -### Making a Progressive Web App - -This section has moved here: [https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app](https://facebook.github.io/create-react-app/docs/making-a-progressive-web-app) - -### Advanced Configuration - -This section has moved here: [https://facebook.github.io/create-react-app/docs/advanced-configuration](https://facebook.github.io/create-react-app/docs/advanced-configuration) - -### Deployment - -This section has moved here: [https://facebook.github.io/create-react-app/docs/deployment](https://facebook.github.io/create-react-app/docs/deployment) - -### `yarn build` fails to minify - -This section has moved here: [https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify](https://facebook.github.io/create-react-app/docs/troubleshooting#npm-run-build-fails-to-minify) diff --git a/addon/web/client/build/asset-manifest.json b/addon/web/client/build/asset-manifest.json index 8fdc21b..a5dbde1 100644 --- a/addon/web/client/build/asset-manifest.json +++ b/addon/web/client/build/asset-manifest.json @@ -1,25 +1,25 @@ { "files": { - "main.css": "/static/css/main.cb45a0e0.chunk.css", - "main.js": "/static/js/main.6b681f56.chunk.js", - "main.js.map": "/static/js/main.6b681f56.chunk.js.map", - "runtime-main.js": "/static/js/runtime-main.48e80cd2.js", - "runtime-main.js.map": "/static/js/runtime-main.48e80cd2.js.map", + "main.css": "/static/css/main.451c1dcc.chunk.css", + "main.js": "/static/js/main.5904c112.chunk.js", + "main.js.map": "/static/js/main.5904c112.chunk.js.map", + "runtime-main.js": "/static/js/runtime-main.bcda7d85.js", + "runtime-main.js.map": "/static/js/runtime-main.bcda7d85.js.map", "static/css/2.150d169a.chunk.css": "/static/css/2.150d169a.chunk.css", - "static/js/2.68265363.chunk.js": "/static/js/2.68265363.chunk.js", - "static/js/2.68265363.chunk.js.map": "/static/js/2.68265363.chunk.js.map", - "static/js/3.f3a1fc42.chunk.js": "/static/js/3.f3a1fc42.chunk.js", - "static/js/3.f3a1fc42.chunk.js.map": "/static/js/3.f3a1fc42.chunk.js.map", + "static/js/2.88d332b9.chunk.js": "/static/js/2.88d332b9.chunk.js", + "static/js/2.88d332b9.chunk.js.map": "/static/js/2.88d332b9.chunk.js.map", + "static/js/3.a88e738d.chunk.js": "/static/js/3.a88e738d.chunk.js", + "static/js/3.a88e738d.chunk.js.map": "/static/js/3.a88e738d.chunk.js.map", "index.html": "/index.html", "static/css/2.150d169a.chunk.css.map": "/static/css/2.150d169a.chunk.css.map", - "static/css/main.cb45a0e0.chunk.css.map": "/static/css/main.cb45a0e0.chunk.css.map", - "static/js/2.68265363.chunk.js.LICENSE.txt": "/static/js/2.68265363.chunk.js.LICENSE.txt" + "static/css/main.451c1dcc.chunk.css.map": "/static/css/main.451c1dcc.chunk.css.map", + "static/js/2.88d332b9.chunk.js.LICENSE.txt": "/static/js/2.88d332b9.chunk.js.LICENSE.txt" }, "entrypoints": [ - "static/js/runtime-main.48e80cd2.js", + "static/js/runtime-main.bcda7d85.js", "static/css/2.150d169a.chunk.css", - "static/js/2.68265363.chunk.js", - "static/css/main.cb45a0e0.chunk.css", - "static/js/main.6b681f56.chunk.js" + "static/js/2.88d332b9.chunk.js", + "static/css/main.451c1dcc.chunk.css", + "static/js/main.5904c112.chunk.js" ] } \ No newline at end of file diff --git a/addon/web/client/build/index.html b/addon/web/client/build/index.html index 8eaffc8..5998f06 100644 --- a/addon/web/client/build/index.html +++ b/addon/web/client/build/index.html @@ -1 +1 @@ -