Skip to content

Commit

Permalink
fix: eslint warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
edmundhung committed May 23, 2022
1 parent 0e0b63b commit 6a7e0d4
Show file tree
Hide file tree
Showing 16 changed files with 20 additions and 20 deletions.
3 changes: 2 additions & 1 deletion app/components/BookmarkDetails.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { ReactElement, useMemo } from 'react';
import type { ReactElement } from 'react';
import { useMemo } from 'react';
import { useLocation } from '@remix-run/react';
import { PaneContainer, PaneHeader, PaneContent, PaneFooter } from '~/layout';
import IconLink from '~/components/IconLink';
Expand Down
2 changes: 1 addition & 1 deletion app/components/CategoryIcon.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { ReactElement } from 'react';
import type { ReactElement } from 'react';
import SvgIcon from '~/components/SvgIcon';
import packageIcon from '~/icons/box-open.svg';
import repositoryIcon from '~/icons/map-signs.svg';
Expand Down
2 changes: 1 addition & 1 deletion app/components/ResourcesDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import {
} from '~/search';
import { PaneContainer, PaneHeader, PaneFooter, PaneContent } from '~/layout';
import FlashMessage from '~/components/FlashMessage';
import { User } from '~/types';
import type { User } from '~/types';
import IconLink from '~/components/IconLink';
import { isAdministrator } from '~/helpers';
import { useLists } from '~/hooks';
Expand Down
2 changes: 1 addition & 1 deletion app/components/SearchList.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
List,
PaneFooter,
} from '~/layout';
import { SearchOptions } from '~/types';
import type { SearchOptions } from '~/types';

interface SearchListProps {
searchOptions: SearchOptions;
Expand Down
2 changes: 1 addition & 1 deletion app/components/ShowMoreButton.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { Link } from '@remix-run/react';
import { useInView } from 'react-intersection-observer';
import { getResourceSearchParams } from '~/search';
import { SearchOptions } from '~/types';
import type { SearchOptions } from '~/types';
import { useEffect, useMemo, useRef } from 'react';

interface ShowMoreButtonProps {
Expand Down
4 changes: 2 additions & 2 deletions app/components/SidebarNavigation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,10 @@ import {
List,
} from '~/layout';
import { getResourceURL, getSearchOptions, toggleSearchParams } from '~/search';
import { SearchOptions } from '~/types';
import type { SearchOptions } from '~/types';
import IconLink from '~/components/IconLink';
import { isAdministrator, isMaintainer } from '~/helpers';
import { GuideMetadata } from '../../worker/types';
import type { GuideMetadata } from '../../worker/types';

interface ExternalLinkProps {
href: string;
Expand Down
2 changes: 1 addition & 1 deletion app/config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Category } from '~/types';
import type { Category } from '~/types';

export const categories: Category[] = ['package', 'repository', 'others'];

Expand Down
2 changes: 1 addition & 1 deletion app/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { administrators, maintainers } from '~/config';
import { Context } from '~/types';
import type { Context } from '~/types';

export function notFound(): Response {
const statusText = 'Not Found';
Expand Down
2 changes: 1 addition & 1 deletion app/hooks.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { useMatches } from '@remix-run/react';
import { GuideMetadata, SessionData } from '~/types';
import type { GuideMetadata, SessionData } from '~/types';

export function useSessionData(): SessionData {
const [rootMatch] = useMatches();
Expand Down
2 changes: 1 addition & 1 deletion app/resources.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { getSite } from '~/search';
import { SearchOptions, Resource, User } from '~/types';
import type { SearchOptions, Resource, User } from '~/types';

function calculateScore(resource: Resource): number {
const timeScore =
Expand Down
2 changes: 1 addition & 1 deletion app/routes/__layout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { json } from '@remix-run/cloudflare';
import clsx from 'clsx';
import Progress from '~/components/Progress';
import SidebarNavigation from '~/components/SidebarNavigation';
import { Context } from '~/types';
import type { Context } from '~/types';
import { useSessionData } from '~/hooks';

export let loader: LoaderFunction = async ({ context }) => {
Expand Down
2 changes: 1 addition & 1 deletion app/routes/__layout/submit.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { useMemo } from 'react';
import menuIcon from '~/icons/menu.svg';
import FlashMessage from '~/components/FlashMessage';
import { PaneContainer, PaneHeader, PaneFooter, PaneContent } from '~/layout';
import { Context } from '~/types';
import type { Context } from '~/types';
import { formatMeta, isMaintainer } from '~/helpers';
import { toggleSearchParams } from '~/search';
import IconLink from '~/components/IconLink';
Expand Down
2 changes: 1 addition & 1 deletion app/search.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { SearchOptions } from '~/types';
import type { SearchOptions } from '~/types';
import { platforms } from '~/config';
import { capitalize } from '~/helpers';

Expand Down
3 changes: 2 additions & 1 deletion playwright.config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { PlaywrightTestConfig, devices } from '@playwright/test';
import type { PlaywrightTestConfig } from '@playwright/test';
import { devices } from '@playwright/test';

const config: PlaywrightTestConfig = {
forbidOnly: !!process.env.CI,
Expand Down
6 changes: 2 additions & 4 deletions tests/setup.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
import { test as base, expect } from '@playwright/test';
import {
fixtures,
TestingLibraryFixtures,
} from '@playwright-testing-library/test/fixture';
import type { TestingLibraryFixtures } from '@playwright-testing-library/test/fixture';
import { fixtures } from '@playwright-testing-library/test/fixture';
import { Miniflare } from 'miniflare';
import { MockAgent, setGlobalDispatcher } from 'undici';

Expand Down
2 changes: 1 addition & 1 deletion worker/store/PageStore.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { scrapeHTML, getPageDetails, checkSafeBrowsingAPI } from '../scraping';
import { Env, Page, PageMetadata } from '../types';
import type { Env, Page, PageMetadata } from '../types';
import { configureStore, restoreStoreData } from '../utils';

type PageStatistics = Required<Pick<Page, 'bookmarkUsers' | 'viewCount'>>;
Expand Down

0 comments on commit 6a7e0d4

Please sign in to comment.