Skip to content

fix: resolve dependency version changes after pnpm upgrade #620

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 0 additions & 17 deletions .eslintignore

This file was deleted.

51 changes: 0 additions & 51 deletions .eslintrc.json

This file was deleted.

5 changes: 2 additions & 3 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
const { transpileModule } = require('typescript');

module.exports = {
processors: ['stylelint-processor-styled-components'],
extends: [
Expand Down Expand Up @@ -52,6 +50,7 @@ module.exports = {
'color-hex-length': null,
'alpha-value-notation': null,
'color-function-notation': 'legacy',
'selector-not-notation': ['simple', 'complex']
'selector-not-notation': ['simple', 'complex'],
'declaration-block-no-redundant-longhand-properties': null
}
};
99 changes: 99 additions & 0 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
@@ -0,0 +1,99 @@
import { defineConfig, globalIgnores } from 'eslint/config';
import globals from 'globals';
import tseslint from 'typescript-eslint';
import pluginReact from 'eslint-plugin-react';
import pluginImport from 'eslint-plugin-import';
import pluginReactHooks from 'eslint-plugin-react-hooks';
import pluginNode from 'eslint-plugin-node';

export default defineConfig([
tseslint.configs.recommended,
{
files: ['**/scripts/**/*.{js,mjs,cjs,ts,jsx,tsx}'],
plugins: {
import: pluginImport,
node: pluginNode
},
languageOptions: {
globals: {
...globals.node
}
},
rules: {
'@typescript-eslint/no-unused-vars': 'warn',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-require-imports': 'warn',
'@typescript-eslint/no-empty-object-type': 'off'
}
},
{
files: ['**/packages/**/*.{js,mjs,cjs,ts,jsx,tsx}'],
...pluginReact.configs.flat.recommended,
plugins: {
import: pluginImport,
react: pluginReact,
'react-hooks': pluginReactHooks
},
languageOptions: {
...pluginReact.configs.flat.recommended.languageOptions,
globals: {
...globals.browser
}
},
settings: {
react: {
pragma: 'React',
version: 'detect'
}
},
rules: {
...pluginReactHooks.configs.recommended.rules,
'no-shadow': 'off',
'@typescript-eslint/no-shadow': 'error',
'no-shadow-restricted-names': 'error',
'testing-library/render-result-naming-convention': 0,
'prefer-const': 'warn',
'@typescript-eslint/no-non-null-asserted-optional-chain': 0,
'@typescript-eslint/no-non-null-assertion': 0,
'no-extra-boolean-cast': 'off',
'import/no-anonymous-default-export': [2, { allowNew: true }],
'@typescript-eslint/no-empty-interface': [
'error',
{
allowSingleExtends: true
}
],
'@typescript-eslint/no-explicit-any': 'off',
'react/display-name': 0,
'react/prop-types': 'off',
'react/require-default-props': 'off',
'no-console': 'warn',
'@typescript-eslint/no-unused-vars': 'warn',
'no-template-curly-in-string': 'warn',
'@typescript-eslint/no-empty-object-type': 'off',
'@typescript-eslint/no-empty-function': 'warn',
'import/no-anonymous-default-export': 'warn'
}
},
globalIgnores([
'jest.config.js',
'eslint.config.mjs',
'**/packages/**/*.test.ts',
'**/packages/**/*.test.tsx',
'**/packages/shared/lib/api/*',
'**/packages/**/mockApi/*',
'**/packages/**/testUtil/*',
'jest-setup.ts',
'node_modules/*',
'**/packages/*/node_modules/*',
'**/scripts/jest/*.js',
'/**/node_modules/*',
'dist',
'packages/*/dist',
'packages/*/scripts',
'# config',
'vite.config.ts',
'.eslintrc.json',
'es'
])
]);
1 change: 0 additions & 1 deletion jest.config.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-var-requires */
process.env.TZ = 'Asia/Shanghai';

const path = require('path');
Expand Down
28 changes: 17 additions & 11 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"version": "1.0.0",
"description": "",
"main": "index.js",
"packageManager": "pnpm@8.3.1",
"packageManager": "pnpm@10.7.1",
"scripts": {
"preinstall": "npx only-allow pnpm",
"start": "pnpm --filter base start",
Expand All @@ -17,7 +17,7 @@
"eslint": "eslint packages/*/src/ packages/*/lib/ scripts/cli/*/src",
"stylelint": "stylelint packages/*/{src,lib}/**/{*.less,style.ts,element.ts}",
"ts-check": "tsc --noEmit",
"checker": "pnpm ts-check && pnpm eslint && pnpm stylelint && pnpm prettier:c",
"checker": "concurrently \"pnpm ts-check\" \"pnpm eslint\" \"pnpm stylelint\" \"pnpm prettier:c\"",
"test": "sh ./scripts/jest/run.sh",
"test:c": "sh ./scripts/jest/run-coverage.sh",
"test:ci": "sh ./scripts/jest/run-ci-ee.sh && sh ./scripts/jest/run-ci-ce.sh && node ./scripts/jest/merge-report-json.js",
Expand All @@ -36,11 +36,11 @@
"devDependencies": {
"@actiontech/cli-create-dms-page": "workspace:^",
"@cfaester/enzyme-adapter-react-18": "^0.7.0",
"@eslint/js": "^9.23.0",
"@testing-library/dom": "9.3.4",
"@testing-library/jest-dom": "6.4.2",
"@testing-library/react": "14.2.1",
"@testing-library/react": "^16.2.0",
"@testing-library/react-hooks": "^8.0.1",
"@testing-library/user-event": "^14.4.3",
"@types/enzyme": "^3.10.8",
"@types/jest": "29.5.12",
"@types/json2md": "^1.5.1",
Expand All @@ -58,13 +58,16 @@
"babel-preset-react-app": "^10.0.1",
"blob-polyfill": "^7.0.20220408",
"comment-parser": "^1.4.1",
"concurrently": "^9.1.2",
"cross-env": "^7.0.3",
"enzyme": "^3.11.0",
"enzyme-to-json": "^3.6.2",
"eslint": "^8.19.0",
"eslint-config-prettier": "^8.5.0",
"eslint-config-react-app": "^7.0.1",
"eslint-plugin-prettier": "^4.2.1",
"eslint": "^9.23.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-node": "^11.1.0",
"eslint-plugin-react": "^7.37.4",
"eslint-plugin-react-hooks": "^5.2.0",
"globals": "^16.0.0",
"identity-obj-proxy": "^3.0.0",
"istanbul-lib-coverage": "3.0.0",
"jest": "29.1.2",
Expand All @@ -85,8 +88,9 @@
"stylelint-prettier": "^4.0.2",
"ts-jest": "27.1.5",
"typescript": "^5.0.2",
"typescript-eslint": "^8.28.0",
"vite": "^5.2.6",
"vite-plugin-conditional-compile": "^1.4.3",
"vite-plugin-conditional-compile": "1.4.3",
"vite-plugin-eslint": "^1.8.1",
"vite-plugin-html": "^3.2.2"
},
Expand Down Expand Up @@ -125,11 +129,13 @@
"react-dom": "^18.2.0",
"react-i18next": "^11.18.6",
"react-redux": "^8.0.5",
"react-router-dom": "^6.3.0",
"react-router-dom": "^6.10.0",
"recoil": "^0.7.4",
"sql-formatter": "^12.2.4"
},
"resolutions": {
"headers-polyfill": "3.0.10"
"headers-polyfill": "3.0.10",
"cheerio": "1.0.0-rc.3",
"@babel/core": "^7.22.0"
}
}
30 changes: 30 additions & 0 deletions packages/base/src/App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ import { updateModuleFeatureSupport } from './store/permission';
import { ROUTE_PATHS } from '@actiontech/shared/lib/data/routePaths';
import useSyncDmsCloudBeaverChannel from './hooks/useSyncDmsCloudBeaverChannel';
import { getSystemModuleStatusModuleNameEnum } from '@actiontech/shared/lib/api/sqle/service/system/index.enum';
import { ComponentControlHeight } from '@actiontech/shared/lib/data/common';

import './index.less';

Expand Down Expand Up @@ -226,6 +227,35 @@ function App() {
<ConfigProvider
locale={antdLanguage}
theme={{
components: {
Input: {
controlHeight: ComponentControlHeight.default,
controlHeightLG: ComponentControlHeight.lg,
controlHeightSM: ComponentControlHeight.sm
},
Button: {
controlHeight: 32,
controlHeightLG: 36,
controlHeightSM: 28
},
DatePicker: {
controlHeight: ComponentControlHeight.default,
controlHeightLG: ComponentControlHeight.lg,
controlHeightSM: ComponentControlHeight.sm
},
Select: {
controlHeight: ComponentControlHeight.default,
controlHeightLG: ComponentControlHeight.lg,
controlHeightSM: ComponentControlHeight.sm
},
Pagination: {
itemSize: 28
},
Table: {
fontSize: 13,
fontWeightStrong: 500
}
},
algorithm:
theme === SupportTheme.DARK
? antdTheme.darkAlgorithm
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {

export const AuditResultForCreateOrderActions = (
onCreateWhitelist: (record?: IListDataExportTaskSQL) => void,
// eslint-disable-next-line @typescript-eslint/no-unused-vars
handleClickSqlRewritten: (record: IListDataExportTaskSQL) => void
): ActiontechTableActionsWithPermissions<IListDataExportTaskSQL> => {
return [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,9 @@ const CreateExportTask: React.FC = () => {
<ExportFormAction
auditAction={() => {
return auditAction().then((res) => {
res &&
if (res) {
updatePageState(CreateDataExportPageEnum.SUBMIT_WORKFLOW);
}
return res;
});
}}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import { FormStyleWrapper } from '@actiontech/shared/lib/components/CustomForm/style';
import { styled } from '@mui/material/styles';
import { Form } from 'antd';

export const UpdateTaskInfoFormTitleStyleWrapper = styled('div')`
color: ${({ theme }) =>
Expand All @@ -11,7 +10,7 @@ export const UpdateTaskInfoFormTitleStyleWrapper = styled('div')`
margin-bottom: 24px;
`;

export const UpdateBseInfoFormStyleWrapper = styled(Form)`
export const UpdateBseInfoFormStyleWrapper = styled(FormStyleWrapper)`
padding: 24px 24px 0 !important;

.ant-input.basic-input-wrapper.workflow-name-input-wrapper {
Expand Down
5 changes: 2 additions & 3 deletions packages/base/src/page/DataExportManagement/List/column.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,15 @@ import { IListDataExportWorkflow } from '@actiontech/shared/lib/api/base/service
import { IListDataExportWorkflowsParams } from '@actiontech/shared/lib/api/base/service/DataExportWorkflows/index.d';
import { TableColumnWithIconStyleWrapper } from '@actiontech/shared/lib/styleWrapper/element';
import { BriefcaseFilled } from '@actiontech/icons';
import { IListDataExportWorkflowWithExtraParams } from './index.type';

export type ExportWorkflowListFilterParamType = PageInfoWithoutIndexAndSize<
IListDataExportWorkflowsParams & { page_index: number },
'project_uid'
>;

export const ExportWorkflowExtraFilterMeta: () => ActiontechTableFilterMeta<
IListDataExportWorkflow & {
db_service_uid?: string;
},
IListDataExportWorkflowWithExtraParams,
ExportWorkflowListFilterParamType
> = () => {
return new Map<
Expand Down
Loading
Loading