Skip to content

Commit 497a6e1

Browse files
feat: profiling数据源插件 (#29)
1 parent c585ccf commit 497a6e1

File tree

214 files changed

+16294
-11927
lines changed

Some content is hidden

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

214 files changed

+16294
-11927
lines changed

.stylelintrc.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
module.exports = {
2+
extends: ['@blueking/bkui-lint/stylelint.js'],
3+
};

Dockerfile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ARG NODE_IMAGE=node:20.11.1-slim
2-
ARG PNPM_VERSION=8
2+
ARG PNPM_VERSION=9
33
ARG NODE_PLATFORM=linux/amd64
44

55
FROM --platform=${NODE_PLATFORM} ${NODE_IMAGE} as nodejs
@@ -10,15 +10,15 @@ RUN npm i -g pnpm@${PNPM_VERSION}
1010

1111
COPY . .
1212

13-
RUN pnpm i \
13+
RUN pnpm i \
1414
&& pnpm run build \
1515
&& rm -rf build \
1616
&& mkdir -p build/alert \
1717
&& mkdir -p build/event \
1818
&& mkdir -p build/timeseries \
1919
&& mv src/alert/dist/* build/alert \
2020
&& mv src/event/dist/* build/event \
21-
&& mv src/timeseries/dist/* build/timeseries
21+
&& mv src/timeseries/dist/* build/timeseries
2222

2323
RUN tar -czvf frontend.tar.gz build
2424

biome.json

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
{
2+
"$schema": "https://biomejs.dev/schemas/1.8.3/schema.json",
3+
"organizeImports": {
4+
"enabled": false
5+
},
6+
"vcs": {
7+
"enabled": true,
8+
"clientKind": "git"
9+
},
10+
"linter": {
11+
"enabled": true,
12+
"rules": {
13+
"recommended": true,
14+
"suspicious": {
15+
"noExplicitAny": {
16+
"level": "off"
17+
},
18+
"noAssignInExpressions": "warn",
19+
"noArrayIndexKey": "warn"
20+
},
21+
"style": {
22+
"useSelfClosingElements": {
23+
"fix": "safe",
24+
"level": "warn"
25+
},
26+
"noUnusedTemplateLiteral": {
27+
"fix": "safe",
28+
"level": "error"
29+
},
30+
"noNonNullAssertion": "warn"
31+
},
32+
"complexity": {
33+
"noBannedTypes": {
34+
"fix": "safe",
35+
"level": "error"
36+
},
37+
"noForEach": {
38+
"level": "warn"
39+
},
40+
"useArrowFunction": {
41+
"fix": "none",
42+
"level": "warn"
43+
}
44+
},
45+
"a11y": {
46+
"useKeyWithMouseEvents": "off",
47+
"useKeyWithClickEvents": "off",
48+
"noSvgWithoutTitle": "off",
49+
"useValidAnchor": "off"
50+
}
51+
}
52+
},
53+
"formatter": {
54+
"indentStyle": "space",
55+
"indentWidth": 2,
56+
"lineEnding": "lf",
57+
"lineWidth": 120,
58+
"attributePosition": "multiline"
59+
},
60+
"javascript": {
61+
"jsxRuntime": "reactClassic",
62+
"formatter": {
63+
"quoteStyle": "single",
64+
"jsxQuoteStyle": "single",
65+
"quoteProperties": "asNeeded",
66+
"trailingCommas": "es5",
67+
"semicolons": "always",
68+
"arrowParentheses": "asNeeded",
69+
"bracketSpacing": true,
70+
"bracketSameLine": false,
71+
"attributePosition": "multiline"
72+
}
73+
}
74+
}

eslint.config.js

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
2424
* IN THE SOFTWARE.
2525
*/
26+
const ERROR = 2;
2627
module.exports = [
2728
...require('@blueking/bkui-lint/eslint'),
2829
{
@@ -46,4 +47,29 @@ module.exports = [
4647
'src/**/.config',
4748
],
4849
},
50+
{
51+
files: ['src/trace/**/*.ts', 'src/trace/**/*.tsx', 'src/trace/**/*.js'],
52+
ignores: [],
53+
rules: {
54+
'codecc/license': 'off',
55+
},
56+
},
57+
{
58+
files: ['src/**/*.ts', 'src/**/*.tsx'],
59+
rules: {
60+
'@typescript-eslint/consistent-type-imports': [
61+
ERROR,
62+
{
63+
prefer: 'type-imports',
64+
disallowTypeAnnotations: true,
65+
fixStyle: 'inline-type-imports',
66+
},
67+
],
68+
},
69+
},
70+
{
71+
rules: {
72+
'@typescript-eslint/no-unused-expressions': 'off',
73+
},
74+
},
4975
];

package.json

Lines changed: 26 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
"dev:alert": "pnpm --filter alert run dev",
1313
"dev:event": "pnpm --filter event run dev",
1414
"dev:timeseries": "pnpm --filter timeseries run dev",
15+
"dev:profiling": "pnpm --filter profiling run dev",
16+
"dev:trace": "pnpm --filter trace run dev",
1517
"dev": "run-p dev:*",
1618
"build": "run-p build:*"
1719
},
@@ -20,36 +22,37 @@
2022
"license": "ISC",
2123
"packageManager": "[email protected]",
2224
"devDependencies": {
23-
"@babel/core": "^7.24.5",
24-
"@blueking/bkui-lint": "^0.0.3",
25-
"@grafana/tsconfig": "1.3.0-rc1",
26-
"@swc/core": "^1.4.17",
27-
"@swc/helpers": "^0.5.11",
28-
"@swc/jest": "^0.2.36",
29-
"@testing-library/jest-dom": "6.4.2",
30-
"@testing-library/react": "14.0.0",
31-
"@types/jest": "^29.5.12",
32-
"@types/lodash": "^4.17.0",
33-
"@types/node": "^20.12.7",
34-
"@types/react": "17.0.80",
35-
"@types/react-dom": "17.0.25",
36-
"@typescript-eslint/eslint-plugin": "^7.8.0",
37-
"@typescript-eslint/parser": "^7.8.0",
25+
"@babel/core": "^7.26.0",
26+
"@biomejs/biome": "^1.9.4",
27+
"@blueking/bkui-lint": "^0.0.5",
28+
"@grafana/tsconfig": "2.0.0",
29+
"@swc/core": "^1.9.3",
30+
"@swc/helpers": "^0.5.15",
31+
"@swc/jest": "^0.2.37",
32+
"@testing-library/jest-dom": "6.6.3",
33+
"@testing-library/react": "16.0.1",
34+
"@types/jest": "^29.5.14",
35+
"@types/lodash": "^4.17.13",
36+
"@types/node": "^22.9.3",
37+
"@types/react": "18.3.12",
38+
"@types/react-dom": "18.3.1",
39+
"@typescript-eslint/eslint-plugin": "^8.15.0",
40+
"@typescript-eslint/parser": "^8.15.0",
3841
"copy-webpack-plugin": "^12.0.2",
39-
"css-loader": "^7.1.1",
40-
"eslint-plugin-react": "^7.34.1",
41-
"glob": "^10.3.12",
42+
"css-loader": "^7.1.2",
43+
"eslint-plugin-react": "^7.37.2",
44+
"glob": "^11.0.0",
4245
"identity-obj-proxy": "3.0.0",
4346
"jest": "^29.7.0",
4447
"jest-environment-jsdom": "^29.7.0",
4548
"less": "^4.2.0",
4649
"less-loader": "^12.2.0",
47-
"lint-staged": "^15.2.2",
48-
"mini-css-extract-plugin": "^2.9.0",
50+
"lint-staged": "^15.2.10",
51+
"mini-css-extract-plugin": "^2.9.2",
4952
"npm-run-all": "^4.1.5",
5053
"postcss-less": "^6.0.0",
5154
"postcss-scss": "^4.0.9",
52-
"prettier": "^3.2.5",
55+
"prettier": "^3.3.3",
5356
"replace-in-file-webpack-plugin": "^1.0.6",
5457
"sass": "1.75.0",
5558
"sass-loader": "14.2.1",
@@ -58,8 +61,8 @@
5861
"swc-loader": "^0.2.6",
5962
"ts-node": "^10.9.2",
6063
"tsconfig-paths": "^4.2.0",
61-
"typescript": "5.4.5",
62-
"webpack": "^5.91.0",
64+
"typescript": "5.7.2",
65+
"webpack": "^5.96.1",
6366
"webpack-cli": "^5.1.4",
6467
"webpack-livereload-plugin": "^3.0.2"
6568
}

0 commit comments

Comments
 (0)