Skip to content

Commit d0d2cf0

Browse files
committed
Merge branch 'main' into feat/sql-insightsinsights
2 parents cd6c493 + 6507e19 commit d0d2cf0

File tree

929 files changed

+94140
-96405
lines changed

Some content is hidden

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

929 files changed

+94140
-96405
lines changed

.eslintignore

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

.eslintrc.json

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

.github/actions/catch-install-pnpm/action.yml

Lines changed: 6 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,17 @@ name: Catch and Install PNPM
22
runs:
33
using: 'composite'
44
steps:
5-
- name: Install Node.js
6-
uses: actions/setup-node@v4
7-
with:
8-
node-version: 20
9-
10-
- uses: pnpm/action-setup@v3
5+
- uses: pnpm/action-setup@v4
116
name: Install pnpm
127
with:
13-
version: 8
8+
version: 10.10.0
149
run_install: false
1510

16-
- name: Get pnpm store directory
17-
shell: bash
18-
run: |
19-
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
20-
21-
- uses: actions/cache@v4
22-
name: Setup pnpm cache
11+
- name: Install Node.js
12+
uses: actions/setup-node@v4
2313
with:
24-
path: ${{ env.STORE_PATH }}
25-
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
26-
restore-keys: |
27-
${{ runner.os }}-pnpm-store-
14+
node-version: 20
15+
cache: 'pnpm'
2816

2917
- name: Install dependencies
3018
shell: bash

.stylelintrc.js

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
const { transpileModule } = require('typescript');
2-
31
module.exports = {
42
processors: ['stylelint-processor-styled-components'],
53
extends: [
@@ -52,6 +50,7 @@ module.exports = {
5250
'color-hex-length': null,
5351
'alpha-value-notation': null,
5452
'color-function-notation': 'legacy',
55-
'selector-not-notation': ['simple', 'complex']
53+
'selector-not-notation': ['simple', 'complex'],
54+
'declaration-block-no-redundant-longhand-properties': null
5655
}
5756
};

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ override MAIN_MODULE = ${shell pwd}
33
override UID = ${shell id -u}
44
override GID = ${shell id -g}
55

6-
DOCKER_IMAGE ?= reg.actiontech.com/actiontech-dev/pnpm:8.3.1-node20
6+
DOCKER_IMAGE ?= reg.actiontech.com/actiontech-dev/pnpm:10.10.0-node20
77
COMMAND ?=
88
EDITION ?=ce
99

eslint.config.mjs

Lines changed: 99 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,99 @@
1+
import { defineConfig, globalIgnores } from 'eslint/config';
2+
import globals from 'globals';
3+
import tseslint from 'typescript-eslint';
4+
import pluginReact from 'eslint-plugin-react';
5+
import pluginImport from 'eslint-plugin-import';
6+
import pluginReactHooks from 'eslint-plugin-react-hooks';
7+
import pluginNode from 'eslint-plugin-node';
8+
9+
export default defineConfig([
10+
tseslint.configs.recommended,
11+
{
12+
files: ['**/scripts/**/*.{js,mjs,cjs,ts,jsx,tsx}'],
13+
plugins: {
14+
import: pluginImport,
15+
node: pluginNode
16+
},
17+
languageOptions: {
18+
globals: {
19+
...globals.node
20+
}
21+
},
22+
rules: {
23+
'@typescript-eslint/no-unused-vars': 'warn',
24+
'@typescript-eslint/no-explicit-any': 'off',
25+
'@typescript-eslint/no-require-imports': 'warn',
26+
'@typescript-eslint/no-empty-object-type': 'off'
27+
}
28+
},
29+
{
30+
files: ['**/packages/**/*.{js,mjs,cjs,ts,jsx,tsx}'],
31+
...pluginReact.configs.flat.recommended,
32+
plugins: {
33+
import: pluginImport,
34+
react: pluginReact,
35+
'react-hooks': pluginReactHooks
36+
},
37+
languageOptions: {
38+
...pluginReact.configs.flat.recommended.languageOptions,
39+
globals: {
40+
...globals.browser
41+
}
42+
},
43+
settings: {
44+
react: {
45+
pragma: 'React',
46+
version: 'detect'
47+
}
48+
},
49+
rules: {
50+
...pluginReactHooks.configs.recommended.rules,
51+
'no-shadow': 'off',
52+
'@typescript-eslint/no-shadow': 'error',
53+
'no-shadow-restricted-names': 'error',
54+
'testing-library/render-result-naming-convention': 0,
55+
'prefer-const': 'warn',
56+
'@typescript-eslint/no-non-null-asserted-optional-chain': 0,
57+
'@typescript-eslint/no-non-null-assertion': 0,
58+
'no-extra-boolean-cast': 'off',
59+
'import/no-anonymous-default-export': [2, { allowNew: true }],
60+
'@typescript-eslint/no-empty-interface': [
61+
'error',
62+
{
63+
allowSingleExtends: true
64+
}
65+
],
66+
'@typescript-eslint/no-explicit-any': 'off',
67+
'react/display-name': 0,
68+
'react/prop-types': 'off',
69+
'react/require-default-props': 'off',
70+
'no-console': 'warn',
71+
'@typescript-eslint/no-unused-vars': 'warn',
72+
'no-template-curly-in-string': 'warn',
73+
'@typescript-eslint/no-empty-object-type': 'off',
74+
'@typescript-eslint/no-empty-function': 'warn',
75+
'import/no-anonymous-default-export': 'warn'
76+
}
77+
},
78+
globalIgnores([
79+
'jest.config.js',
80+
'eslint.config.mjs',
81+
'**/packages/**/*.test.ts',
82+
'**/packages/**/*.test.tsx',
83+
'**/packages/shared/lib/api/*',
84+
'**/packages/**/mockApi/*',
85+
'**/packages/**/testUtil/*',
86+
'jest-setup.ts',
87+
'node_modules/*',
88+
'**/packages/*/node_modules/*',
89+
'**/scripts/jest/*.js',
90+
'/**/node_modules/*',
91+
'dist',
92+
'packages/*/dist',
93+
'packages/*/scripts',
94+
'# config',
95+
'vite.config.ts',
96+
'.eslintrc.json',
97+
'es'
98+
])
99+
]);

jest-setup.ts

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,27 @@ i18n.use(initReactI18next).init({
4444
}
4545
});
4646

47+
const ignoreReactConsoleErrors = () => {
48+
const rules = [
49+
'Warning: findDOMNode is deprecated and will be removed in the next major release. Instead, add a ref directly to the element you want to reference. Learn more about using refs safely here: https://reactjs.org/link/strict-mode-find-nod'
50+
];
51+
52+
const originalError = console.error;
53+
54+
beforeAll(() => {
55+
console.error = (...arg) => {
56+
if (typeof arg[0] === 'string' && rules.some((v) => arg[0].includes(v))) {
57+
return;
58+
}
59+
originalError(...arg);
60+
};
61+
});
62+
63+
afterAll(() => {
64+
console.error = originalError;
65+
});
66+
};
67+
68+
ignoreReactConsoleErrors();
69+
4770
jest.setTimeout(60 * 1000);

jest.config.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
/* eslint-disable @typescript-eslint/no-var-requires */
21
process.env.TZ = 'Asia/Shanghai';
32

43
const path = require('path');

package.json

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"version": "1.0.0",
44
"description": "",
55
"main": "index.js",
6-
"packageManager": "pnpm@8.3.1",
6+
"packageManager": "pnpm@10.10.0",
77
"scripts": {
88
"preinstall": "npx only-allow pnpm",
99
"start": "pnpm --filter base start",
@@ -17,7 +17,7 @@
1717
"eslint": "eslint packages/*/src/ packages/*/lib/ scripts/cli/*/src",
1818
"stylelint": "stylelint packages/*/{src,lib}/**/{*.less,style.ts,element.ts}",
1919
"ts-check": "tsc --noEmit",
20-
"checker": "pnpm ts-check && pnpm eslint && pnpm stylelint && pnpm prettier:c",
20+
"checker": "concurrently \"pnpm ts-check\" \"pnpm eslint\" \"pnpm stylelint\" \"pnpm prettier:c\"",
2121
"test": "sh ./scripts/jest/run.sh",
2222
"test:c": "sh ./scripts/jest/run-coverage.sh",
2323
"test:ci": "sh ./scripts/jest/run-ci-ee.sh && sh ./scripts/jest/run-ci-ce.sh && node ./scripts/jest/merge-report-json.js",
@@ -36,11 +36,11 @@
3636
"devDependencies": {
3737
"@actiontech/cli-create-dms-page": "workspace:^",
3838
"@cfaester/enzyme-adapter-react-18": "^0.7.0",
39+
"@eslint/js": "^9.23.0",
3940
"@testing-library/dom": "9.3.4",
4041
"@testing-library/jest-dom": "6.4.2",
41-
"@testing-library/react": "14.2.1",
42+
"@testing-library/react": "^16.2.0",
4243
"@testing-library/react-hooks": "^8.0.1",
43-
"@testing-library/user-event": "^14.4.3",
4444
"@types/enzyme": "^3.10.8",
4545
"@types/jest": "29.5.12",
4646
"@types/json2md": "^1.5.1",
@@ -58,13 +58,16 @@
5858
"babel-preset-react-app": "^10.0.1",
5959
"blob-polyfill": "^7.0.20220408",
6060
"comment-parser": "^1.4.1",
61+
"concurrently": "^9.1.2",
6162
"cross-env": "^7.0.3",
6263
"enzyme": "^3.11.0",
6364
"enzyme-to-json": "^3.6.2",
64-
"eslint": "^8.19.0",
65-
"eslint-config-prettier": "^8.5.0",
66-
"eslint-config-react-app": "^7.0.1",
67-
"eslint-plugin-prettier": "^4.2.1",
65+
"eslint": "^9.23.0",
66+
"eslint-plugin-import": "^2.31.0",
67+
"eslint-plugin-node": "^11.1.0",
68+
"eslint-plugin-react": "^7.37.4",
69+
"eslint-plugin-react-hooks": "^5.2.0",
70+
"globals": "^16.0.0",
6871
"identity-obj-proxy": "^3.0.0",
6972
"istanbul-lib-coverage": "3.0.0",
7073
"jest": "29.1.2",
@@ -85,8 +88,9 @@
8588
"stylelint-prettier": "^4.0.2",
8689
"ts-jest": "27.1.5",
8790
"typescript": "^5.0.2",
91+
"typescript-eslint": "^8.28.0",
8892
"vite": "^5.2.6",
89-
"vite-plugin-conditional-compile": "^1.4.3",
93+
"vite-plugin-conditional-compile": "1.4.3",
9094
"vite-plugin-eslint": "^1.8.1",
9195
"vite-plugin-html": "^3.2.2"
9296
},
@@ -125,11 +129,14 @@
125129
"react-dom": "^18.2.0",
126130
"react-i18next": "^11.18.6",
127131
"react-redux": "^8.0.5",
128-
"react-router-dom": "^6.3.0",
132+
"react-router-dom": "^6.10.0",
129133
"recoil": "^0.7.4",
130134
"sql-formatter": "^12.2.4"
131135
},
132136
"resolutions": {
133-
"headers-polyfill": "3.0.10"
137+
"headers-polyfill": "3.0.10",
138+
"cheerio": "1.0.0-rc.3",
139+
"@babel/core": "^7.22.0",
140+
"@ant-design/cssinjs": "1.17.0"
134141
}
135142
}

0 commit comments

Comments
 (0)