Skip to content

Commit 2e5a245

Browse files
authored
BIGTOP-4490: Add required field validation in service configuration (#260)
1 parent 743859b commit 2e5a245

File tree

77 files changed

+5316
-4561
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

77 files changed

+5316
-4561
lines changed

bigtop-manager-ui/.eslintignore

Lines changed: 0 additions & 18 deletions
This file was deleted.

bigtop-manager-ui/.eslintrc.cjs

Lines changed: 0 additions & 79 deletions
This file was deleted.

bigtop-manager-ui/README.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ Bigtop Manager UI is the front-end UI of the Manager platform, which stores code
2121

2222
## Prerequisites
2323

24-
- Node.js:`v18.17.0`
24+
- Node.js:`v20.9.0`
2525

26-
- pnpm: `v8.6.9`
26+
- pnpm: `v10.12.3`
2727

2828
- Vite:`v5.4.19`
2929

30-
- Typescript:`v5.8.3`
30+
- Typescript:`v5.9.2`
3131

3232
- Vue:`v3.4.37`
3333

@@ -57,8 +57,6 @@ Bigtop Manager UI is the front-end UI of the Manager platform, which stores code
5757
│ ├── utils/ # Utility functions
5858
│ ├── App.vue # Root component
5959
│ └── main.ts # Project entry point
60-
├── plugins/ # Vite plugins
61-
├── cli/ # CLI scripts
6260
├── tests/ # Unit and integration tests
6361
├── index.html # HTML template
6462
├── package.json # Project metadata and dependencies

bigtop-manager-ui/README.zh.md

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,13 @@ Bigtop Manager UI 是 Manager 平台的前端 UI,存放有关平台与用户
2121

2222
## 先决条件
2323

24-
- Node.js:`v18.17.0`
24+
- Node.js:`v20.9.0`
2525

26-
- pnpm: `v8.6.9`
26+
- pnpm: `v10.12.3`
2727

2828
- Vite:`v5.4.19`
2929

30-
- Typescript:`v5.8.3`
30+
- Typescript:`v5.9.2`
3131

3232
- Vue:`v3.4.37`
3333

@@ -57,8 +57,6 @@ Bigtop Manager UI 是 Manager 平台的前端 UI,存放有关平台与用户
5757
│ ├── utils/ # 工具函数
5858
│ ├── App.vue # 根组件
5959
│ └── main.ts # 项目入口文件
60-
├── plugins/ # Vite 插件
61-
├── cli/ # 手动执行的命令行脚本
6260
├── tests/ # 单元测试或集成测试用例
6361
├── index.html # HTML 模板文件
6462
├── package.json # 包管理与脚本配置文件

bigtop-manager-ui/cli/generate-img-map.ts

Lines changed: 0 additions & 25 deletions
This file was deleted.
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
/*
2+
* Licensed to the Apache Software Foundation (ASF) under one
3+
* or more contributor license agreements. See the NOTICE file
4+
* distributed with this work for additional information
5+
* regarding copyright ownership. The ASF licenses this file
6+
* to you under the Apache License, Version 2.0 (the
7+
* "License"); you may not use this file except in compliance
8+
* with the License. You may obtain a copy of the License at
9+
*
10+
* https://www.apache.org/licenses/LICENSE-2.0
11+
*
12+
* Unless required by applicable law or agreed to in writing,
13+
* software distributed under the License is distributed on an
14+
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15+
* KIND, either express or implied. See the License for the
16+
* specific language governing permissions and limitations
17+
* under the License.
18+
*/
19+
20+
import { defineConfig, globalIgnores } from 'eslint/config'
21+
import parser from 'vue-eslint-parser'
22+
import path from 'node:path'
23+
import { fileURLToPath } from 'node:url'
24+
import { FlatCompat } from '@eslint/eslintrc'
25+
26+
const __filename = fileURLToPath(import.meta.url)
27+
const __dirname = path.dirname(__filename)
28+
const compat = new FlatCompat({
29+
baseDirectory: __dirname
30+
})
31+
32+
export default defineConfig([
33+
globalIgnores(['**/node_modules', '**/dist', '**/public', '**/*.d.ts']),
34+
{
35+
extends: compat.extends(
36+
'plugin:vue/vue3-recommended',
37+
'plugin:@typescript-eslint/recommended',
38+
'plugin:prettier/recommended',
39+
'prettier'
40+
),
41+
42+
languageOptions: {
43+
parser: parser,
44+
ecmaVersion: 2021,
45+
sourceType: 'module',
46+
47+
parserOptions: {
48+
parser: '@typescript-eslint/parser',
49+
50+
ecmaFeatures: {
51+
jsx: true
52+
}
53+
}
54+
},
55+
56+
rules: {
57+
'@typescript-eslint/ban-ts-ignore': 'off',
58+
'@typescript-eslint/explicit-function-return-type': 'off',
59+
'@typescript-eslint/no-explicit-any': 'off',
60+
'@typescript-eslint/no-var-requires': 'off',
61+
'@typescript-eslint/no-empty-function': 'off',
62+
'@typescript-eslint/no-empty-interface': 'off',
63+
'vue/custom-event-name-casing': 'off',
64+
'no-use-before-define': 'off',
65+
'@typescript-eslint/no-use-before-define': 'off',
66+
'@typescript-eslint/ban-ts-comment': 'off',
67+
'@typescript-eslint/ban-types': 'off',
68+
'@typescript-eslint/no-non-null-assertion': 'off',
69+
'@typescript-eslint/explicit-module-boundary-types': 'off',
70+
71+
'@typescript-eslint/no-unused-vars': [
72+
'error',
73+
{
74+
argsIgnorePattern: '^(unused|ignored).*$',
75+
varsIgnorePattern: '^(unused|ignored).*$'
76+
}
77+
],
78+
79+
'no-unused-vars': 'off',
80+
'@typescript-eslint/no-unused-vars': [
81+
'error',
82+
{
83+
argsIgnorePattern: '^(unused|ignored).*$',
84+
varsIgnorePattern: '^(unused|ignored).*$',
85+
caughtErrorsIgnorePattern: '^(unused|ignored).*$'
86+
}
87+
],
88+
89+
'prettier/prettier': [
90+
'error',
91+
{
92+
endOfLine: 'auto'
93+
}
94+
],
95+
96+
'space-before-function-paren': 'off',
97+
98+
quotes: [
99+
'error',
100+
'single',
101+
{
102+
avoidEscape: true
103+
}
104+
],
105+
106+
'comma-dangle': ['error', 'never'],
107+
'vue/multi-word-component-names': 'off',
108+
'vue/component-definition-name-casing': 'off',
109+
'vue/require-valid-default-prop': 'off',
110+
'vue/no-setup-props-destructure': 'off'
111+
}
112+
}
113+
])

bigtop-manager-ui/package.json

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@
33
"version": "0.0.0",
44
"type": "module",
55
"scripts": {
6-
"dev": "pnpm img-map && vite --open --mode development",
7-
"build": "pnpm img-map && vite build && vue-tsc --noEmit",
6+
"dev": "vite --open --mode development",
7+
"build": "vite build && vue-tsc --noEmit",
88
"preview": "vite preview",
9-
"lint": "eslint src --ext .ts,.tsx,.vue",
9+
"lint": "eslint src --ext .ts,.tsx,.js,.jsx,.vue",
10+
"lint:fix": "eslint src --ext .ts,.tsx,.js,.jsx,.vue --fix",
1011
"prettier": "prettier --write \"src/**/*.{vue,ts,tsx}\"",
1112
"test": "vitest",
12-
"test:run": "vitest run",
13-
"img-map": "tsx cli/generate-img-map.ts"
13+
"test:run": "vitest run"
1414
},
1515
"dependencies": {
1616
"@ant-design/icons-vue": "^6.1.0",
@@ -35,36 +35,33 @@
3535
"vue-router": "^4.2.4"
3636
},
3737
"devDependencies": {
38+
"@eslint/eslintrc": "^3.3.1",
3839
"@testing-library/vue": "^8.1.0",
3940
"@types/lodash-es": "^4.17.12",
40-
"@types/micromatch": "^4.0.9",
4141
"@types/node": "^20.5.3",
42-
"@types/node-forge": "^1.3.11",
43-
"@typescript-eslint/eslint-plugin": "^6.4.1",
44-
"@typescript-eslint/parser": "^6.4.1",
42+
"@typescript-eslint/eslint-plugin": "^8.39.1",
43+
"@typescript-eslint/parser": "^8.39.1",
4544
"@vitejs/plugin-vue": "^4.6.2",
4645
"@vue/test-utils": "^2.4.6",
4746
"autoprefixer": "^10.4.20",
4847
"cssnano": "^7.0.5",
49-
"eslint": "^8.47.0",
48+
"eslint": "^9.33.0",
5049
"eslint-config-prettier": "^9.0.0",
5150
"eslint-plugin-prettier": "^5.0.0",
5251
"eslint-plugin-vue": "^9.17.0",
53-
"fast-glob": "^3.3.3",
5452
"happy-dom": "^18.0.1",
55-
"micromatch": "^4.0.8",
5653
"postcss": "^8.4.41",
5754
"prettier": "^3.0.2",
58-
"sass": "^1.66.1",
59-
"sass-loader": "^13.3.2",
55+
"sass-embedded": "^1.90.0",
6056
"tsx": "^4.20.3",
61-
"typescript": "^5.8.3",
57+
"typescript": "^5.9.2",
6258
"unplugin-auto-import": "^19.3.0",
6359
"unplugin-icons": "^22.1.0",
6460
"unplugin-vue-components": "^28.7.0",
6561
"vite": "^5.4.19",
6662
"vitest": "^3.2.3",
67-
"vue-tsc": "^3.0.3"
63+
"vue-eslint-parser": "^10.2.0",
64+
"vue-tsc": "^3.0.5"
6865
},
6966
"pnpm": {
7067
"overrides": {

0 commit comments

Comments
 (0)