Skip to content

Commit

Permalink
Merge pull request #233 from Suwayomi/main
Browse files Browse the repository at this point in the history
lint
  • Loading branch information
Robonau authored Oct 24, 2024
2 parents 8068534 + aeb321a commit 2b223dd
Show file tree
Hide file tree
Showing 23 changed files with 12 additions and 65 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
- name: Use bun latest
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
bun-version: 1.1.0
- name: Install bun dependencies
run: bun i
- run: bun run build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Use bun latest
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
bun-version: 1.1.0
- name: Install bun dependencies
run: bun i
- name: Run check
Expand All @@ -37,7 +37,7 @@ jobs:
- name: Use bun latest
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
bun-version: 1.1.0
- name: Install bun dependencies
run: bun i
- name: Run build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
- name: Use bun latest
uses: oven-sh/setup-bun@v1
with:
bun-version: latest
bun-version: 1.1.0
- name: Install bun dependencies
run: bun i
- name: Run linters
Expand Down
4 changes: 1 addition & 3 deletions src/app.html
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@
%sveltekit.head%
</head>
<body data-sveltekit-preload-data="hover" data-theme="skeleton">
<div style="display: contents">
%sveltekit.body%
</div>
<div style="display: contents">%sveltekit.body%</div>
</body>
</html>
2 changes: 0 additions & 2 deletions src/lib/components/Slide.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
-->

<script lang="ts">
import { run } from 'svelte/legacy';
import IconWrapper from './IconWrapper.svelte';
// Types
Expand Down
26 changes: 3 additions & 23 deletions src/lib/components/TriStateSlide.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,12 @@
-->

<script lang="ts">
import { run, createBubbler } from 'svelte/legacy';
const bubble = createBubbler();
import IconWrapper from './IconWrapper.svelte';
import { createEventDispatcher } from 'svelte';
// Types
import type { CssClasses, SvelteEvent } from '@skeletonlabs/skeleton';
import type { TriState } from '$lib/util';
// Event Dispatcher
type SlideToggleEvent = {
keyup: SvelteEvent<KeyboardEvent, HTMLDivElement>;
changeE: boolean;
};
const dispatch = createEventDispatcher<SlideToggleEvent>();
// Props
// Props (a11y)
// Base Styles
const cBase = 'inline-block';
const cLabel = 'unstyled flex items-center';
Expand All @@ -52,7 +37,7 @@
if (['Enter', 'Space'].includes(event.code)) {
event.preventDefault();
/** @event {{ event }} keyup Fires when the component is focused and key is pressed. */
dispatch('keyup', event);
onkeyup(event);
const inputElem = event.currentTarget.firstChild as HTMLLabelElement;
inputElem.click();
}
Expand Down Expand Up @@ -99,6 +84,7 @@
state?: TriState;
children?: import('svelte').Snippet;
onchange?: (e: boolean) => void;
onkeyup?: (e: SvelteEvent<KeyboardEvent, HTMLDivElement>) => void;
[key: string]: unknown;
}
Expand All @@ -116,6 +102,7 @@
label = '',
state: Lstate = $bindable(checked === null ? 0 : checked ? 1 : 2),
onchange = () => {},
onkeyup = () => {},
children,
...rest
}: Props = $props();
Expand Down Expand Up @@ -197,13 +184,6 @@
bind:checked
{name}
onclick={handelClick}
onkeydown={bubble('keydown')}
onkeyup={bubble('keyup')}
onkeypress={bubble('keypress')}
onmouseover={bubble('mouseover')}
onchange={bubble('change')}
onfocus={bubble('focus')}
onblur={bubble('blur')}
{...prunedRestProps()}
disabled={rest.disabled as boolean | undefined | null}
/>
Expand Down
2 changes: 1 addition & 1 deletion src/routes/(app)/(library)/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -214,7 +214,7 @@
let orderedCategories = $derived(
($categories.data?.categories?.nodes ?? [])
.filter((e) => e.mangas.totalCount)
.toSorted((a, b) => {
.sort((a, b) => {
return a.order > b.order ? 1 : -1;
})
);
Expand Down
2 changes: 0 additions & 2 deletions src/routes/(app)/browse/globalSearch.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
-->

<script lang="ts">
import { run } from 'svelte/legacy';
import GlobalSearchActions from './globalsearch/GlobalSearchActions.svelte';
import PQueue from 'p-queue';
import { queryParam, ssp } from 'sveltekit-search-params';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
-->

<script lang="ts">
import { run } from 'svelte/legacy';
import { AppBarData } from '$lib/MountTitleAction';
import IntersectionObserver from '$lib/components/IntersectionObserver.svelte';
import MangaCard from '$lib/components/MangaCard.svelte';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
-->

<script lang="ts">
import { run } from 'svelte/legacy';
import Slide from '$lib/components/Slide.svelte';
import type { fetchSourceManga } from '$lib/gql/Mutations';
import type { getSource } from '$lib/gql/Queries';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
-->

<script lang="ts">
import { run } from 'svelte/legacy';
import type { fetchSourceManga } from '$lib/gql/Mutations';
import type { getSource } from '$lib/gql/Queries';
import type { ResultOf, VariablesOf } from '$lib/gql/graphql';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
-->

<script lang="ts">
import { run } from 'svelte/legacy';
import Slide from '$lib/components/Slide.svelte';
import { AccordionItem } from '@skeletonlabs/skeleton';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
-->

<script lang="ts">
import { run } from 'svelte/legacy';
import type { fetchSourceManga } from '$lib/gql/Mutations';
import type { getSource } from '$lib/gql/Queries';
import type { ResultOf, VariablesOf } from '$lib/gql/graphql';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
-->

<script lang="ts">
import { run } from 'svelte/legacy';
import TriStateSlide from '$lib/components/TriStateSlide.svelte';
import type { TriState } from '$lib/util';
import type { getSource } from '$lib/gql/Queries';
Expand Down
1 change: 0 additions & 1 deletion src/routes/(app)/history/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
import { AppBarData } from '$lib/MountTitleAction';
import { getContextClient, queryStore } from '@urql/svelte';
import { History } from '$lib/gql/Queries';
import { writable } from 'svelte/store';
import type { ResultOf } from '$lib/gql/graphql';
import { formatDate, gridValues } from '$lib/util';
import MangaCard from '$lib/components/MangaCard.svelte';
Expand Down
2 changes: 0 additions & 2 deletions src/routes/(app)/manga/[MangaID]/(manga)/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
-->

<script lang="ts">
import { run } from 'svelte/legacy';
import { AppBarData } from '$lib/MountTitleAction';
import { ErrorHelpUntyped } from '$lib/util';
import type { PageData } from './$types';
Expand Down
2 changes: 0 additions & 2 deletions src/routes/(app)/manga/[MangaID]/(manga)/TrackingModal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
-->

<script lang="ts">
import { run } from 'svelte/legacy';
import Image from '$lib/components/Image.svelte';
import { TrackRecordTypeFragment } from '$lib/gql/Fragments';
import {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
-->

<script lang="ts">
import { run } from 'svelte/legacy';
import IconButton from '$lib/components/IconButton.svelte';
import { getDrawerStore, AppShell } from '@skeletonlabs/skeleton';
import type { LayoutData } from './$types';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
-->

<script lang="ts">
import { run } from 'svelte/legacy';
import { goto } from '$app/navigation';
import { page } from '$app/stores';
import { AppBarData } from '$lib/MountTitleAction';
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,10 +81,10 @@
const _ = [mangaMeta, $manga];
const tmp = untrack(() => {
return $manga.data?.manga.chapters.nodes
.toSorted((a, b) => {
.filter(filterChapters(mangaMeta, true))
.sort((a, b) => {
return b.sourceOrder - a.sourceOrder;
})
.filter(filterChapters(mangaMeta, true));
});
});
untrack(() => {
manga.resume();
Expand Down
2 changes: 0 additions & 2 deletions src/routes/(app)/settings/BackupModal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
-->

<script lang="ts">
import { run } from 'svelte/legacy';
import { ErrorHelp } from '$lib/util';
import {
FileDropzone,
Expand Down
2 changes: 0 additions & 2 deletions src/routes/(app)/updates/+page.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
-->

<script lang="ts">
import { run } from 'svelte/legacy';
import UpdatesActions from './UpdatesActions.svelte';
import { AppBarData } from '$lib/MountTitleAction';
import { writable } from 'svelte/store';
Expand Down
2 changes: 0 additions & 2 deletions src/routes/QuickSearchModal.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
-->

<script lang="ts">
import { run } from 'svelte/legacy';
import Image from '../lib/components/Image.svelte';
import { getModalStore } from '@skeletonlabs/skeleton';
import IconWrapper from '../lib/components/IconWrapper.svelte';
Expand Down

0 comments on commit 2b223dd

Please sign in to comment.