Skip to content

Commit 03d6cb3

Browse files
committed
chore: add eslint in next.js website
1 parent b2a5d87 commit 03d6cb3

File tree

4 files changed

+1246
-13
lines changed

4 files changed

+1246
-13
lines changed

web/.eslintrc.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
{
2+
"extends": "next/core-web-vitals"
3+
}

web/components/Navbar.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export default function Navbar() {
77
return (
88
<div className="absolute top-0 z-20 flex h-20 w-full items-center justify-between p-7 xl:p-0">
99
<div className="flex items-center">
10-
<Link href="/">
10+
<Link passHref href="/">
1111
<Logo className="h-10 w-10" />
1212
</Link>
1313
<span className="ml-5 text-lg font-medium">
@@ -18,6 +18,7 @@ export default function Navbar() {
1818
href="https://github.com/avneesh0612/react-nextjs-snippets"
1919
target="_blank"
2020
className="cursor-pointer"
21+
rel="noreferrer"
2122
>
2223
<GitHubIcon className="h-6 w-6" />
2324
</a>

web/package.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
"scripts": {
44
"dev": "next dev",
55
"build": "next build",
6-
"start": "next start"
6+
"start": "next start",
7+
"lint": "next lint"
78
},
89
"dependencies": {
910
"next": "^12.1.0",
@@ -15,6 +16,8 @@
1516
"@types/node": "17.0.18",
1617
"@types/react": "17.0.39",
1718
"autoprefixer": "^10.4.2",
19+
"eslint": "8.9.0",
20+
"eslint-config-next": "12.1.0",
1821
"postcss": "^8.4.6",
1922
"prettier": "^2.5.1",
2023
"prettier-plugin-tailwindcss": "^0.1.7",

0 commit comments

Comments
 (0)