Skip to content

Commit

Permalink
chore(devdeps): update dependency @scaleway/eslint-config-react to v5
Browse files Browse the repository at this point in the history
Signed-off-by: Alexandre Philibeaux <[email protected]>
  • Loading branch information
renovate[bot] authored and philibea committed Dec 29, 2024
1 parent 7eb09e8 commit de5f5a6
Show file tree
Hide file tree
Showing 7 changed files with 213 additions and 219 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
"@eslint/eslintrc": "3.2.0",
"@manypkg/cli": "0.23.0",
"@playwright/test": "1.49.1",
"@scaleway/eslint-config-react": "4.0.9",
"@scaleway/eslint-config-react": "5.2.1",
"@scaleway/tsconfig": "1.1.1",
"@size-limit/file": "11.1.6",
"@size-limit/preset-big-lib": "11.1.6",
Expand Down
3 changes: 3 additions & 0 deletions packages/form/src/components/SelectInputField/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,9 @@ export type SelectInputFieldProps<
const identity = (x: unknown) => x
// const identity = <T,>(x: T) => x

/**
* @deprecated use SelectInputFieldV2 component instead
*/
export const SelectInputField = <
TFieldValues extends FieldValues,
TFieldName extends FieldPath<TFieldValues> = FieldPath<TFieldValues>,
Expand Down
1 change: 0 additions & 1 deletion packages/form/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
/* eslint-disable eslint-comments/disable-enable-pair */
/* eslint-disable no-restricted-syntax */
/* eslint-disable import/export */

export * from './components'
export type { BaseFieldProps, FormErrors } from './types'
Expand Down
1 change: 1 addition & 0 deletions packages/plus/src/components/EstimateCost/EstimateCost.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,7 @@ const Ellipsis = ({
'data-testid'?: string
}) => {
const { isOverlay } = useOverlay()
// eslint-disable-next-line @typescript-eslint/no-base-to-string
const text = Children.toArray(children).join('').toString()

return (
Expand Down
16 changes: 8 additions & 8 deletions packages/ui/src/components/Dialog/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -105,19 +105,19 @@ export const BaseDialog = ({
placement={placement}
size={DIALOG_SIZE}
>
{typeof children === 'function' ? (
modalProps => (
{modalProps =>
typeof children === 'function' ? (
<DialogContext.Provider value={contextValue}>
{headerContent}
{children(modalProps)}
</DialogContext.Provider>
) : (
<DialogContext.Provider value={contextValue}>
{headerContent}
{children}
</DialogContext.Provider>
)
) : (
<DialogContext.Provider value={contextValue}>
{headerContent}
{children}
</DialogContext.Provider>
)}
}
</StyledModal>
)
}
Expand Down
30 changes: 17 additions & 13 deletions packages/ui/src/components/SelectInput/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -693,19 +693,23 @@ const FwdSelectInput = ({
const selectOptions = useMemo(
() =>
options ||
Children.toArray(children).reduce<SelectOption[]>((acc, child) => {
if (React.isValidElement<{ children: string; value: string }>(child)) {
return [
...acc,
{
...child.props,
label: child.props.children,
},
]
}

return acc
}, []),
Children.toArray(children)
.flat()
.reduce<SelectOption[]>((acc, child) => {
if (
React.isValidElement<{ children: string; value: string }>(child)
) {
return [
...acc,
{
...child.props,
label: child.props.children,
},
]
}

return acc

Check warning on line 711 in packages/ui/src/components/SelectInput/index.tsx

View check run for this annotation

Codecov / codecov/patch

packages/ui/src/components/SelectInput/index.tsx#L711

Added line #L711 was not covered by tests
}, []),
[options, children],
)

Expand Down
Loading

0 comments on commit de5f5a6

Please sign in to comment.