From 2a05ca0aaea271cf642d234931fc39ebbe620c66 Mon Sep 17 00:00:00 2001 From: Andrew Bierman <94939237+andrew-bierman@users.noreply.github.com> Date: Sun, 16 Jun 2024 21:11:00 -0400 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=A8=20linting?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/app/components/card/CustomCard.tsx | 2 +- .../dashboard/QuickActionButton.tsx | 2 +- .../app/components/feed/FeedSearchFilter.tsx | 18 ++++---- .../app/components/map/MapButtonsOverlay.tsx | 2 +- .../app/components/map/NativeMap.native.tsx | 8 +++- .../components/navigation/NavigationList.tsx | 2 +- packages/app/screens/dashboard/index.tsx | 10 ++--- packages/crosspath/types/lib-interface.d.ts | 4 +- packages/crosspath/types/model/types.d.ts | 41 +++++++++++-------- .../ui/src/Bento/elements/tables/Basic.tsx | 4 +- 10 files changed, 55 insertions(+), 38 deletions(-) diff --git a/packages/app/components/card/CustomCard.tsx b/packages/app/components/card/CustomCard.tsx index 3b417e0c8..6780b8fa9 100644 --- a/packages/app/components/card/CustomCard.tsx +++ b/packages/app/components/card/CustomCard.tsx @@ -72,7 +72,7 @@ export const CustomCard = ({ )} - {type === 'pack' && authUser?.id === data.owner_id? ( + {type === 'pack' && authUser?.id === data.owner_id ? ( <> { }, text: { fontSize: 13, - fontWeight:'bold', + fontWeight: 'bold', color: currentTheme.colors.iconColor, }, }; diff --git a/packages/app/components/feed/FeedSearchFilter.tsx b/packages/app/components/feed/FeedSearchFilter.tsx index a54e03e29..e94caba0d 100644 --- a/packages/app/components/feed/FeedSearchFilter.tsx +++ b/packages/app/components/feed/FeedSearchFilter.tsx @@ -69,11 +69,15 @@ const FeedSearchFilter = ({
- + @@ -135,7 +139,7 @@ const FeedSearchFilter = ({ @@ -224,4 +228,4 @@ const loadStyles = (theme: any) => { }; }; -export default FeedSearchFilter; \ No newline at end of file +export default FeedSearchFilter; diff --git a/packages/app/components/map/MapButtonsOverlay.tsx b/packages/app/components/map/MapButtonsOverlay.tsx index 73d4199ce..8832ca6f9 100644 --- a/packages/app/components/map/MapButtonsOverlay.tsx +++ b/packages/app/components/map/MapButtonsOverlay.tsx @@ -334,7 +334,7 @@ const loadStyles = (theme) => { downloadText: { fontSize: 15, fontWeight: '500', - marginRight:8 + marginRight: 8, }, modal: { alignItems: 'center', diff --git a/packages/app/components/map/NativeMap.native.tsx b/packages/app/components/map/NativeMap.native.tsx index 7c1db095f..aa242f698 100644 --- a/packages/app/components/map/NativeMap.native.tsx +++ b/packages/app/components/map/NativeMap.native.tsx @@ -299,7 +299,13 @@ function NativeMap({ shape: shapeProp }) { /> - + = ({ style={{ width: '100%', borderRadius: 8, - marginBottom: isMobileView ? 6:0, + marginBottom: isMobileView ? 6 : 0, backgroundColor: currentTheme.colors.background, color: currentTheme.colors.white, }} diff --git a/packages/app/screens/dashboard/index.tsx b/packages/app/screens/dashboard/index.tsx index 9047cf261..13b560ed4 100644 --- a/packages/app/screens/dashboard/index.tsx +++ b/packages/app/screens/dashboard/index.tsx @@ -59,11 +59,11 @@ const loadStyles = (theme) => { alignItems: 'stretch', paddingHorizontal: 20, width: - Platform.OS === 'web' - ? screenWidth <= SCREEN_WIDTH - ? '100vw' - : '90vw' - : '100%', + Platform.OS === 'web' + ? screenWidth <= SCREEN_WIDTH + ? '100vw' + : '90vw' + : '100%', }, cardContainer: { flexDirection: 'column', diff --git a/packages/crosspath/types/lib-interface.d.ts b/packages/crosspath/types/lib-interface.d.ts index 524b24431..acf8c94d3 100644 --- a/packages/crosspath/types/lib-interface.d.ts +++ b/packages/crosspath/types/lib-interface.d.ts @@ -1,4 +1,6 @@ import { LinkComponent, Router, CreateParam } from './model'; -export declare function Link(props: Parameters): ReturnType; +export declare function Link( + props: Parameters, +): ReturnType; export declare const createParam: CreateParam; export declare function useRouter(): Router; diff --git a/packages/crosspath/types/model/types.d.ts b/packages/crosspath/types/model/types.d.ts index 9c3ee437d..5e7b7414e 100644 --- a/packages/crosspath/types/model/types.d.ts +++ b/packages/crosspath/types/model/types.d.ts @@ -1,27 +1,32 @@ import { FC } from 'react'; import { LinkProps } from 'solito/link'; export interface CreateParamOptions { - initial?: string; - parse?: (param: string) => unknown; - stringify?: (param: unknown) => string; + initial?: string; + parse?: (param: string) => unknown; + stringify?: (param: unknown) => string; } export interface Router { - push: (url: URL) => void; - replace: (url: URL) => void; - back: () => void; + push: (url: URL) => void; + replace: (url: URL) => void; + back: () => void; } export type LinkComponent = FC; -export type URL = string | { - pathname?: string; - query?: Record; - state?: Record; - hash?: string; - as?: string | object; -}; -export type CreateParam = () => { - useParam: (key: keyof T, options?: CreateParamOptions) => [value: any, setValue: (value: any) => void]; - useParams: (key: keyof T) => { - params: T; - setParams: (value: any) => void; +export type URL = + | string + | { + pathname?: string; + query?: Record; + state?: Record; + hash?: string; + as?: string | object; }; +export type CreateParam = () => { + useParam: ( + key: keyof T, + options?: CreateParamOptions, + ) => [value: any, setValue: (value: any) => void]; + useParams: (key: keyof T) => { + params: T; + setParams: (value: any) => void; + }; }; diff --git a/packages/ui/src/Bento/elements/tables/Basic.tsx b/packages/ui/src/Bento/elements/tables/Basic.tsx index dcfd7ad2c..7ee30baf4 100644 --- a/packages/ui/src/Bento/elements/tables/Basic.tsx +++ b/packages/ui/src/Bento/elements/tables/Basic.tsx @@ -152,7 +152,7 @@ export function BasicTable({ header: () => 'Category', cell: (info) => info.getValue(), // footer: (info) => 'category', - }) + }), ]; if (hasPermissions) { @@ -161,7 +161,7 @@ export function BasicTable({ id: 'actions', cell: (props) => , header: () => 'Actions', - }) + }), ); }