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

@@ -227,7 +227,7 @@ export default function TableChart<D extends DataRecord = DataRecord>(
const handleChangeSearchCol = (searchCol: string) => {
if (!isEqual(searchCol, serverPaginationData?.searchColumn)) {
const modifiedOwnState = {
...(serverPaginationData || {}),
...serverPaginationData,
searchColumn: searchCol,
searchText: '',
};
@@ -238,7 +238,7 @@ export default function TableChart<D extends DataRecord = DataRecord>(
const handleSearch = useCallback(
(searchText: string) => {
const modifiedOwnState = {
...(serverPaginationData || {}),
...serverPaginationData,
searchColumn:
serverPaginationData?.searchColumn || searchOptions[0]?.value,
searchText,

View File

@@ -355,7 +355,7 @@ const buildQuery: BuildQuery<TableChartFormData> = (
) {
queryObject = { ...queryObject, row_offset: 0 };
const modifiedOwnState = {
...(options?.ownState || {}),
...options?.ownState,
currentPage: 0,
pageSize: queryObject.row_limit ?? 0,
};

View File

@@ -16,7 +16,7 @@
* specific language governing permissions and limitations
* under the License.
*/
import { styled } from '@superset-ui/core';
import { styled, useTheme } from '@superset-ui/core';
import { CustomCellRendererProps } from '@superset-ui/core/components/ThemedAgGridReact';
import { BasicColorFormatterType, InputColumn } from '../types';
import { useIsDark } from '../utils/useTableTheme';
@@ -109,13 +109,15 @@ function cellBackground({
value,
colorPositiveNegative = false,
isDarkTheme = false,
theme,
}: {
value: number;
colorPositiveNegative: boolean;
isDarkTheme: boolean;
theme: any;
}) {
if (!colorPositiveNegative) {
return isDarkTheme ? 'rgba(255,255,255,0.2)' : 'rgba(0,0,0,0.2)'; // transparent or neutral
return 'transparent'; // Use transparent background when colorPositiveNegative is false
}
const r = value < 0 ? 150 : 0;
@@ -150,6 +152,7 @@ export const NumericCellRenderer = (
} = params;
const isDarkTheme = useIsDark();
const theme = !colorPositiveNegative ? null : useTheme();
if (node?.rowPinned === 'bottom') {
return <StyledTotalCell>{valueFormatted ?? value}</StyledTotalCell>;
@@ -195,6 +198,7 @@ export const NumericCellRenderer = (
value: value as number,
colorPositiveNegative,
isDarkTheme,
theme,
});
return (

View File

@@ -42,7 +42,7 @@ export const getCrossFilterDataMask = ({
isActiveFilterValue,
timestampFormatter,
}: GetCrossFilterDataMaskProps) => {
let updatedFilters = { ...(filters || {}) };
let updatedFilters = { ...filters };
if (filters && isActiveFilterValue(key, value)) {
updatedFilters = {};
} else {