diff --git a/package.json b/package.json index b47ce9b..5507635 100644 --- a/package.json +++ b/package.json @@ -41,7 +41,7 @@ "lint:ts": "eslint src --ext .ts,.tsx", "lint:ts-fix": "pnpm lint:ts --fix", "test:unit": "jest --config ./jest.config.ts", - "test:size": "pn build && limit-size", + "test:size": "pnpm build && limit-size", "changeset": "changeset add", "publish-version": "changeset version && node scripts/sync-version", "publish-packages": "pnpm build && changeset publish" @@ -65,6 +65,7 @@ "@commitlint/cli": "^19.5.0", "@commitlint/config-conventional": "^19.5.0", "@types/jest": "^29.5.14", + "@types/lodash": "^4.17.13", "@types/react": "^18.0.0", "antd": "^5.0.0", "dumi": "^2.4.13", @@ -118,7 +119,7 @@ "limit-size": [ { "path": "dist/umd/index.js", - "limit": "3 Mb" + "limit": "5 Mb" } ], "publishConfig": { diff --git a/src/ChartCodeRender/index.tsx b/src/ChartCodeRender/index.tsx index fe7addc..ea3fb23 100644 --- a/src/ChartCodeRender/index.tsx +++ b/src/ChartCodeRender/index.tsx @@ -56,7 +56,7 @@ const withCodeBlock = (options: WithChartCodeOptions): CodeBlockComponent => { }; // Create a higher-order component (HOC) with chart code -export const withChartCode = (options: WithChartCodeOptions) => { +export const withChartCode = (options: WithChartCodeOptions): CodeBlockComponent => { return withCodeBlock(options); }; @@ -65,7 +65,9 @@ export const withChartCode = (options: WithChartCodeOptions) => { * @param componentsArray * @returns */ -export const withDefaultChartCode = (options?: Partial) => { +export const withDefaultChartCode = ( + options?: Partial, +): CodeBlockComponent => { return withChartCode({ ...options, components: { diff --git a/src/ConfigProvider/hooks/useConfig.ts b/src/ConfigProvider/hooks/useConfig.ts index b39a776..102975e 100644 --- a/src/ConfigProvider/hooks/useConfig.ts +++ b/src/ConfigProvider/hooks/useConfig.ts @@ -35,7 +35,7 @@ export function usePlotConfig( name: Charts, defaultConfig: Partial | ((props: Partial) => Partial), props: Partial, -) { +): Partial { const transformedProps = transform2ADCProps(props); const _defaultConfig =