From 5e58477fb2480cc3f0a951df50b826636db77032 Mon Sep 17 00:00:00 2001 From: hughhhh Date: Mon, 13 Mar 2023 11:23:56 -0600 Subject: [PATCH] lets see --- .pre-commit-config.yaml | 2 +- .../plugin-chart-echarts/src/utils/forecast.ts | 15 ++++++--------- .../plugin-chart-table/src/transformProps.ts | 3 ++- .../components/DropdownSelectableIcon/index.tsx | 4 ++-- .../nativeFilters/FilterBar/Header/index.tsx | 4 ++-- .../nativeFilters/FilterBar/Horizontal.tsx | 4 ++-- .../visualizations/TimeTable/transformProps.ts | 13 +++++-------- 7 files changed, 20 insertions(+), 25 deletions(-) diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index b83af1bc2287a..84f1054198034 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -47,7 +47,7 @@ repos: - id: black language_version: python3 - repo: https://github.com/pre-commit/mirrors-prettier - rev: v3.0.0-alpha.4 # Use the sha or tag you want to point at + rev: v3.0.0-alpha.0 # Use the sha or tag you want to point at hooks: - id: prettier args: ["--ignore-path=./superset-frontend/.prettierignore"] diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/utils/forecast.ts b/superset-frontend/plugins/plugin-chart-echarts/src/utils/forecast.ts index 358dd6db03164..485e9fb8968a6 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/utils/forecast.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/utils/forecast.ts @@ -45,15 +45,12 @@ export const extractForecastSeriesContext = ( export const extractForecastSeriesContexts = ( seriesNames: string[], ): { [key: string]: ForecastSeriesEnum[] } => - seriesNames.reduce( - (agg, name) => { - const context = extractForecastSeriesContext(name); - const currentContexts = agg[context.name] || []; - currentContexts.push(context.type); - return { ...agg, [context.name]: currentContexts }; - }, - {} as { [key: string]: ForecastSeriesEnum[] }, - ); + seriesNames.reduce((agg, name) => { + const context = extractForecastSeriesContext(name); + const currentContexts = agg[context.name] || []; + currentContexts.push(context.type); + return { ...agg, [context.name]: currentContexts }; + }, {} as { [key: string]: ForecastSeriesEnum[] }); export const extractForecastValuesFromTooltipParams = ( params: any[], diff --git a/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts b/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts index 6e2fb10abe4a4..2fae16c31c87e 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts +++ b/superset-frontend/plugins/plugin-chart-table/src/transformProps.ts @@ -170,7 +170,8 @@ const processColumns = memoizeOne(function processColumns( typeof percentMetrics, typeof columns, ]; -}, isEqualColumns); +}, +isEqualColumns); /** * Automatically set page size based on number of cells. diff --git a/superset-frontend/src/components/DropdownSelectableIcon/index.tsx b/superset-frontend/src/components/DropdownSelectableIcon/index.tsx index 4ad908be5512c..85c4284439f19 100644 --- a/superset-frontend/src/components/DropdownSelectableIcon/index.tsx +++ b/superset-frontend/src/components/DropdownSelectableIcon/index.tsx @@ -69,8 +69,8 @@ const StyledMenu = styled(Menu)` font-size: ${theme.typography.sizes.s}px; color: ${theme.colors.grayscale.base}; padding: ${theme.gridUnit}px ${theme.gridUnit * 3}px ${ - theme.gridUnit - }px ${theme.gridUnit * 3}px; + theme.gridUnit + }px ${theme.gridUnit * 3}px; } .ant-dropdown-menu-item-selected { color: ${theme.colors.grayscale.dark1}; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Header/index.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Header/index.tsx index c6cd587f49db1..7cd4877d11e2c 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Header/index.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Header/index.tsx @@ -60,8 +60,8 @@ const HeaderButton = styled(Button)` const Wrapper = styled.div` ${({ theme }) => ` padding: ${theme.gridUnit * 3}px ${theme.gridUnit * 2}px ${ - theme.gridUnit - }px; + theme.gridUnit + }px; .ant-dropdown-trigger span { padding-right: ${theme.gridUnit * 2}px; diff --git a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Horizontal.tsx b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Horizontal.tsx index 98fdff09471da..24b2caa033b81 100644 --- a/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Horizontal.tsx +++ b/superset-frontend/src/dashboard/components/nativeFilters/FilterBar/Horizontal.tsx @@ -40,8 +40,8 @@ import crossFiltersSelector from './CrossFilters/selectors'; const HorizontalBar = styled.div` ${({ theme }) => ` padding: ${theme.gridUnit * 3}px ${theme.gridUnit * 2}px ${ - theme.gridUnit * 3 - }px ${theme.gridUnit * 4}px; + theme.gridUnit * 3 + }px ${theme.gridUnit * 4}px; background: ${theme.colors.grayscale.light5}; box-shadow: inset 0px -2px 2px -1px ${theme.colors.grayscale.light2}; `} diff --git a/superset-frontend/src/visualizations/TimeTable/transformProps.ts b/superset-frontend/src/visualizations/TimeTable/transformProps.ts index 92356b8567a1b..951042544190b 100644 --- a/superset-frontend/src/visualizations/TimeTable/transformProps.ts +++ b/superset-frontend/src/visualizations/TimeTable/transformProps.ts @@ -56,14 +56,11 @@ export default function transformProps(chartProps: TableChartProps) { ); } else { /* eslint-disable */ - const metricMap = datasource.metrics.reduce( - (acc, current) => { - const map = acc; - map[current.metric_name] = current; - return map; - }, - {} as Record, - ); + const metricMap = datasource.metrics.reduce((acc, current) => { + const map = acc; + map[current.metric_name] = current; + return map; + }, {} as Record); /* eslint-disable */ rows = metrics.map(metric => typeof metric === 'object' ? metric : metricMap[metric],