From 8b86aca23c2429b7b89fd90fb72e47fe8d18608e Mon Sep 17 00:00:00 2001 From: Ren Amamiya <123083837+reyamir@users.noreply.github.com> Date: Sat, 4 Mar 2023 21:04:34 +0700 Subject: [PATCH] updated eslint config --- .eslintrc | 4 ++-- src/components/accountBar/account.tsx | 1 - src/components/accountBar/index.tsx | 1 - src/components/contexts/database.tsx | 1 - src/components/contexts/relay.tsx | 1 - src/components/imageWithFallback.tsx | 1 - src/components/navigatorBar/createPost.tsx | 1 - src/components/navigatorBar/incomingList.tsx | 1 - src/components/navigatorBar/index.tsx | 1 - src/components/note/atoms/reaction.tsx | 1 - src/components/note/atoms/reply.tsx | 1 - src/components/note/atoms/user.tsx | 1 - src/components/note/atoms/userRepost.tsx | 1 - src/components/note/atoms/userWithUsername.tsx | 1 - src/components/note/connector.tsx | 1 - src/components/note/content/index.tsx | 1 - src/components/note/modal/index.tsx | 1 - src/components/note/modal/noteReply.tsx | 1 - src/components/note/repost.tsx | 1 - src/components/note/single.tsx | 1 - src/layouts/userLayout.tsx | 1 - src/pages/_app.tsx | 1 - src/pages/feed/following.tsx | 1 - src/pages/index.tsx | 1 - src/pages/onboarding/create/index.tsx | 1 - src/pages/onboarding/create/pre-follows.tsx | 1 - src/pages/onboarding/login/fetch.tsx | 1 - src/pages/onboarding/login/index.tsx | 1 - src/pages/profile/personal.tsx | 1 - src/pages/profile/update.tsx | 1 - 30 files changed, 2 insertions(+), 31 deletions(-) diff --git a/.eslintrc b/.eslintrc index 404b1864..28031d99 100644 --- a/.eslintrc +++ b/.eslintrc @@ -10,8 +10,8 @@ "prettier" ], "rules": { - "@typescript-eslint/no-unused-vars": "error", - "@typescript-eslint/no-explicit-any": "error" + "@typescript-eslint/no-unused-vars": "warn", + "@typescript-eslint/no-explicit-any": "warn" }, "ignorePatterns": ["dist", "**/*.js", "**/*.json", "node_modules"] } diff --git a/src/components/accountBar/account.tsx b/src/components/accountBar/account.tsx index 7412d7e6..493e1d5d 100644 --- a/src/components/accountBar/account.tsx +++ b/src/components/accountBar/account.tsx @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import Image from 'next/image'; import { memo } from 'react'; diff --git a/src/components/accountBar/index.tsx b/src/components/accountBar/index.tsx index 415c83c8..d5e83459 100644 --- a/src/components/accountBar/index.tsx +++ b/src/components/accountBar/index.tsx @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import { Account } from '@components/accountBar/account'; import LumeSymbol from '@assets/icons/Lume'; diff --git a/src/components/contexts/database.tsx b/src/components/contexts/database.tsx index 84116eeb..4167102e 100644 --- a/src/components/contexts/database.tsx +++ b/src/components/contexts/database.tsx @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import { writeStorage } from '@rehooks/local-storage'; import { createContext, useEffect, useState } from 'react'; import Database from 'tauri-plugin-sql-api'; diff --git a/src/components/contexts/relay.tsx b/src/components/contexts/relay.tsx index 41b30048..58903210 100644 --- a/src/components/contexts/relay.tsx +++ b/src/components/contexts/relay.tsx @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import { RelayPool } from 'nostr-relaypool'; import { createContext, useMemo } from 'react'; diff --git a/src/components/imageWithFallback.tsx b/src/components/imageWithFallback.tsx index ef37fe3f..b7b5d4b4 100644 --- a/src/components/imageWithFallback.tsx +++ b/src/components/imageWithFallback.tsx @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import Avatar from 'boring-avatars'; import Image from 'next/image'; import { memo, useEffect, useState } from 'react'; diff --git a/src/components/navigatorBar/createPost.tsx b/src/components/navigatorBar/createPost.tsx index 99d140a5..40698786 100644 --- a/src/components/navigatorBar/createPost.tsx +++ b/src/components/navigatorBar/createPost.tsx @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import { RelayContext } from '@components/contexts/relay'; import { dateToUnix } from '@utils/getDate'; diff --git a/src/components/navigatorBar/incomingList.tsx b/src/components/navigatorBar/incomingList.tsx index 692df324..1dd00b97 100644 --- a/src/components/navigatorBar/incomingList.tsx +++ b/src/components/navigatorBar/incomingList.tsx @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ export function IncomingList({ data }: { data: any }) { const list: any = Array.from(new Set(data.map((item: any) => item.pubkey))); diff --git a/src/components/navigatorBar/index.tsx b/src/components/navigatorBar/index.tsx index 8d25487e..58785b2b 100644 --- a/src/components/navigatorBar/index.tsx +++ b/src/components/navigatorBar/index.tsx @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import ActiveLink from '@components/activeLink'; import CreatePost from '@components/navigatorBar/createPost'; import { ProfileMenu } from '@components/navigatorBar/profileMenu'; diff --git a/src/components/note/atoms/reaction.tsx b/src/components/note/atoms/reaction.tsx index 506ea28f..c7013e8d 100644 --- a/src/components/note/atoms/reaction.tsx +++ b/src/components/note/atoms/reaction.tsx @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import { RelayContext } from '@components/contexts/relay'; import { dateToUnix } from '@utils/getDate'; diff --git a/src/components/note/atoms/reply.tsx b/src/components/note/atoms/reply.tsx index cde060c0..7bfd7bd6 100644 --- a/src/components/note/atoms/reply.tsx +++ b/src/components/note/atoms/reply.tsx @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import { ChatBubbleIcon } from '@radix-ui/react-icons'; import { useState } from 'react'; diff --git a/src/components/note/atoms/user.tsx b/src/components/note/atoms/user.tsx index bd218cbb..207c2f2d 100644 --- a/src/components/note/atoms/user.tsx +++ b/src/components/note/atoms/user.tsx @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import { DatabaseContext } from '@components/contexts/database'; import { ImageWithFallback } from '@components/imageWithFallback'; diff --git a/src/components/note/atoms/userRepost.tsx b/src/components/note/atoms/userRepost.tsx index 702e6f57..537d1a08 100644 --- a/src/components/note/atoms/userRepost.tsx +++ b/src/components/note/atoms/userRepost.tsx @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import { truncate } from '@utils/truncate'; import { memo, useEffect, useState } from 'react'; diff --git a/src/components/note/atoms/userWithUsername.tsx b/src/components/note/atoms/userWithUsername.tsx index 504ba371..6f1e3787 100644 --- a/src/components/note/atoms/userWithUsername.tsx +++ b/src/components/note/atoms/userWithUsername.tsx @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import { ImageWithFallback } from '@components/imageWithFallback'; import { truncate } from '@utils/truncate'; diff --git a/src/components/note/connector.tsx b/src/components/note/connector.tsx index 4daa2cff..7ff56399 100644 --- a/src/components/note/connector.tsx +++ b/src/components/note/connector.tsx @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import { DatabaseContext } from '@components/contexts/database'; import { RelayContext } from '@components/contexts/relay'; diff --git a/src/components/note/content/index.tsx b/src/components/note/content/index.tsx index 2ae381ac..f4674e3e 100644 --- a/src/components/note/content/index.tsx +++ b/src/components/note/content/index.tsx @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import Reaction from '@components/note/atoms/reaction'; import Reply from '@components/note/atoms/reply'; import { User } from '@components/note/atoms/user'; diff --git a/src/components/note/modal/index.tsx b/src/components/note/modal/index.tsx index 91824bd0..25710af2 100644 --- a/src/components/note/modal/index.tsx +++ b/src/components/note/modal/index.tsx @@ -5,7 +5,6 @@ import NoteReply from '@components/note/modal/noteReply'; import useLocalStorage from '@rehooks/local-storage'; import { memo, useContext, useState } from 'react'; -/* eslint-disable @typescript-eslint/no-explicit-any */ const Modal = ({ event }: { event: any }) => { const relayPool: any = useContext(RelayContext); const [relays]: any = useLocalStorage('relays'); diff --git a/src/components/note/modal/noteReply.tsx b/src/components/note/modal/noteReply.tsx index 091f621e..0666ff3a 100644 --- a/src/components/note/modal/noteReply.tsx +++ b/src/components/note/modal/noteReply.tsx @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import { Content } from '@components/note/content'; export default function NoteReply({ event }: { event: any }) { diff --git a/src/components/note/repost.tsx b/src/components/note/repost.tsx index 4bc3dcea..331f2888 100644 --- a/src/components/note/repost.tsx +++ b/src/components/note/repost.tsx @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import { RelayContext } from '@components/contexts/relay'; import { UserRepost } from '@components/note/atoms/userRepost'; import { Content } from '@components/note/content'; diff --git a/src/components/note/single.tsx b/src/components/note/single.tsx index 926bf63b..bbbb2c3b 100644 --- a/src/components/note/single.tsx +++ b/src/components/note/single.tsx @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import { Content } from '@components/note/content'; import { memo } from 'react'; diff --git a/src/layouts/userLayout.tsx b/src/layouts/userLayout.tsx index 9a27b6f5..534ae71a 100644 --- a/src/layouts/userLayout.tsx +++ b/src/layouts/userLayout.tsx @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import AccountBar from '@components/accountBar'; import ActiveLink from '@components/activeLink'; diff --git a/src/pages/_app.tsx b/src/pages/_app.tsx index b72c3c50..9f4da805 100644 --- a/src/pages/_app.tsx +++ b/src/pages/_app.tsx @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import DatabaseProvider from '@components/contexts/database'; import RelayProvider from '@components/contexts/relay'; diff --git a/src/pages/feed/following.tsx b/src/pages/feed/following.tsx index 96ed7d65..f4dd1dd7 100644 --- a/src/pages/feed/following.tsx +++ b/src/pages/feed/following.tsx @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import BaseLayout from '@layouts/baseLayout'; import NewsFeedLayout from '@layouts/newsfeedLayout'; diff --git a/src/pages/index.tsx b/src/pages/index.tsx index 6eec4fcf..431c88e5 100644 --- a/src/pages/index.tsx +++ b/src/pages/index.tsx @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import BaseLayout from '@layouts/baseLayout'; import FullLayout from '@layouts/fullLayout'; diff --git a/src/pages/onboarding/create/index.tsx b/src/pages/onboarding/create/index.tsx index 42db41be..770bad0b 100644 --- a/src/pages/onboarding/create/index.tsx +++ b/src/pages/onboarding/create/index.tsx @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import BaseLayout from '@layouts/baseLayout'; import OnboardingLayout from '@layouts/onboardingLayout'; diff --git a/src/pages/onboarding/create/pre-follows.tsx b/src/pages/onboarding/create/pre-follows.tsx index b87713b4..e034eaa3 100644 --- a/src/pages/onboarding/create/pre-follows.tsx +++ b/src/pages/onboarding/create/pre-follows.tsx @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import BaseLayout from '@layouts/baseLayout'; import OnboardingLayout from '@layouts/onboardingLayout'; diff --git a/src/pages/onboarding/login/fetch.tsx b/src/pages/onboarding/login/fetch.tsx index dca5a828..2943b4fc 100644 --- a/src/pages/onboarding/login/fetch.tsx +++ b/src/pages/onboarding/login/fetch.tsx @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import BaseLayout from '@layouts/baseLayout'; import OnboardingLayout from '@layouts/onboardingLayout'; diff --git a/src/pages/onboarding/login/index.tsx b/src/pages/onboarding/login/index.tsx index 7b0d5357..b6c68e65 100644 --- a/src/pages/onboarding/login/index.tsx +++ b/src/pages/onboarding/login/index.tsx @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import BaseLayout from '@layouts/baseLayout'; import OnboardingLayout from '@layouts/onboardingLayout'; diff --git a/src/pages/profile/personal.tsx b/src/pages/profile/personal.tsx index d0e0a095..a9d517ba 100644 --- a/src/pages/profile/personal.tsx +++ b/src/pages/profile/personal.tsx @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import BaseLayout from '@layouts/baseLayout'; import { JSXElementConstructor, ReactElement, ReactFragment, ReactPortal } from 'react'; diff --git a/src/pages/profile/update.tsx b/src/pages/profile/update.tsx index acdbdd97..6ae6a609 100644 --- a/src/pages/profile/update.tsx +++ b/src/pages/profile/update.tsx @@ -1,4 +1,3 @@ -/* eslint-disable @typescript-eslint/no-explicit-any */ import BaseLayout from '@layouts/baseLayout'; import UserLayout from '@layouts/userLayout';