feat(frontend): Replace ESLint with OXC hybrid linting architecture (#35506)

Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
Evan Rusackas
2025-10-30 09:26:21 -07:00
committed by GitHub
parent a5eb02d178
commit 8ccdf3b32b
121 changed files with 2243 additions and 755 deletions

View File

@@ -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],
],

View File

@@ -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,

View File

@@ -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,

View File

@@ -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 });