Skip to content

Commit

Permalink
(Lint): fix linting
Browse files Browse the repository at this point in the history
  • Loading branch information
wcordelo committed Mar 1, 2024
1 parent 6c04d60 commit be56eb4
Show file tree
Hide file tree
Showing 174 changed files with 1,792 additions and 1,773 deletions.
5 changes: 3 additions & 2 deletions apps/api/src/helpers/oembed/constructIframe.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import type { Document } from 'linkedom/types/interface/document';
import { COMMON_REGEX } from './regex';
import type { Document } from 'linkedom/types/interface/document'

import { COMMON_REGEX } from './regex'

const ALLOWED_EMBEDS = [
'youtube.com',
Expand Down
4 changes: 2 additions & 2 deletions apps/api/src/helpers/oembed/extractOgTags.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import type { Document } from 'linkedom/types/interface/document';
import type { Document } from 'linkedom/types/interface/document'

import constructIframe from './constructIframe';
import constructIframe from './constructIframe'

const extractOgTags = async (document: Document) => {
const titleTag = document.querySelector('title')
Expand Down
30 changes: 15 additions & 15 deletions apps/api/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
import { Hono } from 'hono';
import { cors } from 'hono/cors';
import { Hono } from 'hono'
import { cors } from 'hono/cors'

import allowedTokens from './routes/allowed-tokens';
import did from './routes/did';
import gateway from './routes/gateway';
import metadata from './routes/metadata';
import oembed from './routes/oembed';
import recommendations from './routes/recommendations';
import signup from './routes/signup';
import sts from './routes/sts';
import tail from './routes/tail';
import toggles from './routes/toggles';
import tower from './routes/tower';
import verified from './routes/verified';
import views from './routes/views';
import allowedTokens from './routes/allowed-tokens'
import did from './routes/did'
import gateway from './routes/gateway'
import metadata from './routes/metadata'
import oembed from './routes/oembed'
import recommendations from './routes/recommendations'
import signup from './routes/signup'
import sts from './routes/sts'
import tail from './routes/tail'
import toggles from './routes/toggles'
import tower from './routes/tower'
import verified from './routes/verified'
import views from './routes/views'

const app = new Hono()

Expand Down
16 changes: 8 additions & 8 deletions apps/api/src/routes/oembed.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { zValidator } from '@hono/zod-validator';
import { Hono } from 'hono';
import { cache } from 'hono/cache';
import { parseHTML } from 'linkedom';
import { object, string } from 'zod';
import { zValidator } from '@hono/zod-validator'
import { Hono } from 'hono'
import { cache } from 'hono/cache'
import { parseHTML } from 'linkedom'
import { object, string } from 'zod'

import { ERROR_MESSAGE } from '@/helpers/constants';
import extractOgTags from '@/helpers/oembed/extractOgTags';
import { COMMON_REGEX } from '@/helpers/oembed/regex';
import { ERROR_MESSAGE } from '@/helpers/constants'
import extractOgTags from '@/helpers/oembed/extractOgTags'
import { COMMON_REGEX } from '@/helpers/oembed/regex'

type Bindings = {
LIVEPEER_API_TOKEN: string
Expand Down
6 changes: 3 additions & 3 deletions apps/api/src/routes/sts.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import { AssumeRoleCommand, STSClient } from '@aws-sdk/client-sts';
import { Hono } from 'hono';
import { AssumeRoleCommand, STSClient } from '@aws-sdk/client-sts'
import { Hono } from 'hono'

import { ERROR_MESSAGE } from '@/helpers/constants';
import { ERROR_MESSAGE } from '@/helpers/constants'

type Bindings = {
EVER_ACCESS_KEY: string
Expand Down
18 changes: 9 additions & 9 deletions apps/api/src/routes/tower.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { ALL_EVENTS } from '@dragverse/generic/events';
import { zValidator } from '@hono/zod-validator';
import { Hono } from 'hono';
import UAParser from 'ua-parser-js';
import type { z } from 'zod';
import { any, object, string } from 'zod';

import { ERROR_MESSAGE } from '@/helpers/constants';
import checkEventExistence from '@/helpers/tower/checkEventExistence';
import { ALL_EVENTS } from '@dragverse/generic/events'
import { zValidator } from '@hono/zod-validator'
import { Hono } from 'hono'
import UAParser from 'ua-parser-js'
import type { z } from 'zod'
import { any, object, string } from 'zod'

import { ERROR_MESSAGE } from '@/helpers/constants'
import checkEventExistence from '@/helpers/tower/checkEventExistence'

type Bindings = {
INGEST_REST_ENDPOINT: string
Expand Down
20 changes: 10 additions & 10 deletions apps/embed/src/components/Audio.tsx
Original file line number Diff line number Diff line change
@@ -1,22 +1,22 @@
import { useAverageColor } from '@dragverse/browser';
import { useAverageColor } from '@dragverse/browser'
import {
STATIC_ASSETS,
TAPE_APP_NAME,
TAPE_WEBSITE_URL
} from '@dragverse/constants';
} from '@dragverse/constants'
import {
EVENTS,
Tower,
getPublicationData,
getThumbnailUrl,
imageCdn,
sanitizeDStorageUrl
} from '@dragverse/generic';
import type { PrimaryPublication } from '@dragverse/lens';
import { AudioPlayer, PauseOutline, PlayOutline } from '@dragverse/ui';
import Link from 'next/link';
import type { FC } from 'react';
import { useState } from 'react';
sanitizeDStorageUrl,
Tower
} from '@dragverse/generic'
import type { PrimaryPublication } from '@dragverse/lens'
import { AudioPlayer, PauseOutline, PlayOutline } from '@dragverse/ui'
import Link from 'next/link'
import type { FC } from 'react'
import { useState } from 'react'

type Props = {
audio: PrimaryPublication
Expand Down
16 changes: 8 additions & 8 deletions apps/embed/src/components/Publication.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ import {
setFingerprint,
tapeFont,
videoPlayerTheme
} from '@dragverse/browser';
import { getPublication, isListenable } from '@dragverse/generic';
import type { AnyPublication } from '@dragverse/lens';
import { LivepeerConfig } from '@livepeer/react';
import type { FC } from 'react';
import { useEffect } from 'react';
} from '@dragverse/browser'
import { getPublication, isListenable } from '@dragverse/generic'
import type { AnyPublication } from '@dragverse/lens'
import { LivepeerConfig } from '@livepeer/react'
import type { FC } from 'react'
import { useEffect } from 'react'

import Audio from './Audio';
import Video from './Video';
import Audio from './Audio'
import Video from './Video'

type Props = {
publication: AnyPublication
Expand Down
34 changes: 17 additions & 17 deletions apps/embed/src/components/TopOverlay.tsx
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
import { useCopyToClipboard } from '@dragverse/browser';
import { useCopyToClipboard } from '@dragverse/browser'
import {
STATIC_ASSETS,
TAPE_APP_NAME,
TAPE_WEBSITE_URL
} from '@dragverse/constants';
STATIC_ASSETS,
TAPE_APP_NAME,
TAPE_WEBSITE_URL
} from '@dragverse/constants'
import {
EVENTS,
Tower,
getProfile,
getProfilePicture,
getPublicationData
} from '@dragverse/generic';
import type { PrimaryPublication } from '@dragverse/lens';
import { CopyOutline } from '@dragverse/ui';
import Link from 'next/link';
import type { FC } from 'react';
import { useEffect, useState } from 'react';
EVENTS,
getProfile,
getProfilePicture,
getPublicationData,
Tower
} from '@dragverse/generic'
import type { PrimaryPublication } from '@dragverse/lens'
import { CopyOutline } from '@dragverse/ui'
import Link from 'next/link'
import type { FC } from 'react'
import { useEffect, useState } from 'react'

type OverlayProps = {
playerRef: HTMLMediaElement | undefined
Expand Down Expand Up @@ -101,7 +101,7 @@ const TopOverlay: FC<OverlayProps> = ({ playerRef, video }) => {
</div>
<div className="absolute bottom-2 right-0 md:bottom-4">
<Link
className="flex items-center space-x-1.5 rounded-l-full bg-brand-850/50 px-3 py-1.5 text-white"
className="bg-brand-850/50 flex items-center space-x-1.5 rounded-l-full px-3 py-1.5 text-white"
title={`Watch on ${TAPE_APP_NAME}`}
href={`${TAPE_WEBSITE_URL}/watch/${video?.id}`}
target="_blank"
Expand Down
22 changes: 11 additions & 11 deletions apps/embed/src/components/Video.tsx
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
'use client'

import { tw, useAverageColor } from '@dragverse/browser';
import { LENSTUBE_BYTES_APP_ID } from '@dragverse/constants';
import { tw, useAverageColor } from '@dragverse/browser'
import { LENSTUBE_BYTES_APP_ID } from '@dragverse/constants'
import {
EVENTS,
Tower,
getPublicationMediaUrl,
getShouldUploadVideo,
getThumbnailUrl,
imageCdn,
sanitizeDStorageUrl
} from '@dragverse/generic';
import type { PrimaryPublication } from '@dragverse/lens';
import { PlayOutline, VideoPlayer } from '@dragverse/ui';
import { useSearchParams } from 'next/navigation';
import type { FC } from 'react';
import { useEffect, useState } from 'react';
sanitizeDStorageUrl,
Tower
} from '@dragverse/generic'
import type { PrimaryPublication } from '@dragverse/lens'
import { PlayOutline, VideoPlayer } from '@dragverse/ui'
import { useSearchParams } from 'next/navigation'
import type { FC } from 'react'
import { useEffect, useState } from 'react'

import TopOverlay from './TopOverlay';
import TopOverlay from './TopOverlay'

type Props = {
video: PrimaryPublication
Expand Down
2 changes: 1 addition & 1 deletion apps/og/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"export": "next export",
"start": "yarn build && next start --port 4002",
"typecheck": "tsc --pretty",
"lint": "eslint . --ext .js,.ts,.tsx"
"lint": "eslint . --ext .js,.ts,.tsx --fix"
},
"dependencies": {
"next": "14.1.0",
Expand Down
8 changes: 4 additions & 4 deletions apps/og/src/app/u/[handle]/page.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {
LENS_NAMESPACE_PREFIX,
TAPE_APP_DESCRIPTION,
TAPE_APP_NAME,
TAPE_WEBSITE_URL
LENS_NAMESPACE_PREFIX,
TAPE_APP_DESCRIPTION,
TAPE_APP_NAME,
TAPE_WEBSITE_URL
} from '@dragverse/constants'
import { getProfile, getProfilePicture } from '@dragverse/generic'
import type { Profile } from '@dragverse/lens'
Expand Down
16 changes: 8 additions & 8 deletions apps/og/src/app/watch/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,20 +5,20 @@ import {
TAPE_WEBSITE_URL,
TAPE_X_HANDLE,
WORKER_OEMBED_URL
} from '@dragverse/constants';
} from '@dragverse/constants'
import {
getProfile,
getPublication,
getPublicationData,
truncate
} from '@dragverse/generic';
import type { AnyPublication } from '@dragverse/lens';
import { PublicationDocument } from '@dragverse/lens';
import { apolloClient } from '@dragverse/lens/apollo';
import type { Metadata } from 'next';
} from '@dragverse/generic'
import type { AnyPublication } from '@dragverse/lens'
import { PublicationDocument } from '@dragverse/lens'
import { apolloClient } from '@dragverse/lens/apollo'
import type { Metadata } from 'next'

import common from '@/common';
import { getCollectModuleMetadata } from '@/other-metadata';
import common from '@/common'
import { getCollectModuleMetadata } from '@/other-metadata'

type Props = {
params: { id: string }
Expand Down
8 changes: 4 additions & 4 deletions apps/og/src/common.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import {
OG_IMAGE,
TAPE_APP_DESCRIPTION,
TAPE_APP_NAME,
TAPE_WEBSITE_URL
OG_IMAGE,
TAPE_APP_DESCRIPTION,
TAPE_APP_NAME,
TAPE_WEBSITE_URL
} from '@dragverse/constants'
import type { Metadata } from 'next'

Expand Down
20 changes: 10 additions & 10 deletions apps/web/src/components/Bangers/Feed.tsx
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
import BangersShimmer from '@components/Shimmers/BangersShimmer';
import { NoDataFound } from '@components/UIElements/NoDataFound';
import BangersShimmer from '@components/Shimmers/BangersShimmer'
import { NoDataFound } from '@components/UIElements/NoDataFound'
import {
INFINITE_SCROLL_ROOT_MARGIN,
LENS_CUSTOM_FILTERS,
TAPE_APP_ID
} from '@dragverse/constants';
} from '@dragverse/constants'
import type {
ExplorePublicationRequest,
PrimaryPublication
} from '@dragverse/lens';
} from '@dragverse/lens'
import {
ExplorePublicationType,
ExplorePublicationsOrderByType,
ExplorePublicationType,
LimitType,
PublicationMetadataMainFocusType,
useExplorePublicationsQuery
} from '@dragverse/lens';
import { Spinner } from '@dragverse/ui';
import { useInView } from 'react-cool-inview';
} from '@dragverse/lens'
import { Spinner } from '@dragverse/ui'
import { useInView } from 'react-cool-inview'

import New from './New';
import RenderBanger from './RenderBanger';
import New from './New'
import RenderBanger from './RenderBanger'

const Feed = () => {
const request: ExplorePublicationRequest = {
Expand Down
12 changes: 6 additions & 6 deletions apps/web/src/components/Bangers/Likes.tsx
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
import HoverableProfile from '@components/Common/HoverableProfile';
import { BangersBubbles } from '@components/Shimmers/BangersShimmer';
import { COMMON_REGEX } from '@dragverse/constants';
import HoverableProfile from '@components/Common/HoverableProfile'
import { BangersBubbles } from '@components/Shimmers/BangersShimmer'
import { COMMON_REGEX } from '@dragverse/constants'
import {
getProfile,
getProfilePicture,
getPublicationData
} from '@dragverse/generic';
} from '@dragverse/generic'
import type {
PrimaryPublication,
ProfileWhoReactedResult,
WhoReactedPublicationRequest
} from '@dragverse/lens';
import { LimitType, useWhoReactedPublicationQuery } from '@dragverse/lens';
} from '@dragverse/lens'
import { LimitType, useWhoReactedPublicationQuery } from '@dragverse/lens'

const Likes = ({ post }: { post: PrimaryPublication }) => {
const parsePublicationId = () => {
Expand Down
Loading

0 comments on commit be56eb4

Please sign in to comment.