From fb17e79466a64085c7776d2581912c4205eb5e75 Mon Sep 17 00:00:00 2001 From: Juanra GM Date: Tue, 5 Mar 2024 22:49:12 +0100 Subject: [PATCH] style: format files --- packages/codemod/src/actions/mui2suid.ts | 4 +- packages/material/src/Skeleton/Skeleton.tsx | 4 +- packages/material/src/transitions/utils.ts | 4 +- packages/system/src/createStyled.tsx | 4 +- packages/types/src/component.ts | 32 ++++++++-------- packages/types/src/misc.ts | 42 ++++++++++----------- packages/types/src/overridable.ts | 4 +- 7 files changed, 47 insertions(+), 47 deletions(-) diff --git a/packages/codemod/src/actions/mui2suid.ts b/packages/codemod/src/actions/mui2suid.ts index 192930b66..36fe8c106 100644 --- a/packages/codemod/src/actions/mui2suid.ts +++ b/packages/codemod/src/actions/mui2suid.ts @@ -79,8 +79,8 @@ export default async function mui2suid(options: { options.out === true ? defaultsOutPath : typeof options.out === "string" - ? join(outBasePath, options.out) - : undefined; + ? join(outBasePath, options.out) + : undefined; if (outPath && (await safeStat(outPath))) { if (outPath.endsWith("Test")) { diff --git a/packages/material/src/Skeleton/Skeleton.tsx b/packages/material/src/Skeleton/Skeleton.tsx index c1913520d..29b62a974 100644 --- a/packages/material/src/Skeleton/Skeleton.tsx +++ b/packages/material/src/Skeleton/Skeleton.tsx @@ -170,8 +170,8 @@ const Skeleton = $.component(function Skeleton({ typeof props.children === "undefined" ? false : Array.isArray(props.children) - ? !!props.children.length - : true; + ? !!props.children.length + : true; const ownerState = mergeProps(allProps, { get hasChildren() { diff --git a/packages/material/src/transitions/utils.ts b/packages/material/src/transitions/utils.ts index d8abb2c3d..a3294b7b7 100644 --- a/packages/material/src/transitions/utils.ts +++ b/packages/material/src/transitions/utils.ts @@ -35,8 +35,8 @@ export function getTransitionProps( (typeof timeout === "number" ? timeout : typeof timeout === "string" - ? 0 - : timeout[options.mode] || 0), + ? 0 + : timeout[options.mode] || 0), easing: style.transitionTimingFunction ?? (typeof easing === "object" ? easing[options.mode] : easing), diff --git a/packages/system/src/createStyled.tsx b/packages/system/src/createStyled.tsx index cc4611c94..753a31321 100644 --- a/packages/system/src/createStyled.tsx +++ b/packages/system/src/createStyled.tsx @@ -138,8 +138,8 @@ function createStyled< ? OverridableInProps : unknown : C extends OverridableComponent - ? OverridableInProps - : unknown, + ? OverridableInProps + : unknown, >( ...styles: Style< T, diff --git a/packages/types/src/component.ts b/packages/types/src/component.ts index 4be3dd665..f36de134f 100644 --- a/packages/types/src/component.ts +++ b/packages/types/src/component.ts @@ -20,34 +20,34 @@ export interface SuidElement { export type InferPropsType = T extends (props: infer PropsType) => any ? PropsType : T extends keyof JSX.IntrinsicElements - ? JSX.IntrinsicElements[T] - : never; + ? JSX.IntrinsicElements[T] + : never; export type PropsOf = T extends OverridableTypeMap ? DefaultComponentProps & { component?: ElementType } : T extends SuidComponentType - ? DefaultComponentProps - : T extends OverridableComponent - ? DefaultComponentProps & { component?: ElementType } - : T extends ElementType - ? _ComponentProps - : unknown; + ? DefaultComponentProps + : T extends OverridableComponent + ? DefaultComponentProps & { component?: ElementType } + : T extends ElementType + ? _ComponentProps + : unknown; export type InPropsOf = T extends OverridableTypeMap | SuidComponentType ? OverridableInProps : T extends OverridableComponent - ? OverridableInProps - : T extends ElementType - ? _ComponentProps - : unknown; + ? OverridableInProps + : T extends ElementType + ? _ComponentProps + : unknown; export type DefaultPropsOf = T extends OverridableTypeMap | SuidComponentType ? OverridableDefaultProps : T extends OverridableComponent - ? OverridableDefaultProps - : T extends ElementType - ? _ComponentProps - : unknown; + ? OverridableDefaultProps + : T extends ElementType + ? _ComponentProps + : unknown; export type OverridableDefaultProps = DoRequired< Partial< diff --git a/packages/types/src/misc.ts b/packages/types/src/misc.ts index 4b235dde6..a838c666f 100644 --- a/packages/types/src/misc.ts +++ b/packages/types/src/misc.ts @@ -27,31 +27,31 @@ export type DeepPartial = T extends | Date ? T | undefined : // Arrays, Sets and Maps and their readonly counterparts have their items made - // deeply partial, but their own instances are left untouched - T extends Array - ? Array> - : T extends ReadonlyArray - ? ReadonlyArray - : T extends Set - ? Set> - : T extends ReadonlySet - ? ReadonlySet - : T extends Map - ? Map, DeepPartial> - : T extends ReadonlyMap - ? ReadonlyMap, DeepPartial> - : // ...and finally, all other objects. - { - [K in keyof T]?: DeepPartial; - }; + // deeply partial, but their own instances are left untouched + T extends Array + ? Array> + : T extends ReadonlyArray + ? ReadonlyArray + : T extends Set + ? Set> + : T extends ReadonlySet + ? ReadonlySet + : T extends Map + ? Map, DeepPartial> + : T extends ReadonlyMap + ? ReadonlyMap, DeepPartial> + : // ...and finally, all other objects. + { + [K in keyof T]?: DeepPartial; + }; export type DeepReadonly = T extends (infer R)[] ? DeepReadonlyArray : T extends Function - ? T - : T extends object - ? DeepReadonlyObject - : T; + ? T + : T extends object + ? DeepReadonlyObject + : T; export interface DeepReadonlyArray extends ReadonlyArray> {} diff --git a/packages/types/src/overridable.ts b/packages/types/src/overridable.ts index 2e2502d83..5e0e632ae 100644 --- a/packages/types/src/overridable.ts +++ b/packages/types/src/overridable.ts @@ -80,8 +80,8 @@ export type DefaultComponentProps = M extends OverridableTypeMap keyof BaseProps > : M extends SuidComponentType - ? BaseProps - : never; + ? BaseProps + : never; /** * Props defined on the component.