Skip to content

Commit b81135b

Browse files
committed
Remove all eslint errors
1 parent a133864 commit b81135b

27 files changed

+35
-65
lines changed

src/components/base/Header.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -84,10 +84,10 @@ const Block = styled.div`
8484
height: 4rem;
8585
`;
8686

87-
const StyledLink = styled(Link)`
88-
display: flex;
89-
align-items: center;
90-
`;
87+
// const StyledLink = styled(Link)`
88+
// display: flex;
89+
// align-items: center;
90+
// `;
9191

9292
const SearchButton = styled(Link)`
9393
display: flex;

src/components/common/MarkdownRender.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import * as React from 'react';
22
import styled from 'styled-components';
33
import remark from 'remark';
4-
import htmlPlugin from 'remark-html';
4+
// import htmlPlugin from 'remark-html';
55
import slug from 'remark-slug';
66
import prismPlugin from '../../lib/remark/prismPlugin';
77
import prismThemes from '../../lib/styles/prismThemes';

src/components/common/ToggleSwitch.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import React, { useState, useEffect, useRef } from 'react';
22
import styled, { css } from 'styled-components';
33
import palette from '../../lib/styles/palette';
44
import { useSpring, animated } from 'react-spring';
5-
import useDidMount from '../../lib/hooks/useDidMount';
5+
66

77
export type ToggleSwitchProps = {
88
name?: string;

src/components/error/CrashErrorScreen.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
import React from 'react';
2-
import styled from 'styled-components';
32
import ErrorScreenTemplate from './ErrorScreenTemplate';
43
import { undrawBugFixing } from '../../static/images';
54
import { useHistory } from 'react-router-dom';

src/components/error/ErrorScreenTemplate.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function ErrorScreenTemplate({
1919
}: ErrorScreenTemplateProps) {
2020
return (
2121
<Screen>
22-
<img src={image} alt="error-image" />
22+
<img src={image} alt="error" />
2323
<div className="message">{message}</div>
2424
{buttonText && (
2525
<div className="button-wrapper">

src/components/main/MainTemplate.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React from 'react';
22
import styled, { createGlobalStyle } from 'styled-components';
33
import palette from '../../lib/styles/palette';
4-
import { Link } from 'react-router-dom';
54

65
const BackgroundStyle = createGlobalStyle`
76
body {

src/components/post/PostHead.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ import PopupOKCancel from '../common/PopupOKCancel';
1010
import media from '../../lib/styles/media';
1111
import TagList from '../common/TagList';
1212
import { Link } from 'react-router-dom';
13-
import { LockIcon } from '../../static/svg';
1413
import PrivatePostLabel from '../common/PrivatePostLabel';
1514
import optimizeImage from '../../lib/optimizeImage';
1615

src/components/setting/SettingUserProfile.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState } from 'react';
1+
import React from 'react';
22
import styled from 'styled-components';
33
import palette from '../../lib/styles/palette';
44
import Button from '../common/Button';

src/components/velog/SideArea.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import React from 'react';
22
import styled from 'styled-components';
33
import media from '../../lib/styles/media';
4-
import palette from '../../lib/styles/palette';
54

65
export type SideAreaProps = {
76
children: React.ReactNode;

src/components/write/PublishPreview.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useState, useEffect } from 'react';
1+
import React from 'react';
22
import styled, { css } from 'styled-components';
33
import PublishSection from './PublishSection';
44
import palette from '../../lib/styles/palette';

src/components/write/TagInput.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import * as React from 'react';
2-
import styled, { css } from 'styled-components';
2+
import styled from 'styled-components';
33
import palette from '../../lib/styles/palette';
44
import transitions from '../../lib/styles/transitions';
5-
import media, { mediaQuery } from '../../lib/styles/media';
5+
import { mediaQuery } from '../../lib/styles/media';
66
import { useTransition, animated } from 'react-spring';
77

88
export interface TagInputProps {

src/components/write/Toolbar.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -64,10 +64,10 @@ const ToolbarBlock = styled.div<{
6464
}
6565
`;
6666

67-
const ToolbarGroup = styled.div`
68-
display: flex;
69-
height: 100%;
70-
`;
67+
// const ToolbarGroup = styled.div`
68+
// display: flex;
69+
// height: 100%;
70+
// `;
7171

7272
const Heading = styled.div`
7373
font-size: 1rem;

src/components/write/WriteFooter.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import styled from 'styled-components';
33
import Button from '../common/Button';
44
import { MdArrowBack } from 'react-icons/md';
55
import media from '../../lib/styles/media';
6-
import { useHistory } from 'react-router-dom';
6+
77

88
const WriteFooterBlock = styled.div`
99
padding-left: 1rem;

src/containers/post/PostViewer.tsx

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import React, { useEffect, useCallback, useRef, useMemo } from 'react';
2-
import { useDispatch, useSelector } from 'react-redux';
1+
import React, { useEffect, useCallback, useRef } from 'react';
2+
import { useDispatch } from 'react-redux';
33
import {
44
READ_POST,
55
SinglePost,
@@ -27,12 +27,10 @@ import { getScrollTop, ssrEnabled } from '../../lib/utils';
2727
import UserProfile from '../../components/common/UserProfile';
2828
import VelogResponsive from '../../components/velog/VelogResponsive';
2929
import styled from 'styled-components';
30-
import { useMount } from 'react-use';
3130
import PostSkeleton from '../../components/post/PostSkeleton';
3231
import media from '../../lib/styles/media';
3332
import useNotFound from '../../lib/hooks/useNotFound';
3433
import { Helmet } from 'react-helmet-async';
35-
import { RootState } from '../../modules';
3634
import { toast } from 'react-toastify';
3735
import MobileLikeButton from '../../components/post/MobileLikeButton';
3836

@@ -93,11 +91,11 @@ const PostViewer: React.FC<PostViewerProps> = ({
9391
const [likePost, { loading: loadingLike }] = useMutation(LIKE_POST);
9492
const [unlikePost, { loading: loadingUnlike }] = useMutation(UNLIKE_POST);
9593
const { showNotFound } = useNotFound();
96-
const userLogo = useSelector((state: RootState) => state.header.userLogo);
97-
const velogTitle = useMemo(() => {
98-
if (!userLogo || !userLogo.title) return `${username}.log`;
99-
return userLogo.title;
100-
}, [userLogo, username]);
94+
// const userLogo = useSelector((state: RootState) => state.header.userLogo);
95+
// const velogTitle = useMemo(() => {
96+
// if (!userLogo || !userLogo.title) return `${username}.log`;
97+
// return userLogo.title;
98+
// }, [userLogo, username]);
10199
const user = useUser();
102100

103101
const { error, data } = readPost;

src/containers/search/SearchResult.tsx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ import { useQuery } from '@apollo/react-hooks';
55
import { SearchPostsResponse, SEARCH_POSTS } from '../../lib/graphql/post';
66
import useScrollPagination from '../../lib/hooks/useScrollPagination';
77
import { safe } from '../../lib/utils';
8-
import styled from 'styled-components';
98
import { Helmet } from 'react-helmet-async';
109
// import { undrawSearching } from '../../static/images';
1110

@@ -73,16 +72,5 @@ function SearchResult({ keyword, username }: SearchResultProps) {
7372
);
7473
}
7574

76-
const ImageWrapper = styled.div`
77-
padding-top: 3rem;
78-
padding-bottom: 3rem;
79-
display: flex;
80-
justify-content: center;
81-
img {
82-
width: 16rem;
83-
height: auto;
84-
display: block;
85-
}
86-
`;
8775

8876
export default SearchResult;

src/containers/setting/SettingUserProfileContainer.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ export type SettingUserProfileContainerProps = {};
1111

1212
function SettingUserProfileContainer(props: SettingUserProfileContainerProps) {
1313
const user = useUser();
14-
const { profile, loading, update } = useUserProfile();
14+
const { profile, update } = useUserProfile();
1515
const [upload] = useUpload();
16-
const [s3Upload, image, error] = useS3Upload();
16+
const [s3Upload] = useS3Upload();
1717
const updateThumbnail = useUpdateThumbnail();
1818

1919
const uploadThumbnail = async () => {

src/containers/velog/UserPosts.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ const UserPosts: React.FC<UserPostsProps> = ({ username, tag }) => {
2323
notifyOnNetworkStatusChange: true,
2424
});
2525

26-
const { data, error, loading } = getPostList;
26+
const { data, loading } = getPostList;
2727

2828
const onLoadMore = useCallback(
2929
(cursor: string) => {

src/containers/write/ActiveEditor.tsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,9 @@ import React, { useEffect, useState, useCallback, useRef } from 'react';
22
import { useSelector, useDispatch, shallowEqual } from 'react-redux';
33
import { RootState } from '../../modules';
44
import {
5-
WriteMode,
65
clearEditor,
76
prepareEdit,
8-
convertEditorMode,
97
setInitialBody,
10-
changeTitle,
118
setInitialTitle,
129
} from '../../modules/write';
1310
import EditorPanesContainer from './EditorPanesContainer';
@@ -28,7 +25,7 @@ export type ActiveEditorProps = {};
2825

2926
const ActiveEditor: React.FC<ActiveEditorProps> = () => {
3027
const [newPost, setNewPost] = useState(false);
31-
const mode = useSelector((state: RootState) => state.write.mode);
28+
// const mode = useSelector((state: RootState) => state.write.mode);
3229
const postId = useSelector((state: RootState) => state.write.postId);
3330
const [askLoadTemp, setAskLoadTemp] = useState(false);
3431
const initialized = useRef(false);

src/containers/write/MarkdownEditorContainer.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,6 @@ const MarkdownEditorContainer: React.FC<MarkdownEditorContainerProps> = () => {
5252
title,
5353
markdown,
5454
thumbnail,
55-
publish,
5655
postId,
5756
isTemp,
5857
initialBody,

src/containers/write/MarkdownPreviewContainer.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import * as React from 'react';
22
import MarkdownPreview from '../../components/write/MarkdownPreview';
33
import { connect } from 'react-redux';
44
import { RootState } from '../../modules';
5-
import styled from 'styled-components';
65

76
interface OwnProps {}
87
interface StateProps {

src/index.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import rootReducer from './modules';
1414
import storage from './lib/storage';
1515
import { setUser } from './modules/core';
1616
import * as Sentry from '@sentry/browser';
17-
import { Helmet, HelmetProvider } from 'react-helmet-async';
17+
import { HelmetProvider } from 'react-helmet-async';
1818

1919
Sentry.init({
2020
dsn: 'https://[email protected]/1886813',

src/modules/error.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { createSlice, PayloadAction } from '@reduxjs/toolkit';
1+
import { createSlice } from '@reduxjs/toolkit';
22

33
export type ErrorState = {
44
errorType: 'NOT_FOUND' | 'CRASHED' | null;

src/pages/WritePage.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import styled from 'styled-components';
33

44
import ActiveEditor from '../containers/write/ActiveEditor';
55
import PublishScreen from '../containers/write/PublishScreen';
6-
import { Helmet } from 'react-helmet-async';
76

87
const WritePageBlock = styled.div`
98
width: 100%;

src/pages/home/RecentPostsPage.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
import React from 'react';
22
import useRecentPosts from './hooks/useRecentPosts';
3-
import PostCardGrid, {
4-
PostCardGridSkeleton,
5-
} from '../../components/common/PostCardGrid';
3+
import PostCardGrid from '../../components/common/PostCardGrid';
64
import { Helmet } from 'react-helmet-async';
75

86
export type RecentPostsPageProps = {};

src/pages/home/TrendingPostsPage.tsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
import React from 'react';
2-
import PostCardGrid, {
3-
PostCardGridSkeleton,
4-
} from '../../components/common/PostCardGrid';
2+
import PostCardGrid from '../../components/common/PostCardGrid';
53
import useTrendingPosts from './hooks/useTrendingPosts';
64
import { Helmet } from 'react-helmet-async';
75

src/pages/readingList/ReadingListPage.tsx

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,11 @@
1-
import React, { useEffect } from 'react';
1+
import React from 'react';
22
import MainPageTemplate from '../../components/main/MainPageTemplate';
33
import MainResponsive from '../../components/main/MainResponsive';
44
import ReadingListTab from '../../components/readingList/ReadingListTab';
55
import styled from 'styled-components';
66
import { RouteComponentProps } from 'react-router-dom';
77
import useReadingList from './hooks/useReadingList';
8-
import PostCardGrid, {
9-
PostCardGridSkeleton,
10-
} from '../../components/common/PostCardGrid';
8+
import PostCardGrid from '../../components/common/PostCardGrid';
119
import { undrawEmpty } from '../../static/images';
1210
import palette from '../../lib/styles/palette';
1311
import media from '../../lib/styles/media';
@@ -20,7 +18,7 @@ export type ReadingListPageProps = {} & RouteComponentProps<{
2018
function ReadingListPage({ match, history }: ReadingListPageProps) {
2119
const { type } = match.params;
2220

23-
const { data, loading, isFinished } = useReadingList(type);
21+
const { data, isFinished } = useReadingList(type);
2422

2523
return (
2624
<MainPageTemplate>

src/pages/velog/UserPage.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { useEffect } from 'react';
1+
import React from 'react';
22
import styled from 'styled-components';
33
import VelogResponsive from '../../components/velog/VelogResponsive';
44
import UserProfileContainer from '../../containers/velog/UserProfileContainer';

0 commit comments

Comments
 (0)