Lint code

This commit is contained in:
Zoe Roux 2023-09-02 17:47:43 +02:00
parent b89617d125
commit 68b4e71281
No known key found for this signature in database
6 changed files with 17 additions and 14 deletions

View File

@ -22,6 +22,7 @@ using System.Threading.Tasks;
using Kyoo.Abstractions.Controllers; using Kyoo.Abstractions.Controllers;
using Kyoo.Core.Controllers; using Kyoo.Core.Controllers;
using Kyoo.Postgresql; using Kyoo.Postgresql;
using Moq;
using Xunit.Abstractions; using Xunit.Abstractions;
namespace Kyoo.Tests.Database namespace Kyoo.Tests.Database
@ -37,16 +38,18 @@ namespace Kyoo.Tests.Database
{ {
Context = new PostgresTestContext(postgres, output); Context = new PostgresTestContext(postgres, output);
CollectionRepository collection = new(_NewContext()); Mock<ThumbnailsManager> thumbs = new();
StudioRepository studio = new(_NewContext()); CollectionRepository collection = new(_NewContext(), thumbs.Object);
StudioRepository studio = new(_NewContext(), thumbs.Object);
PeopleRepository people = new(_NewContext(), PeopleRepository people = new(_NewContext(),
new Lazy<IShowRepository>(() => LibraryManager.ShowRepository)); new Lazy<IShowRepository>(() => LibraryManager.ShowRepository),
MovieRepository movies = new(_NewContext(), studio, people); thumbs.Object);
ShowRepository show = new(_NewContext(), studio, people); MovieRepository movies = new(_NewContext(), studio, people, thumbs.Object);
SeasonRepository season = new(_NewContext(), show); ShowRepository show = new(_NewContext(), studio, people, thumbs.Object);
LibraryItemRepository libraryItem = new(_NewContext()); SeasonRepository season = new(_NewContext(), show, thumbs.Object);
EpisodeRepository episode = new(_NewContext(), show); LibraryItemRepository libraryItem = new(_NewContext(), thumbs.Object);
UserRepository user = new(_NewContext()); EpisodeRepository episode = new(_NewContext(), show, thumbs.Object);
UserRepository user = new(_NewContext(), thumbs.Object);
LibraryManager = new LibraryManager(new IBaseRepository[] { LibraryManager = new LibraryManager(new IBaseRepository[] {
libraryItem, libraryItem,

View File

@ -61,7 +61,7 @@ export const Icon = ({ icon: Icon, color, size = 24, ...props }: IconProps) => {
); );
}; };
export const IconButton = forwardRef(function _IconButton<AsProps = PressableProps>( export const IconButton = forwardRef(function IconButton<AsProps = PressableProps>(
{ {
icon, icon,
size, size,

View File

@ -31,7 +31,7 @@ export const Input = forwardRef<
variant?: "small" | "big"; variant?: "small" | "big";
right?: ReactNode; right?: ReactNode;
} & TextInputProps } & TextInputProps
>(function _Input({ style, placeholderTextColor, variant = "small", right, ...props }, ref) { >(function Input({ style, placeholderTextColor, variant = "small", right, ...props }, ref) {
const { css, theme } = useYoshiki(); const { css, theme } = useYoshiki();
return ( return (

View File

@ -60,7 +60,7 @@ export const A = ({
); );
}; };
export const PressableFeedback = forwardRef<View, PressableProps>(function _Feedback( export const PressableFeedback = forwardRef<View, PressableProps>(function Feedback(
{ children, ...props }, { children, ...props },
ref, ref,
) { ) {

View File

@ -41,7 +41,7 @@ import { Layout, SortBy, SortOrd } from "./types";
import { forwardRef } from "react"; import { forwardRef } from "react";
import { View, PressableProps } from "react-native"; import { View, PressableProps } from "react-native";
const SortTrigger = forwardRef<View, PressableProps & { sortKey: SortBy }>(function _SortTrigger( const SortTrigger = forwardRef<View, PressableProps & { sortKey: SortBy }>(function SortTrigger(
{ sortKey, ...props }, { sortKey, ...props },
ref, ref,
) { ) {

View File

@ -70,7 +70,7 @@ const { useParam } = createParam<{ q?: string }>();
const SearchBar = forwardRef< const SearchBar = forwardRef<
TextInput, TextInput,
{ onBlur?: (value: string | undefined) => void } & Stylable { onBlur?: (value: string | undefined) => void } & Stylable
>(function _SearchBar({ onBlur, ...props }, ref) { >(function SearchBar({ onBlur, ...props }, ref) {
const { css, theme } = useYoshiki(); const { css, theme } = useYoshiki();
const { t } = useTranslation(); const { t } = useTranslation();
const { push, replace, back } = useRouter(); const { push, replace, back } = useRouter();