Skip to content

Commit

Permalink
fix: linting
Browse files Browse the repository at this point in the history
  • Loading branch information
dinhanhthi committed May 27, 2024
1 parent 14cf8b3 commit e1b0341
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 8 deletions.
3 changes: 3 additions & 0 deletions .eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"extends": "next/core-web-vitals"
}
2 changes: 1 addition & 1 deletion src/app/(single-page)/bookmarks/BookmarksPageTemplate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ export default function BookmarksPageTemplate(props: BookmarksPageProps) {
<span className="m2it-link cursor-pointer" onClick={() => toggleTypeToShow('tools')}>
tools
</span>{' '}
on this page, you can explore other tools I'm using{' '}
on this page, you can explore other tools I{"'"}m using{' '}
<Link className="m2it-link" href="/tools/">
here
</Link>
Expand Down
3 changes: 2 additions & 1 deletion src/app/(single-page)/reading/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import cn from 'classnames'
import { Suspense } from 'react'

import ScrollToTop from '@notion-x/src/components/ScrollToTop'
import { Book } from '../../../interface'
import Container from '../../components/Container'
import Footer from '../../components/Footer'
import HeaderPage from '../../components/HeaderPage'
Expand Down Expand Up @@ -31,7 +32,7 @@ export default async function ProjectsPage() {
books.sort((a, b) => (a.isReading === b.isReading ? 0 : a.isReading ? -1 : 1))

// all uniq tags from current books
const tags = Array.from(new Set(books.flatMap(book => book.tag)))
const tags: string[] = Array.from(new Set(books.flatMap((book: Book) => book.tag)))

// Make sure the 'favorite' tag is always at the beginning
tags.sort((a, b) => (a === 'favorite' ? -1 : b === 'favorite' ? 1 : 0))
Expand Down
4 changes: 2 additions & 2 deletions src/app/(single-page)/tools/ToolItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default function ToolItem(props: ToolItemProps) {
if (diffInDays <= 7) {
setIsNew(true)
}
}, [tool.readDate || tool.createdTime])
}, [tool.createdTime, tool.readDate])

return (
<a
Expand Down Expand Up @@ -131,7 +131,7 @@ export default function ToolItem(props: ToolItemProps) {

{tool.isReading && (
<div className="flex flex-row gap-1 items-center">
<div className="text-sm text-green-700 italic">I'm reading...</div>
<div className="text-sm text-green-700 italic">I{"'"}m reading...</div>
</div>
)}
</div>
Expand Down
1 change: 0 additions & 1 deletion src/app/api/search-bookmarks/route.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { searchNotion } from '@notion-x/src/lib/db'

import { BookmarkItem } from '../../../interface'
Expand Down
1 change: 0 additions & 1 deletion src/app/api/search-notion/route.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
/* eslint-disable @typescript-eslint/no-explicit-any */
import { SearchResult } from '@notion-x/src/interface'
import { searchNotion } from '@notion-x/src/lib/db'
import { makeSlugText } from '@notion-x/src/lib/helpers'
Expand Down
4 changes: 2 additions & 2 deletions src/app/not-found.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ export default function NotFoundPage() {
</div>
<div>
Please change from <code className="text-pink-700">/something/</code> to{' '}
<code className="text-pink-700">/note/something/</code> because I've changed the route
of all notes to <code className="font-bold">/note/</code>.
<code className="text-pink-700">/note/something/</code> because I{"'"}ve changed the
route of all notes to <code className="font-bold">/note/</code>.
</div>
</div>
<div className="flex items-baseline gap-2">
Expand Down

0 comments on commit e1b0341

Please sign in to comment.