Skip to content

Commit fa3c64b

Browse files
Formatting updates from oxlint
1 parent 58efb3d commit fa3c64b

22 files changed

+67
-62
lines changed

packages/react/cypress/component/auto/table/AutoTableBulkActions.cy.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ describeForEachAutoAdapter("AutoTable - Bulk actions", ({ name, adapter: { AutoT
1414
singleRowCheckbox: (recordId: string | number) => `input[id="Select-${recordId}"]`,
1515
}
1616
: name === SUITE_NAMES.POLARIS_WC
17-
? {
18-
selectAllCheckbox: `s-checkbox[id^="select-all-"]`,
19-
singleRowCheckbox: (recordId: string | number) => `s-checkbox[id$="-${recordId}"]`,
20-
}
21-
: {
22-
// SHADCN
23-
selectAllCheckbox: `button[id="AutoTableSelectAllCheckbox"]`,
24-
singleRowCheckbox: (recordId: string | number) => `button[id="AutoTableSingleRowCheckbox-${recordId}"]`,
25-
};
17+
? {
18+
selectAllCheckbox: `s-checkbox[id^="select-all-"]`,
19+
singleRowCheckbox: (recordId: string | number) => `s-checkbox[id$="-${recordId}"]`,
20+
}
21+
: {
22+
// SHADCN
23+
selectAllCheckbox: `button[id="AutoTableSelectAllCheckbox"]`,
24+
singleRowCheckbox: (recordId: string | number) => `button[id="AutoTableSingleRowCheckbox-${recordId}"]`,
25+
};
2626

2727
const mockModelMetadata = () => {
2828
cy.intercept(

packages/react/spec/auto/storybook/table/SelectableDesignSystemAutoTableStory.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ const PolarisWCAutoTableStory = <
8383
GivenOptions extends OptionsType,
8484
SchemaT,
8585
FinderFunction extends FindManyFunction<GivenOptions, any, SchemaT, any>,
86-
Options extends FinderFunction["optionsType"]
86+
Options extends FinderFunction["optionsType"],
8787
>(
8888
props: AutoTableProps<GivenOptions, SchemaT, FinderFunction, Options>
8989
) => {

packages/react/src/auto/hooks/useEnumInputController.tsx

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,10 @@ export const useEnumInputController = (props: AutoEnumInputProps) => {
4242
[allOptions, searchValue]
4343
);
4444

45-
const onChange = useCallback(
46-
(...args: any[]) => {
47-
fieldProps.onChange(...args);
48-
props.afterChange?.(...args);
49-
},
50-
[fieldProps.onChange, props.afterChange]
51-
);
45+
const onChange = useCallback((...args: any[]) => {
46+
fieldProps.onChange(...args);
47+
props.afterChange?.(...args);
48+
}, [fieldProps.onChange, props.afterChange]);
5249

5350
const onSelectionChange = useCallback(
5451
(selected: string | null) => {

packages/react/src/auto/hooks/useTagsForTableCellRenderer.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const useTagsForTableCellRenderer = (props: {
3434
.map((tag) => (maxTagLength && tag.length > maxTagLength ? tag.slice(0, maxTagLength) + "…" : tag)),
3535
originalLength: formattedTags.length,
3636
};
37-
}, [value]);
37+
}, [value, maxTagCount, maxTagLength]);
3838

3939
return {
4040
allTags,

packages/react/src/auto/polaris-wc/PolarisWCAutoButton.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ declare let window: any;
1313
export const PolarisWCAutoButton = <
1414
GivenOptions extends OptionsType,
1515
SchemaT,
16-
ActionFunc extends ActionFunction<GivenOptions, any, any, SchemaT, any> | GlobalActionFunction<any>
16+
ActionFunc extends ActionFunction<GivenOptions, any, any, SchemaT, any> | GlobalActionFunction<any>,
1717
>(
1818
props: AutoButtonProps<GivenOptions, SchemaT, ActionFunc> & { id?: string; children?: React.ReactNode }
1919
) => {

packages/react/src/auto/polaris-wc/PolarisWCAutoForm.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export const PolarisWCAutoFormSkeleton = () => (
3030
export type PolarisWCAutoFormProps<
3131
GivenOptions extends OptionsType,
3232
SchemaT,
33-
ActionFunc extends ActionFunction<GivenOptions, any, any, SchemaT, any> | GlobalActionFunction<any>
33+
ActionFunc extends ActionFunction<GivenOptions, any, any, SchemaT, any> | GlobalActionFunction<any>,
3434
> = AutoFormProps<GivenOptions, SchemaT, ActionFunc>;
3535

3636
/**
@@ -39,7 +39,7 @@ export type PolarisWCAutoFormProps<
3939
export const PolarisWCAutoForm = <
4040
GivenOptions extends OptionsType,
4141
SchemaT,
42-
ActionFunc extends ActionFunction<GivenOptions, any, any, SchemaT, any> | GlobalActionFunction<any>
42+
ActionFunc extends ActionFunction<GivenOptions, any, any, SchemaT, any> | GlobalActionFunction<any>,
4343
>(
4444
props: PolarisWCAutoFormProps<GivenOptions, SchemaT, ActionFunc>
4545
) => {
@@ -65,7 +65,7 @@ export const PolarisWCAutoForm = <
6565
const PolarisWCAutoFormComponent = <
6666
GivenOptions extends OptionsType,
6767
SchemaT,
68-
ActionFunc extends ActionFunction<GivenOptions, any, any, SchemaT, any> | GlobalActionFunction<any>
68+
ActionFunc extends ActionFunction<GivenOptions, any, any, SchemaT, any> | GlobalActionFunction<any>,
6969
>(
7070
props: PolarisWCAutoFormProps<GivenOptions, SchemaT, ActionFunc>
7171
) => {

packages/react/src/auto/polaris-wc/PolarisWCAutoTable.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export type PolarisWCAutoTableProps<
5555
GivenOptions extends OptionsType,
5656
SchemaT,
5757
FinderFunction extends FindManyFunction<GivenOptions, any, SchemaT, any>,
58-
Options extends FinderFunction["optionsType"]
58+
Options extends FinderFunction["optionsType"],
5959
> = AutoTableProps<GivenOptions, SchemaT, FinderFunction, Options>;
6060

6161
/**
@@ -70,7 +70,7 @@ export const PolarisWCAutoTable = <
7070
GivenOptions extends OptionsType,
7171
SchemaT,
7272
FinderFunction extends FindManyFunction<GivenOptions, any, SchemaT, any>,
73-
Options extends FinderFunction["optionsType"]
73+
Options extends FinderFunction["optionsType"],
7474
>(
7575
props: PolarisWCAutoTableProps<GivenOptions, SchemaT, FinderFunction, Options>
7676
) => {
@@ -87,7 +87,7 @@ const PolarisWCAutoTableComponent = <
8787
GivenOptions extends OptionsType,
8888
SchemaT,
8989
FinderFunction extends FindManyFunction<GivenOptions, any, SchemaT, any>,
90-
Options extends FinderFunction["optionsType"]
90+
Options extends FinderFunction["optionsType"],
9191
>(
9292
props: PolarisWCAutoTableProps<GivenOptions, SchemaT, FinderFunction, Options>
9393
) => {

packages/react/src/auto/polaris-wc/commonComponents/PolarisWCDismissibleBadge.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
import React, { ComponentProps } from "react";
1+
import type { ComponentProps } from "react";
2+
import React from "react";
23
import { useHover } from "../../hooks/useHover.js";
34

45
/**

packages/react/src/auto/polaris-wc/commonComponents/PolarisWCTruncatedTextWithTooltip.tsx

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,9 @@ export const PolarisWCTruncatedTextWithTooltip = (props: PolarisWCTruncatedTextW
2626
useScrollWidthCheck: true,
2727
});
2828

29-
useEffect(checkOverflow, [text]);
29+
useEffect(() => {
30+
checkOverflow();
31+
}, [checkOverflow, text]);
3032

3133
const [isHovering, hoverProps] = useHover();
3234

packages/react/src/auto/polaris-wc/inputs/PolarisWCAutoBooleanInput.tsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,13 @@ export const PolarisWCAutoBooleanInput = autoInput((props: PolarisWCAutoBooleanI
2323
const { field: _field, control: _control, disabled, label: _label, ...rest } = props;
2424
const { error, fieldProps, metadata } = useBooleanInputController(props);
2525

26+
const { onChange } = fieldProps;
2627
const handleChange = useCallback(
2728
(event: Event) => {
2829
const target = event.currentTarget as any;
29-
fieldProps.onChange(target.checked ?? false);
30+
onChange(target.checked ?? false);
3031
},
31-
[fieldProps.onChange]
32+
[onChange]
3233
);
3334

3435
// Ensure label is always a string - metadata.name should be string but TypeScript infers it could be ReactNode

0 commit comments

Comments
 (0)