Skip to content

Commit ef69d78

Browse files
chore: update dependencies and improve import order
1 parent 3ac9f44 commit ef69d78

20 files changed

+5765
-172
lines changed

.prettierrc

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,36 @@
11
{
2+
"endOfLine": "lf",
3+
"semi": true,
24
"singleQuote": true,
3-
"arrowParens": "always",
5+
"tabWidth": 2,
46
"trailingComma": "none",
7+
"arrowParens": "always",
58
"printWidth": 100,
6-
"tabWidth": 2,
7-
"endOfLine": "lf",
8-
"plugins": ["@trivago/prettier-plugin-sort-imports", "prettier-plugin-tailwindcss"],
9-
"importOrder": ["^@core/(.*)$", "^@server/(.*)$", "^@ui/(.*)$", "^[./]"],
9+
"importOrder": [
10+
"^react$",
11+
"^react/(.*)$",
12+
"^next$",
13+
"^next/(.*)$",
14+
"<THIRD_PARTY_MODULES>",
15+
"^types$",
16+
"^@/types/(.*)$",
17+
"^@/config/(.*)$",
18+
"^@/lib/(.*)$",
19+
"^@/hooks/(.*)$",
20+
"^@/components/ui/(.*)$",
21+
"^@/components/(.*)$",
22+
"^@/styles/(.*)$",
23+
"^@/app/(.*)$",
24+
"^[./]"
25+
],
1026
"importOrderSeparation": true,
11-
"importOrderSortSpecifiers": true
27+
"importOrderSortSpecifiers": true,
28+
"importOrderBuiltinModulesToTop": true,
29+
"importOrderParserPlugins": ["typescript", "jsx", "decorators-legacy"],
30+
"importOrderMergeDuplicateImports": true,
31+
"importOrderCombineTypeAndValueImports": true,
32+
"tailwindAttributes": ["tw"],
33+
"tailwindFunctions": ["cva"],
34+
35+
"plugins": ["@trivago/prettier-plugin-sort-imports", "prettier-plugin-tailwindcss"]
1236
}

app/about/page.jsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
import { companies, institutions } from '@/app/data/data';
2-
import { skills } from '@/app/data/skills';
31
import EduCard from '@/components/educard';
42
import Heading from '@/components/heading';
53
import SkillCap from '@/components/skill-cap';
64

5+
import { companies, institutions } from '@/app/data/data';
6+
import { skills } from '@/app/data/skills';
7+
78
export const metadata = {
89
title: 'About',
910
description:
@@ -16,7 +17,7 @@ export default function About() {
1617
<section>
1718
<Heading text={'Tech Stack'} />
1819

19-
<div className="flex flex-wrap w-full gap-4 mt-3 lg:px-5">
20+
<div className="mt-3 flex w-full flex-wrap gap-4 lg:px-5">
2021
{skills.map((item) => (
2122
<SkillCap key={item.id} {...item} />
2223
))}

app/layout.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,12 @@
1-
import Footer from '@/components/footer';
2-
import Navbar from '@/components/navbar';
3-
import { BASE_URL } from '@/lib/constants';
1+
import { Cabin } from 'next/font/google';
2+
43
import { GoogleAnalytics, GoogleTagManager } from '@next/third-parties/google';
54
import { ViewTransitions } from 'next-view-transitions';
6-
import { Cabin } from 'next/font/google';
5+
6+
import { BASE_URL } from '@/lib/constants';
7+
8+
import Footer from '@/components/footer';
9+
import Navbar from '@/components/navbar';
710

811
import './globals.css';
912

app/open-source/page.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1+
import { Suspense } from 'react';
2+
13
import Description from '@/components/description';
24
import Heading from '@/components/heading';
35
import RepoList from '@/components/repo-list';
46
import RepoSkeleton from '@/components/repo-skeleton';
5-
import { Suspense } from 'react';
67

78
export const metadata = {
89
title: 'Open Source',

app/projects/page.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
1-
import { projectList } from '@/app/data/projects';
21
import Description from '@/components/description';
32
import Heading from '@/components/heading';
43
import ProjectCard from '@/components/project-card';
54

5+
import { projectList } from '@/app/data/projects';
6+
67
export const metadata = {
78
title: 'Projects',
89
description:

components/avatar.jsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
'use client';
22

3-
import Image from 'next/image';
43
import { useRef, useState } from 'react';
54

5+
import Image from 'next/image';
6+
67
const Avatar = () => {
78
const typingIntervalRef = useRef(null);
89
const [typedText, setTypedText] = useState('');
@@ -47,10 +48,10 @@ const Avatar = () => {
4748
/>
4849
</div>
4950
<div className="absolute bottom-0 -ml-[100px] mb-56 hidden w-32 flex-col items-center lg:group-hover:flex">
50-
<p className="whitespace-no-wrap bg-background relative z-10 h-[50px] w-32 rounded-md p-2 text-xs leading-none text-white shadow-lg">
51+
<p className="whitespace-no-wrap relative z-10 h-[50px] w-32 rounded-md bg-background p-2 text-xs leading-none text-white shadow-lg">
5152
{typedText}
5253
</p>
53-
<div className='before:border-r-background before:border-t-background before:absolute before:-bottom-3 before:right-3 before:h-0 before:w-0 before:border-b-[20px] before:border-l-[12px] before:border-r-[24px] before:border-t-[12px] before:border-b-transparent before:border-l-transparent before:content-[""]'></div>
54+
<div className='before:absolute before:-bottom-3 before:right-3 before:h-0 before:w-0 before:border-b-[20px] before:border-l-[12px] before:border-r-[24px] before:border-t-[12px] before:border-b-transparent before:border-l-transparent before:border-r-background before:border-t-background before:content-[""]'></div>
5455
</div>
5556
</div>
5657
</div>

components/educard.jsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
1-
import { shimmer, toBase64 } from '@/lib/utils';
21
import Image from 'next/image';
32

3+
import { shimmer, toBase64 } from '@/lib/utils';
4+
45
const EduCard = ({ institution, logo, degree, startDate, endDate }) => {
56
return (
6-
<article className="bg-card border-background transform items-center gap-3 rounded-lg border-2 p-4 text-white transition-transform ease-in hover:scale-[1.02] hover:shadow-lg md:flex">
7+
<article className="transform items-center gap-3 rounded-lg border-2 border-background bg-card p-4 text-white transition-transform ease-in hover:scale-[1.02] hover:shadow-lg md:flex">
78
<div className="flex items-center gap-3">
89
<div className="flex h-14 w-14 items-center md:h-16 md:w-16">
910
<Image
@@ -21,7 +22,7 @@ const EduCard = ({ institution, logo, degree, startDate, endDate }) => {
2122
<div>
2223
<h3 className="hidden text-lg font-bold md:block md:text-xl">{institution}</h3>
2324
<h4>{degree}</h4>
24-
<small className="text-muted text-sm">
25+
<small className="text-sm text-muted">
2526
<time>{startDate}</time> - <time>{endDate}</time>
2627
</small>
2728
</div>

components/featured-repo.jsx

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
1-
import { featuredRepositories } from '@/app/data/data';
2-
import { GITHUB_API_URL, GITHUB_USERNAME } from '@/lib/constants';
31
import { Link } from 'next-view-transitions';
42
import { HiCursorClick } from 'react-icons/hi';
53

4+
import { GITHUB_API_URL, GITHUB_USERNAME } from '@/lib/constants';
5+
6+
import { featuredRepositories } from '@/app/data/data';
7+
68
import Heading from './heading';
79
import RepoCard from './repo-card';
810

@@ -53,7 +55,7 @@ export default async function FeaturedRepo() {
5355
<div className="flex justify-center">
5456
<Link
5557
href="/open-source"
56-
className="text-primary hover:text-primary-foreground mt-10 flex w-auto justify-center gap-2 text-base transition ease-in"
58+
className="mt-10 flex w-auto justify-center gap-2 text-base text-primary transition ease-in hover:text-primary-foreground"
5759
>
5860
<span>More Repositories</span>
5961
<HiCursorClick className="inline-block text-xl" />

components/footer.jsx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
import { socialMedia } from '@/app/data/data';
21
import Link from 'next/link';
32

3+
import { socialMedia } from '@/app/data/data';
4+
45
const Footer = () => {
56
return (
67
<footer className="mx-auto w-full max-w-[50rem] px-10 py-2 md:px-0">
@@ -13,7 +14,7 @@ const Footer = () => {
1314
href={social.url}
1415
aria-label={social.label}
1516
target="_blank"
16-
className="hover:text-primary hover:bg-background rounded-xl p-3 transition ease-in"
17+
className="rounded-xl p-3 transition ease-in hover:bg-background hover:text-primary"
1718
>
1819
{social.icon}
1920
</a>

components/greeting-switcher.jsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,26 @@
11
'use client';
22

3-
import { greetingList } from '@/app/data/greetings';
43
import { useState } from 'react';
54

5+
import { greetingList } from '@/app/data/greetings';
6+
67
const GreetingSwitcher = () => {
78
const [arrItem, setArrItem] = useState(0);
89

910
return (
1011
<div className="group relative inline-block">
1112
<p
1213
onClick={() => setArrItem((arrItem + 1) % greetingList.length)}
13-
className="animate-up from-primary to-primary my-5 inline-block cursor-pointer select-none bg-gradient-to-r text-3xl font-bold tracking-widest"
14+
className="animate-up my-5 inline-block cursor-pointer select-none bg-gradient-to-r from-primary to-primary text-3xl font-bold tracking-widest"
1415
>
1516
{greetingList[arrItem].text}
1617
<span className="italic">!</span>
1718
</p>
1819
<div className="absolute bottom-0 mb-14 hidden flex-col items-center group-hover:flex">
19-
<span className="whitespace-no-wrap bg-background relative z-10 rounded-md p-2 text-xs leading-none text-white shadow-lg">
20+
<span className="whitespace-no-wrap relative z-10 rounded-md bg-background p-2 text-xs leading-none text-white shadow-lg">
2021
{greetingList[arrItem].lang}
2122
</span>
22-
<div className="bg-background -mt-2 h-3 w-3 rotate-45"></div>
23+
<div className="-mt-2 h-3 w-3 rotate-45 bg-background"></div>
2324
</div>
2425
</div>
2526
);

components/hero.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ const Hero = () => {
1212
<h1 className="text-2xl font-normal leading-10">
1313
<span className="block">
1414
I am{' '}
15-
<span className="animate-up from-secondary to-secondary cursor-default bg-gradient-to-r font-bold tracking-widest">
15+
<span className="animate-up cursor-default bg-gradient-to-r from-secondary to-secondary font-bold tracking-widest">
1616
Shahriar Shafin
1717
</span>
1818
, a web developer
@@ -31,7 +31,7 @@ const Hero = () => {
3131
aria-hidden="true"
3232
>
3333
<div
34-
className="to-primary from-secondary aspect-[1155/678] w-[70rem] bg-gradient-to-tr opacity-[0.15]"
34+
className="aspect-[1155/678] w-[70rem] bg-gradient-to-tr from-secondary to-primary opacity-[0.15]"
3535
style={{
3636
clipPath:
3737
'polygon(74.1% 44.1%, 90% 61.6%, 90.5% 26.9%, 85.5% 0.1%, 80.7% 2%, 59.5% 27.5%, 74.2% 61.4%, 29.4% 68.1%, 65% 58.3%, 45.2% 34.5%, 27.5% 76.7%, 10.1% 40.9%, 17.9% 100%, 77.6% 78%, 76.1% 83.7%, 86.1% 50%)'

components/highlights.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ import { highlightList } from '@/app/data/highlights';
22

33
const Highlights = () => {
44
return (
5-
<section className="border-x-primary text-primary bg-card rounded-sm border-l-4 p-4 shadow">
6-
<h2 className="to-secondary from-primary mb-3 inline-block bg-gradient-to-r via-[#a855f7] bg-clip-text text-lg font-bold text-transparent">
5+
<section className="rounded-sm border-l-4 border-x-primary bg-card p-4 text-primary shadow">
6+
<h2 className="mb-3 inline-block bg-gradient-to-r from-primary via-[#a855f7] to-secondary bg-clip-text text-lg font-bold text-transparent">
77
New year, New goals:
88
</h2>
99
<ul>
@@ -16,7 +16,7 @@ const Highlights = () => {
1616
};
1717

1818
const HighlightPoint = ({ text }) => (
19-
<li className="hover:text-primary-foreground flex cursor-default items-center transition ease-in">
19+
<li className="flex cursor-default items-center transition ease-in hover:text-primary-foreground">
2020
<div className="mr-2 h-1.5 w-1.5 rounded-full bg-white"></div>
2121
{text}
2222
</li>

components/navbar.jsx

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,11 @@
11
'use client';
22

3-
import { Link } from 'next-view-transitions';
3+
import { useState } from 'react';
4+
45
import Image from 'next/image';
56
import { usePathname } from 'next/navigation';
6-
import { useState } from 'react';
7+
8+
import { Link } from 'next-view-transitions';
79
import { FaGithub } from 'react-icons/fa';
810
import { HiOutlineMenuAlt1 } from 'react-icons/hi';
911

@@ -18,16 +20,16 @@ const NavBar = () => {
1820
];
1921

2022
return (
21-
<nav className="bg-card fixed top-0 z-20 mb-28 w-full bg-opacity-80 shadow-lg backdrop-blur-sm backdrop-filter">
23+
<nav className="fixed top-0 z-20 mb-28 w-full bg-card bg-opacity-80 shadow-lg backdrop-blur-sm backdrop-filter">
2224
<div className="mx-auto w-full max-w-[50rem] px-5 py-2.5 md:px-10 lg:px-0">
2325
<div className="flex w-full items-center">
2426
<div className="inline-flex w-3/4 items-center justify-start">
2527
<div className="dropdown">
2628
<label onClick={() => setIsMenuOpen(!isMenuOpen)} className="md:hidden">
27-
<HiOutlineMenuAlt1 className="bg-background mr-5 h-9 w-9 cursor-pointer rounded-lg p-2" />
29+
<HiOutlineMenuAlt1 className="mr-5 h-9 w-9 cursor-pointer rounded-lg bg-background p-2" />
2830
</label>
2931
{isMenuOpen && (
30-
<ul className="border-muted bg-card shadow-background-500 absolute mt-3 w-64 space-y-5 rounded-md border bg-opacity-[0.97] px-2 py-5 shadow-lg backdrop-filter">
32+
<ul className="shadow-background-500 absolute mt-3 w-64 space-y-5 rounded-md border border-muted bg-card bg-opacity-[0.97] px-2 py-5 shadow-lg backdrop-filter">
3133
{webLinks.map((link, index) => (
3234
<li key={index} onClick={() => setIsMenuOpen(false)}>
3335
<Link
@@ -43,7 +45,7 @@ const NavBar = () => {
4345
</div>
4446
<Link
4547
href="/"
46-
className="border-primary mr-7 flex h-10 w-10 scale-90 select-none rounded-full border-2 transition ease-in hover:scale-100"
48+
className="mr-7 flex h-10 w-10 scale-90 select-none rounded-full border-2 border-primary transition ease-in hover:scale-100"
4749
>
4850
<Image
4951
className="rounded-full"
@@ -75,7 +77,7 @@ const NavBar = () => {
7577
target="_blank"
7678
aria-label="github link"
7779
href="https://github.com/shahriarshafin"
78-
className="hover:bg-background cursor-pointer rounded-xl p-3 transition ease-in"
80+
className="cursor-pointer rounded-xl p-3 transition ease-in hover:bg-background"
7981
>
8082
<FaGithub />
8183
</a>

components/project-card.jsx

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
1-
import { shimmer, toBase64 } from '@/lib/utils';
21
import Image from 'next/image';
32
import Link from 'next/link';
43

4+
import { shimmer, toBase64 } from '@/lib/utils';
5+
56
const ProjectCard = ({ leftAlign, image, title, des, tech, url }) => {
67
return (
78
<article
@@ -28,15 +29,15 @@ const ProjectCard = ({ leftAlign, image, title, des, tech, url }) => {
2829

2930
<p
3031
className={
31-
'bg-card border-background w-72 rounded-lg border-2 p-4 text-left text-xs md:w-80 md:text-base ' +
32+
'w-72 rounded-lg border-2 border-background bg-card p-4 text-left text-xs md:w-80 md:text-base ' +
3233
(leftAlign ? 'md:text-left' : 'md:text-right')
3334
}
3435
>
3536
{des}
3637
</p>
3738
<ul
3839
className={
39-
'text-muted flex cursor-default gap-5 p-2 text-xs md:text-base ' +
40+
'flex cursor-default gap-5 p-2 text-xs text-muted md:text-base ' +
4041
(leftAlign ? 'justify-start' : 'justify-start lg:justify-end')
4142
}
4243
>
@@ -48,7 +49,7 @@ const ProjectCard = ({ leftAlign, image, title, des, tech, url }) => {
4849
</header>
4950

5051
<Link href={url} target="_self">
51-
<div className="border-primary bg-primary relative flex w-full scale-[.99] rounded-lg border-2 opacity-25 shadow-lg transition ease-in hover:scale-100 hover:opacity-100 md:w-[35rem] md:opacity-50">
52+
<div className="relative flex w-full scale-[.99] rounded-lg border-2 border-primary bg-primary opacity-25 shadow-lg transition ease-in hover:scale-100 hover:opacity-100 md:w-[35rem] md:opacity-50">
5253
<Image
5354
className="h-full w-full rounded-lg"
5455
src={image}

components/repo-card.jsx

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
1-
import Link from 'next/link';
21
import React from 'react';
2+
3+
import Link from 'next/link';
4+
35
import { BiGitRepoForked, BiStar } from 'react-icons/bi';
46

57
const RepoCard = ({ html_url, name, stargazers_count, forks_count, description, topics }) => {
68
return (
7-
<article className="bg-card border-background transform rounded-lg border-2 p-4 text-white transition-transform ease-in hover:scale-[1.02] hover:shadow-lg">
9+
<article className="transform rounded-lg border-2 border-background bg-card p-4 text-white transition-transform ease-in hover:scale-[1.02] hover:shadow-lg">
810
<div className="flex h-[7.5rem] flex-col justify-between">
911
<div className="mb-2 flex items-center justify-between">
10-
<h2 className="hover:text-primary-foreground text-primary inline-block text-lg font-bold transition ease-in">
12+
<h2 className="inline-block text-lg font-bold text-primary transition ease-in hover:text-primary-foreground">
1113
<Link href={html_url} target="_blank">
1214
{name}
1315
</Link>
@@ -25,12 +27,12 @@ const RepoCard = ({ html_url, name, stargazers_count, forks_count, description,
2527
</div>
2628
</div>
2729

28-
<p className="text-muted h-12 overflow-hidden">{description}</p>
30+
<p className="h-12 overflow-hidden text-muted">{description}</p>
2931

3032
<ul className="mt-3 flex cursor-default gap-2">
3133
{topics?.slice(0, 3).map((topic, index) => (
3234
<li
33-
className="bg-background overflow-hidden truncate rounded-3xl px-2 text-sm"
35+
className="overflow-hidden truncate rounded-3xl bg-background px-2 text-sm"
3436
key={index}
3537
>
3638
{topic}

0 commit comments

Comments
 (0)