mirror of
https://github.com/apache/superset.git
synced 2026-04-19 08:04:53 +00:00
feat(frontend): Replace ESLint with OXC hybrid linting architecture (#35506)
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -96,7 +96,7 @@ const config: ControlPanelConfig = {
|
||||
},
|
||||
{
|
||||
...sections.titleControls,
|
||||
controlSetRows: [...sections.titleControls.controlSetRows.slice(0, -1)],
|
||||
controlSetRows: sections.titleControls.controlSetRows.slice(0, -1),
|
||||
},
|
||||
{
|
||||
label: t('Chart Options'),
|
||||
@@ -107,7 +107,11 @@ const config: ControlPanelConfig = {
|
||||
...legendSection,
|
||||
['zoomable'],
|
||||
[showExtraControls],
|
||||
[<ControlSubSectionHeader>{t('X Axis')}</ControlSubSectionHeader>],
|
||||
[
|
||||
<ControlSubSectionHeader key="x-axis">
|
||||
{t('X Axis')}
|
||||
</ControlSubSectionHeader>,
|
||||
],
|
||||
[
|
||||
{
|
||||
name: 'x_axis_time_bounds',
|
||||
@@ -126,7 +130,11 @@ const config: ControlPanelConfig = {
|
||||
},
|
||||
],
|
||||
['x_axis_time_format'],
|
||||
[<ControlSubSectionHeader>{t('Tooltip')}</ControlSubSectionHeader>],
|
||||
[
|
||||
<ControlSubSectionHeader key="tooltip">
|
||||
{t('Tooltip')}
|
||||
</ControlSubSectionHeader>,
|
||||
],
|
||||
[tooltipTimeFormatControl],
|
||||
[tooltipValuesFormatControl],
|
||||
],
|
||||
|
||||
@@ -79,23 +79,21 @@ export default function EchartsMixedTimeseries({
|
||||
filters:
|
||||
values.length === 0
|
||||
? []
|
||||
: [
|
||||
...currentGroupBy.map((col, idx) => {
|
||||
const val: DataRecordValue[] = groupbyValues.map(
|
||||
v => v[idx],
|
||||
);
|
||||
if (val === null || val === undefined)
|
||||
return {
|
||||
col,
|
||||
op: 'IS NULL' as const,
|
||||
};
|
||||
: currentGroupBy.map((col, idx) => {
|
||||
const val: DataRecordValue[] = groupbyValues.map(
|
||||
v => v[idx],
|
||||
);
|
||||
if (val === null || val === undefined)
|
||||
return {
|
||||
col,
|
||||
op: 'IN' as const,
|
||||
val: val as (string | number | boolean)[],
|
||||
op: 'IS NULL' as const,
|
||||
};
|
||||
}),
|
||||
],
|
||||
return {
|
||||
col,
|
||||
op: 'IN' as const,
|
||||
val: val as (string | number | boolean)[],
|
||||
};
|
||||
}),
|
||||
},
|
||||
filterState: {
|
||||
value: !groupbyValues.length ? null : groupbyValues,
|
||||
|
||||
@@ -23,7 +23,6 @@ export const COLOR_SATURATION = [0.7, 0.4];
|
||||
export const LABEL_FONTSIZE = 11;
|
||||
export const BORDER_WIDTH = 2;
|
||||
export const GAP_WIDTH = 2;
|
||||
export const BORDER_COLOR = '#fff';
|
||||
|
||||
export const extractTreePathInfo = (
|
||||
treePathInfo: TreePathInfo[] | undefined,
|
||||
|
||||
@@ -79,6 +79,7 @@ const Styles = styled.div<EchartsStylesProps>`
|
||||
width: ${({ width }) => width};
|
||||
`;
|
||||
|
||||
// eslint-disable-next-line react-hooks/rules-of-hooks -- This is ECharts' use function, not a React hook
|
||||
use([
|
||||
CanvasRenderer,
|
||||
BarChart,
|
||||
@@ -114,8 +115,8 @@ const loadLocale = async (locale: string) => {
|
||||
let lang;
|
||||
try {
|
||||
lang = await import(`echarts/lib/i18n/lang${locale}`);
|
||||
} catch (e) {
|
||||
console.error(`Locale ${locale} not supported in ECharts`, e);
|
||||
} catch {
|
||||
// Locale not supported in ECharts
|
||||
}
|
||||
return lang?.default;
|
||||
};
|
||||
@@ -177,7 +178,7 @@ function Echart(
|
||||
handleSizeChange({ width, height });
|
||||
setDidMount(true);
|
||||
});
|
||||
}, [locale]);
|
||||
}, [locale, width, height, handleSizeChange]);
|
||||
|
||||
useEffect(() => {
|
||||
if (didMount) {
|
||||
@@ -251,7 +252,7 @@ function Echart(
|
||||
|
||||
chartRef.current?.setOption(themedEchartOptions, true);
|
||||
}
|
||||
}, [didMount, echartOptions, eventHandlers, zrEventHandlers, theme]);
|
||||
}, [didMount, echartOptions, eventHandlers, zrEventHandlers, theme, vizType]);
|
||||
|
||||
useEffect(() => () => chartRef.current?.dispose(), []);
|
||||
|
||||
@@ -271,7 +272,7 @@ function Echart(
|
||||
});
|
||||
}
|
||||
previousSelection.current = currentSelection;
|
||||
}, [currentSelection, chartRef.current]);
|
||||
}, [currentSelection]);
|
||||
|
||||
useLayoutEffect(() => {
|
||||
handleSizeChange({ width, height });
|
||||
|
||||
Reference in New Issue
Block a user