Format code

This commit is contained in:
Zoe Roux 2024-05-10 15:12:11 +02:00
parent bd71be580d
commit b0f9be17de
No known key found for this signature in database
13 changed files with 22 additions and 35 deletions

View File

@ -1,6 +1,6 @@
{ {
"extends": "expo/tsconfig.base", "extends": "expo/tsconfig.base",
"compilerOptions": { "compilerOptions": {
"strict": true, "strict": true
}, }
} }

View File

@ -2,9 +2,7 @@
"name": "web", "name": "web",
"version": "0.1.0", "version": "0.1.0",
"private": true, "private": true,
"sideEffects": [ "sideEffects": ["./src/polyfill.ts"],
"./src/polyfill.ts"
],
"scripts": { "scripts": {
"dev": "next dev", "dev": "next dev",
"build": "next build", "build": "next build",

View File

@ -16,9 +16,9 @@
"incremental": true, "incremental": true,
"baseUrl": ".", "baseUrl": ".",
"paths": { "paths": {
"~/*": ["src/*"], "~/*": ["src/*"]
}, }
}, },
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"], "include": ["next-env.d.ts", "**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"], "exclude": ["node_modules"]
} }

View File

@ -8,11 +8,7 @@
"lineEnding": "lf", "lineEnding": "lf",
"lineWidth": 100, "lineWidth": 100,
"attributePosition": "auto", "attributePosition": "auto",
"ignore": [ "ignore": ["**/.yarn/**", "**/.next/**", "**/.expo/**"]
"**/.yarn/**",
"**/.next/**",
"**/.expo/**"
]
}, },
"organizeImports": { "organizeImports": {
"enabled": true "enabled": true
@ -38,11 +34,7 @@
"noBannedTypes": "off" "noBannedTypes": "off"
} }
}, },
"ignore": [ "ignore": ["**/.yarn/**", "**/.next/**", "**/.expo/**"]
"**/.yarn/**",
"**/.next/**",
"**/.expo/**"
]
}, },
"javascript": { "javascript": {
"formatter": { "formatter": {

View File

@ -14,10 +14,7 @@
"format": "biome format .", "format": "biome format .",
"format:fix": "biome format . --write" "format:fix": "biome format . --write"
}, },
"workspaces": [ "workspaces": ["apps/*", "packages/*"],
"apps/*",
"packages/*"
],
"devDependencies": { "devDependencies": {
"@biomejs/biome": "1.7.3", "@biomejs/biome": "1.7.3",
"typescript": "5.3.3" "typescript": "5.3.3"

View File

@ -18,9 +18,9 @@
"incremental": true, "incremental": true,
"baseUrl": ".", "baseUrl": ".",
"paths": { "paths": {
"~/*": ["src/*"], "~/*": ["src/*"]
}, }
}, },
"include": ["**/*.ts", "**/*.tsx"], "include": ["**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"], "exclude": ["node_modules"]
} }

View File

@ -22,7 +22,7 @@ import { ComponentType } from "react";
import { View, ViewProps } from "react-native"; import { View, ViewProps } from "react-native";
import { percent, px, useYoshiki } from "yoshiki/native"; import { percent, px, useYoshiki } from "yoshiki/native";
export const Container = <AsProps = ViewProps,>({ export const Container = <AsProps = ViewProps>({
as, as,
...props ...props
}: { as?: ComponentType<AsProps> } & AsProps) => { }: { as?: ComponentType<AsProps> } & AsProps) => {

View File

@ -109,7 +109,7 @@ export const IconButton = forwardRef(function IconButton<AsProps = PressableProp
); );
}); });
export const IconFab = <AsProps = PressableProps,>( export const IconFab = <AsProps = PressableProps>(
props: ComponentProps<typeof IconButton<AsProps>>, props: ComponentProps<typeof IconButton<AsProps>>,
) => { ) => {
const { css, theme } = useYoshiki(); const { css, theme } = useYoshiki();

View File

@ -55,7 +55,7 @@ export const PosterBackground = ({
/> />
); );
export const ImageBackground = <AsProps = ViewProps,>({ export const ImageBackground = <AsProps = ViewProps>({
src, src,
alt, alt,
quality, quality,

View File

@ -18,9 +18,9 @@
"incremental": true, "incremental": true,
"baseUrl": ".", "baseUrl": ".",
"paths": { "paths": {
"~/*": ["src/*"], "~/*": ["src/*"]
}, }
}, },
"include": ["**/*.ts", "**/*.tsx"], "include": ["**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"], "exclude": ["node_modules"]
} }

View File

@ -37,7 +37,7 @@ export type WithLoading<Item> =
| (Item & { isLoading: false }) | (Item & { isLoading: false })
| (Partial<Item> & { isLoading: true }); | (Partial<Item> & { isLoading: true });
const isPage = <T = unknown,>(obj: unknown): obj is Page<T> => const isPage = <T = unknown>(obj: unknown): obj is Page<T> =>
(typeof obj === "object" && obj && "items" in obj) || false; (typeof obj === "object" && obj && "items" in obj) || false;
export const Fetch = <Data,>({ export const Fetch = <Data,>({

View File

@ -35,7 +35,7 @@ export * from "react-native-video";
import { Audio, Subtitle, useToken } from "@kyoo/models"; import { Audio, Subtitle, useToken } from "@kyoo/models";
import { IconButton, Menu } from "@kyoo/primitives"; import { IconButton, Menu } from "@kyoo/primitives";
import { ComponentProps, forwardRef, useEffect, } from "react"; import { ComponentProps, forwardRef, useEffect } from "react";
import { atom, useAtom, useAtomValue, useSetAtom } from "jotai"; import { atom, useAtom, useAtomValue, useSetAtom } from "jotai";
import NativeVideo, { import NativeVideo, {
VideoRef, VideoRef,

View File

@ -15,8 +15,8 @@
"resolveJsonModule": true, "resolveJsonModule": true,
"isolatedModules": true, "isolatedModules": true,
"jsx": "react-jsx", "jsx": "react-jsx",
"incremental": true, "incremental": true
}, },
"include": ["**/*.ts", "**/*.tsx"], "include": ["**/*.ts", "**/*.tsx"],
"exclude": ["node_modules"], "exclude": ["node_modules"]
} }