mirror of
https://github.com/apache/superset.git
synced 2026-04-18 23:55:00 +00:00
feat(frontend): Replace ESLint with OXC hybrid linting architecture (#35506)
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -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