@qlover/create-app 0.1.15 → 0.1.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +33 -27
- package/bin/create-app.js +0 -0
- package/configs/_common/package.json.template +10 -0
- package/configs/react-app/eslint.config.js +70 -42
- package/dist/index.cjs +1 -3631
- package/dist/index.js +1 -3625
- package/package.json +7 -7
- package/templates/react-app/.env +1 -0
- package/templates/react-app/config/ErrorIdentifier.ts +27 -0
- package/templates/react-app/config/app.router.json +9 -0
- package/templates/react-app/config/common.ts +12 -0
- package/templates/react-app/config/feapi.mock.json +15 -2
- package/templates/react-app/config/i18n.ts +3 -11
- package/templates/react-app/package.json +7 -4
- package/templates/react-app/pnpm-lock.yaml +176 -25
- package/templates/react-app/public/locales/en/common.json +6 -2
- package/templates/react-app/public/locales/zh/common.json +6 -3
- package/templates/react-app/src/App.tsx +8 -8
- package/templates/react-app/src/base/apis/AiApi.ts +55 -0
- package/templates/react-app/src/base/apis/feApi/FeApi.ts +13 -44
- package/templates/react-app/src/base/apis/feApi/FeApiAdapter.ts +14 -0
- package/templates/react-app/src/base/apis/feApi/FeApiBootstarp.ts +67 -0
- package/templates/react-app/src/base/apis/feApi/FeApiType.ts +2 -35
- package/templates/react-app/src/base/apis/userApi/UserApi.ts +64 -0
- package/templates/react-app/src/base/apis/userApi/UserApiAdapter.ts +14 -0
- package/templates/react-app/src/base/apis/userApi/UserApiBootstarp.ts +75 -0
- package/templates/react-app/src/base/apis/userApi/UserApiType.ts +52 -0
- package/templates/react-app/src/base/cases/RequestLogger.ts +71 -0
- package/templates/react-app/src/base/cases/RequestStatusCatcher.ts +41 -0
- package/templates/react-app/src/base/cases/appError/AppError.ts +13 -0
- package/templates/react-app/{lib/router-loader/RouterLoader.ts → src/base/cases/router-loader/index.ts} +1 -1
- package/templates/react-app/src/base/port/ApiTransactionInterface.ts +7 -0
- package/templates/react-app/src/base/port/InversifyIocInterface.ts +1 -1
- package/templates/react-app/src/base/port/LoginInterface.ts +4 -0
- package/templates/react-app/src/base/port/RequestCatcherInterface.ts +12 -0
- package/templates/react-app/src/{services → base/services}/I18nService.ts +7 -2
- package/templates/react-app/src/{services/processer → base/services}/ProcesserService.ts +10 -11
- package/templates/react-app/src/base/types/Page.ts +1 -13
- package/templates/react-app/src/core/AppConfig.ts +14 -5
- package/templates/react-app/src/core/IOC.ts +77 -37
- package/templates/react-app/src/core/bootstrap.ts +38 -25
- package/templates/react-app/src/core/bootstraps/BootstrapApp.ts +7 -0
- package/templates/react-app/src/core/bootstraps/index.ts +12 -0
- package/templates/react-app/src/core/globals.ts +7 -10
- package/templates/react-app/src/core/registers/RegisterApi.ts +1 -52
- package/templates/react-app/src/core/registers/RegisterCommon.ts +44 -6
- package/templates/react-app/src/core/registers/RegisterControllers.ts +5 -34
- package/templates/react-app/src/core/registers/RegisterGlobals.ts +8 -2
- package/templates/react-app/src/core/registers/index.ts +2 -1
- package/templates/react-app/src/main.tsx +4 -1
- package/templates/react-app/src/pages/auth/Layout.tsx +4 -3
- package/templates/react-app/src/pages/auth/Login.tsx +5 -3
- package/templates/react-app/src/pages/base/ErrorIdentifier.tsx +39 -0
- package/templates/react-app/src/pages/base/Executor.tsx +31 -10
- package/templates/react-app/src/pages/base/Home.tsx +58 -30
- package/templates/react-app/src/pages/base/JSONStorage.tsx +2 -4
- package/templates/react-app/src/pages/base/Request.tsx +318 -73
- package/templates/react-app/src/pages/base/components/BaseHeader.tsx +2 -2
- package/templates/react-app/src/{components → uikit/components}/RouterRenderComponent.tsx +1 -1
- package/templates/react-app/src/{components → uikit/components}/ThemeSwitcher.tsx +6 -6
- package/templates/react-app/src/uikit/contexts/BaseRouteContext.ts +6 -3
- package/templates/react-app/src/uikit/controllers/ExecutorController.ts +52 -22
- package/templates/react-app/src/uikit/controllers/JSONStorageController.ts +7 -3
- package/templates/react-app/src/uikit/controllers/RequestController.ts +65 -11
- package/templates/react-app/src/uikit/controllers/RouterController.ts +8 -7
- package/templates/react-app/src/uikit/controllers/UserController.ts +48 -54
- package/templates/react-app/src/uikit/hooks/useLanguageGuard.ts +1 -2
- package/templates/react-app/src/uikit/providers/ProcessProvider.tsx +4 -4
- package/templates/react-app/src/uikit/styles/css/index.css +1 -1
- package/templates/react-app/src/uikit/styles/css/page.css +1 -1
- package/templates/react-app/tailwind.config.js +2 -2
- package/templates/react-app/tsconfig.json +0 -1
- package/templates/react-app/tsconfig.node.json +1 -2
- package/templates/react-app/vite.config.ts +21 -26
- package/templates/react-app/.env.local +0 -24
- package/templates/react-app/lib/bootstrap/Bootstrap.ts +0 -36
- package/templates/react-app/lib/bootstrap/BootstrapExecutorPlugin.ts +0 -20
- package/templates/react-app/lib/bootstrap/IOCContainerInterface.ts +0 -33
- package/templates/react-app/lib/bootstrap/IOCManagerInterface.ts +0 -12
- package/templates/react-app/lib/bootstrap/index.ts +0 -7
- package/templates/react-app/lib/bootstrap/plugins/InjectEnv.ts +0 -61
- package/templates/react-app/lib/bootstrap/plugins/InjectGlobal.ts +0 -36
- package/templates/react-app/lib/bootstrap/plugins/InjectIOC.ts +0 -24
- package/templates/react-app/lib/env-config/injectPkgConfig.ts +0 -11
- package/templates/react-app/lib/fe-react-controller/FeController.ts +0 -19
- package/templates/react-app/lib/fe-react-controller/index.ts +0 -2
- package/templates/react-app/lib/fe-react-controller/useController.ts +0 -71
- package/templates/react-app/lib/fe-react-theme/ThemeController.ts +0 -40
- package/templates/react-app/lib/fe-react-theme/ThemeStateGetter.ts +0 -53
- package/templates/react-app/lib/fe-react-theme/index.ts +0 -3
- package/templates/react-app/lib/fe-react-theme/type.ts +0 -21
- package/templates/react-app/lib/openAiApi/OpenAIAuthPlugin.ts +0 -29
- package/templates/react-app/lib/openAiApi/OpenAIClient.ts +0 -51
- package/templates/react-app/lib/openAiApi/StreamProcessor.ts +0 -81
- package/templates/react-app/lib/openAiApi/index.ts +0 -3
- package/templates/react-app/lib/request-common-plugin/index.ts +0 -169
- package/templates/react-app/lib/router-loader/Page.ts +0 -68
- package/templates/react-app/lib/tw-root10px/index.css +0 -4
- package/templates/react-app/src/base/apis/feApi/FeApiMockPlugin.ts +0 -44
- package/templates/react-app/src/base/apis/feApi/index.ts +0 -2
- package/templates/react-app/src/base/cases/UserToken.ts +0 -47
- package/templates/react-app/src/base/consts/IOCIdentifier.ts +0 -16
- package/templates/react-app/src/base/port/IOCFunctionInterface.ts +0 -39
- package/templates/react-app/src/base/port/StorageTokenInterface.ts +0 -27
- package/templates/react-app/src/core/AppIOCContainer.ts +0 -30
- package/templates/react-app/src/uikit/utils/RequestLogger.ts +0 -37
- package/templates/react-app/src/uikit/utils/datetime.ts +0 -30
- package/templates/react-app/src/uikit/utils/thread.ts +0 -3
- /package/templates/react-app/lib/{tw-root10px/index.js → tailwind/root10px.js} +0 -0
- /package/templates/react-app/lib/{fe-react-theme/tw-generator.js → tailwind/theme-generator.js} +0 -0
- /package/templates/react-app/src/{components → uikit/components}/Loading.tsx +0 -0
- /package/templates/react-app/src/{components → uikit/components}/LocaleLink.tsx +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,32 +1,45 @@
|
|
|
1
|
+
## 0.1.16
|
|
1
2
|
|
|
3
|
+
### Patch Changes
|
|
2
4
|
|
|
3
|
-
|
|
5
|
+
- ### Bug Fixes
|
|
4
6
|
|
|
7
|
+
- .gitignore no file ([#207](https://github.com/qlover/fe-base/issues/207)) ([e61d468](https://github.com/qlover/fe-base/commit/e61d4683a072048326205272d927e7e67b87ba70))
|
|
8
|
+
- add pnpm install ([#248](https://github.com/qlover/fe-base/issues/248)) ([e1e9f48](https://github.com/qlover/fe-base/commit/e1e9f4841365c51e9b8ea7b01ac6fc70e35eec37))
|
|
9
|
+
- release publish npm ([#327](https://github.com/qlover/fe-base/issues/327)) ([fa26d04](https://github.com/qlover/fe-base/commit/fa26d04eab2fa1ea4baa05c4d3502e5a873d5c8c))
|
|
5
10
|
|
|
6
|
-
### Features
|
|
11
|
+
### Features
|
|
7
12
|
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
* template context ([#241](https://github.com/qlover/fe-base/issues/241)) ([9fb3046](https://github.com/qlover/fe-base/commit/9fb3046e3e67c02e5fe4fea81a9a3ef8422e3013))
|
|
13
|
+
- add inversify ioc ([#270](https://github.com/qlover/fe-base/issues/270)) ([8c7ba06](https://github.com/qlover/fe-base/commit/8c7ba06bc5bef63d85c59a94737afac9be59138f))
|
|
14
|
+
- add script-context ([#213](https://github.com/qlover/fe-base/issues/213)) ([e021441](https://github.com/qlover/fe-base/commit/e021441180d4c4bd89947b155d39224f89699fda))
|
|
15
|
+
- feature yarn to pnpm ([#297](https://github.com/qlover/fe-base/issues/297)) ([c3e13d5](https://github.com/qlover/fe-base/commit/c3e13d509a752267d9be29e7a5ed609d24c309ce))
|
|
16
|
+
- optz create-app deep ([#244](https://github.com/qlover/fe-base/issues/244)) ([c0a89ef](https://github.com/qlover/fe-base/commit/c0a89ef5dc2f3cc216b4fc1968b1b626c58947d5))
|
|
17
|
+
- template context ([#241](https://github.com/qlover/fe-base/issues/241)) ([9fb3046](https://github.com/qlover/fe-base/commit/9fb3046e3e67c02e5fe4fea81a9a3ef8422e3013))
|
|
14
18
|
|
|
19
|
+
## 0.1.15 (2025-04-17)
|
|
20
|
+
|
|
21
|
+
### Features
|
|
22
|
+
|
|
23
|
+
- add inversify ioc ([#270](https://github.com/qlover/fe-base/issues/270)) ([8c7ba06](https://github.com/qlover/fe-base/commit/8c7ba06bc5bef63d85c59a94737afac9be59138f))
|
|
24
|
+
- add script-context ([#213](https://github.com/qlover/fe-base/issues/213)) ([e021441](https://github.com/qlover/fe-base/commit/e021441180d4c4bd89947b155d39224f89699fda))
|
|
25
|
+
- create app v0.1 ([#209](https://github.com/qlover/fe-base/issues/209)) ([b730d76](https://github.com/qlover/fe-base/commit/b730d76512a9e1ce765ec77145abfe179b585178))
|
|
26
|
+
- feature yarn to pnpm ([#297](https://github.com/qlover/fe-base/issues/297)) ([c3e13d5](https://github.com/qlover/fe-base/commit/c3e13d509a752267d9be29e7a5ed609d24c309ce))
|
|
27
|
+
- optz create-app deep ([#244](https://github.com/qlover/fe-base/issues/244)) ([c0a89ef](https://github.com/qlover/fe-base/commit/c0a89ef5dc2f3cc216b4fc1968b1b626c58947d5))
|
|
28
|
+
- template context ([#241](https://github.com/qlover/fe-base/issues/241)) ([9fb3046](https://github.com/qlover/fe-base/commit/9fb3046e3e67c02e5fe4fea81a9a3ef8422e3013))
|
|
15
29
|
|
|
16
30
|
### Bug Fixes
|
|
17
31
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
32
|
+
- .gitignore no file ([#207](https://github.com/qlover/fe-base/issues/207)) ([e61d468](https://github.com/qlover/fe-base/commit/e61d4683a072048326205272d927e7e67b87ba70))
|
|
33
|
+
- add pnpm install ([#248](https://github.com/qlover/fe-base/issues/248)) ([e1e9f48](https://github.com/qlover/fe-base/commit/e1e9f4841365c51e9b8ea7b01ac6fc70e35eec37))
|
|
34
|
+
- release publish npm ([#327](https://github.com/qlover/fe-base/issues/327)) ([fa26d04](https://github.com/qlover/fe-base/commit/fa26d04eab2fa1ea4baa05c4d3502e5a873d5c8c))
|
|
21
35
|
|
|
22
36
|
## 0.1.14 (2025-04-17)
|
|
23
37
|
|
|
24
38
|
## [0.1.12](https://github.com/qlover/fe-base/compare/create-app-v0.1.11...create-app-v0.1.12) (2025-03-18)
|
|
25
39
|
|
|
26
|
-
|
|
27
40
|
### Features
|
|
28
41
|
|
|
29
|
-
|
|
42
|
+
- add inversify ioc ([#270](https://github.com/qlover/fe-base/issues/270)) ([8c7ba06](https://github.com/qlover/fe-base/commit/8c7ba06bc5bef63d85c59a94737afac9be59138f))
|
|
30
43
|
|
|
31
44
|
## [0.1.11](https://github.com/qlover/fe-base/compare/create-app-v0.1.10...create-app-v0.1.11) (2025-03-12)
|
|
32
45
|
|
|
@@ -34,26 +47,23 @@
|
|
|
34
47
|
|
|
35
48
|
## [0.1.9](https://github.com/qlover/fe-base/compare/create-app-v0.1.8...create-app-v0.1.9) (2025-02-20)
|
|
36
49
|
|
|
37
|
-
|
|
38
50
|
### Bug Fixes
|
|
39
51
|
|
|
40
|
-
|
|
52
|
+
- add pnpm install ([#248](https://github.com/qlover/fe-base/issues/248)) ([e1e9f48](https://github.com/qlover/fe-base/commit/e1e9f4841365c51e9b8ea7b01ac6fc70e35eec37))
|
|
41
53
|
|
|
42
54
|
## [0.1.8](https://github.com/qlover/fe-base/compare/create-app-v0.1.7...create-app-v0.1.8) (2025-02-19)
|
|
43
55
|
|
|
44
56
|
## [0.1.7](https://github.com/qlover/fe-base/compare/create-app-v0.1.6...create-app-v0.1.7) (2025-02-19)
|
|
45
57
|
|
|
46
|
-
|
|
47
58
|
### Features
|
|
48
59
|
|
|
49
|
-
|
|
60
|
+
- optz create-app deep ([#244](https://github.com/qlover/fe-base/issues/244)) ([c0a89ef](https://github.com/qlover/fe-base/commit/c0a89ef5dc2f3cc216b4fc1968b1b626c58947d5))
|
|
50
61
|
|
|
51
62
|
## [0.1.6](https://github.com/qlover/fe-base/compare/create-app-v0.1.5...create-app-v0.1.6) (2025-02-14)
|
|
52
63
|
|
|
53
|
-
|
|
54
64
|
### Features
|
|
55
65
|
|
|
56
|
-
|
|
66
|
+
- template context ([#241](https://github.com/qlover/fe-base/issues/241)) ([9fb3046](https://github.com/qlover/fe-base/commit/9fb3046e3e67c02e5fe4fea81a9a3ef8422e3013))
|
|
57
67
|
|
|
58
68
|
## [0.1.5](https://github.com/qlover/fe-base/compare/create-app-v0.1.4...create-app-v0.1.5) (2025-02-13)
|
|
59
69
|
|
|
@@ -63,30 +73,26 @@
|
|
|
63
73
|
|
|
64
74
|
## [0.1.2](https://github.com/qlover/fe-base/compare/create-app-v0.1.1...create-app-v0.1.2) (2025-01-17)
|
|
65
75
|
|
|
66
|
-
|
|
67
76
|
### Features
|
|
68
77
|
|
|
69
|
-
|
|
78
|
+
- add script-context ([#213](https://github.com/qlover/fe-base/issues/213)) ([e021441](https://github.com/qlover/fe-base/commit/e021441180d4c4bd89947b155d39224f89699fda))
|
|
70
79
|
|
|
71
80
|
## [0.1.1](https://github.com/qlover/fe-base/compare/create-app-v0.0.4...create-app-v0.1.1) (2025-01-15)
|
|
72
81
|
|
|
73
|
-
|
|
74
82
|
### Features
|
|
75
83
|
|
|
76
|
-
|
|
84
|
+
- create app v0.1 ([#209](https://github.com/qlover/fe-base/issues/209)) ([b730d76](https://github.com/qlover/fe-base/commit/b730d76512a9e1ce765ec77145abfe179b585178))
|
|
77
85
|
|
|
78
86
|
## [0.0.4](https://github.com/qlover/fe-base/compare/create-app-v0.0.3...create-app-v0.0.4) (2025-01-15)
|
|
79
87
|
|
|
80
|
-
|
|
81
88
|
### Bug Fixes
|
|
82
89
|
|
|
83
|
-
|
|
90
|
+
- .gitignore no file ([#207](https://github.com/qlover/fe-base/issues/207)) ([e61d468](https://github.com/qlover/fe-base/commit/e61d4683a072048326205272d927e7e67b87ba70))
|
|
84
91
|
|
|
85
92
|
## 0.0.1 (2025-01-14)
|
|
86
93
|
|
|
87
94
|
## 0.0.2 (2025-01-14)
|
|
88
95
|
|
|
89
|
-
|
|
90
96
|
### Features
|
|
91
97
|
|
|
92
|
-
|
|
98
|
+
- create fe app ([#200](https://github.com/qlover/fe-base/issues/200)) ([8d3668f](https://github.com/qlover/fe-base/commit/8d3668f0e69a579994a72fc7b36b5ba7d5633c70))
|
package/bin/create-app.js
CHANGED
|
File without changes
|
|
@@ -50,14 +50,24 @@
|
|
|
50
50
|
"release:[TPL:projectName]": "release-it"
|
|
51
51
|
},
|
|
52
52
|
"devDependencies": {
|
|
53
|
+
"@eslint/js": "^9.11.1",
|
|
53
54
|
"@qlover/env-loader": "latest",
|
|
54
55
|
"@qlover/fe-standard": "latest",
|
|
55
56
|
"@qlover/fe-scripts": "latest",
|
|
56
57
|
"@qlover/scripts-context": "latest",
|
|
57
58
|
"@commitlint/cli": "^19.7.1",
|
|
58
59
|
"@commitlint/config-conventional": "^19.7.1",
|
|
60
|
+
"eslint": "^9.15.0",
|
|
61
|
+
"eslint-plugin-prettier": "^5.2.3",
|
|
62
|
+
"eslint-plugin-react": "^7.37.4",
|
|
63
|
+
"eslint-plugin-react-hooks": "^5.0.0",
|
|
64
|
+
"eslint-plugin-react-refresh": "^0.4.14",
|
|
65
|
+
"eslint-plugin-vitest": "^0.5.4",
|
|
66
|
+
"globals": "^15.12.0",
|
|
59
67
|
"husky": "^9.1.7",
|
|
60
68
|
"lint-staged": "^15.0.0",
|
|
69
|
+
"postcss": "^8.4.49",
|
|
70
|
+
"prettier": "^3.5.3",
|
|
61
71
|
},
|
|
62
72
|
"dependencies": {
|
|
63
73
|
"@qlover/fe-utils": "latest"
|
|
@@ -1,66 +1,94 @@
|
|
|
1
1
|
import js from '@eslint/js';
|
|
2
2
|
import globals from 'globals';
|
|
3
|
-
import
|
|
3
|
+
import vitest from 'eslint-plugin-vitest';
|
|
4
|
+
import * as eslintChain from '@qlover/fe-standard/eslint/index.js';
|
|
5
|
+
import * as feDev from '@qlover/eslint-plugin-fe-dev';
|
|
4
6
|
import reactHooks from 'eslint-plugin-react-hooks';
|
|
5
7
|
import reactRefresh from 'eslint-plugin-react-refresh';
|
|
6
8
|
import tseslint from 'typescript-eslint';
|
|
7
|
-
import tsparser from '@typescript-eslint/parser';
|
|
8
|
-
import * as feDev from '@qlover/eslint-plugin-fe-dev';
|
|
9
9
|
import prettier from 'eslint-plugin-prettier';
|
|
10
10
|
import prettierConfig from './.prettierrc.js';
|
|
11
11
|
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
12
|
+
const { createCommon, chainEnv } = eslintChain;
|
|
13
|
+
const allGlobals = {
|
|
14
|
+
...globals.browser,
|
|
15
|
+
...globals.vitest,
|
|
16
|
+
...vitest.environments.env.globals
|
|
17
|
+
};
|
|
18
|
+
|
|
19
|
+
function createVitestConfig() {
|
|
20
|
+
const config = chainEnv({
|
|
21
|
+
allGlobals,
|
|
22
|
+
files: [
|
|
23
|
+
'packages/**/__tests__/**/*.test.ts',
|
|
24
|
+
'packages/**/__tests__/**/*.test.tsx'
|
|
25
|
+
],
|
|
26
|
+
plugins: {
|
|
27
|
+
vitest
|
|
28
|
+
},
|
|
17
29
|
languageOptions: {
|
|
18
|
-
parser: tsparser,
|
|
19
|
-
ecmaVersion: 2020,
|
|
20
30
|
globals: {
|
|
21
31
|
...globals.browser,
|
|
22
|
-
...globals.node
|
|
23
|
-
|
|
24
|
-
parserOptions: {
|
|
25
|
-
ecmaVersion: 'latest',
|
|
26
|
-
ecmaFeatures: { jsx: true },
|
|
27
|
-
sourceType: 'module',
|
|
28
|
-
project: './tsconfig.json'
|
|
32
|
+
...globals.node,
|
|
33
|
+
...vitest.environments.env.globals
|
|
29
34
|
}
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
return config;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const commonConfig = createCommon();
|
|
41
|
+
|
|
42
|
+
/**
|
|
43
|
+
* @type {import('eslint').Linter.Config[]}
|
|
44
|
+
*/
|
|
45
|
+
export default tseslint.config([
|
|
46
|
+
{
|
|
47
|
+
ignores: ['**/dist/**', '**/build/**', '**/node_modules/**']
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
{
|
|
51
|
+
files: ['**/*.{js,jsx}'],
|
|
52
|
+
extends: [js.configs.recommended, commonConfig],
|
|
53
|
+
plugins: {
|
|
54
|
+
prettier: prettier
|
|
55
|
+
},
|
|
56
|
+
rules: {
|
|
57
|
+
...js.configs.recommended.rules,
|
|
58
|
+
'prettier/prettier': ['error', prettierConfig],
|
|
59
|
+
'spaced-comment': 'error'
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
{
|
|
64
|
+
files: ['**/*.{ts,tsx}'],
|
|
65
|
+
extends: [...tseslint.configs.recommended],
|
|
66
|
+
|
|
67
|
+
languageOptions: {
|
|
68
|
+
ecmaVersion: 2020,
|
|
69
|
+
globals: globals.browser
|
|
30
70
|
},
|
|
31
|
-
settings: { react: { version: '18.3' } },
|
|
32
71
|
plugins: {
|
|
33
|
-
react,
|
|
34
72
|
'react-hooks': reactHooks,
|
|
35
73
|
'react-refresh': reactRefresh,
|
|
36
|
-
prettier,
|
|
37
|
-
'@typescript-eslint': tseslint,
|
|
38
74
|
'fe-dev': feDev
|
|
39
75
|
},
|
|
40
76
|
rules: {
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
77
|
+
'fe-dev/ts-class-method-return': 'error',
|
|
78
|
+
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
79
|
+
'@typescript-eslint/no-empty-object-type': 'off',
|
|
80
|
+
'@typescript-eslint/no-unused-vars': [
|
|
81
|
+
'error',
|
|
82
|
+
{ argsIgnorePattern: '^_' }
|
|
83
|
+
],
|
|
84
|
+
'@typescript-eslint/ban-ts-comment': 'off',
|
|
44
85
|
...reactHooks.configs.recommended.rules,
|
|
45
|
-
...tseslint.configs.recommended.rules,
|
|
46
|
-
'react/jsx-no-target-blank': 'off',
|
|
47
|
-
'react/prefer-stateless-function': 'error',
|
|
48
86
|
'react-refresh/only-export-components': [
|
|
49
87
|
'warn',
|
|
50
88
|
{ allowConstantExport: true }
|
|
51
|
-
]
|
|
52
|
-
'@typescript-eslint/no-explicit-any': 'error',
|
|
53
|
-
'prettier/prettier': ['error', prettierConfig],
|
|
54
|
-
'@typescript-eslint/ban-ts-comment': [
|
|
55
|
-
'off',
|
|
56
|
-
{
|
|
57
|
-
'ts-expect-error': {
|
|
58
|
-
descriptionFormat: '^.*$'
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
],
|
|
62
|
-
'react-hooks/exhaustive-deps': 'off',
|
|
63
|
-
'fe-dev/ts-class-method-return': 'error'
|
|
89
|
+
]
|
|
64
90
|
}
|
|
65
|
-
}
|
|
66
|
-
|
|
91
|
+
},
|
|
92
|
+
|
|
93
|
+
createVitestConfig()
|
|
94
|
+
]);
|