Skip to content

Commit b87ed4f

Browse files
committed
feat: introduce eslint-plugin-tailwindcss
1 parent 79b9192 commit b87ed4f

47 files changed

Lines changed: 322 additions & 173 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

app/layout.tsx

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -162,18 +162,18 @@ export default function RootLayout({
162162
<ServiceWorkerRegister />
163163
<main
164164
className={cx(
165-
'mt-4 mb-19 mx-3 min-w-65 text-white2',
165+
'text-white2 mx-3 mt-4 mb-19 min-w-65',
166166
'md:mt-15 md:mb-25 xl:mb-15',
167-
'2xl:max-w-300 2xl:mx-auto',
168-
'flex flex-col 2xl:flex-row 2xl:justify-center 2xl:items-stretch 2xl:gap-6',
169-
'print:text-black print:!m-0',
167+
'2xl:mx-auto 2xl:max-w-300',
168+
'flex flex-col 2xl:flex-row 2xl:items-stretch 2xl:justify-center 2xl:gap-6',
169+
'print:!m-0 print:text-black',
170170
)}
171171
>
172172
<div
173173
className={cx(
174174
'order-2',
175-
'xl:relative xl:w-max xl:m-auto',
176-
'2xl:min-w-[75%] 2xl:w-[75%] 2xl:m-0',
175+
'xl:relative xl:m-auto xl:w-max',
176+
'2xl:m-0 2xl:w-[75%] 2xl:min-w-[75%]',
177177
)}
178178
>
179179
<NavBar />

components/About/AboutText.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export const AboutText = () => {
66
<section
77
className={cx(
88
'text-lightGray text-3.5 md:text-4 font-300 leading-x1.6 md:mb-10',
9-
'print:text-inherit print:!mb-0',
9+
'print:!mb-0 print:text-inherit',
1010
)}
1111
>
1212
{userData.intro.map((text, index) => {

components/About/ClientItem.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,16 @@ export const ClientItem = ({ name, link }: { name: string; link: string }) => {
1818
className={cx(
1919
'min-w-[calc(50%-8px)] sm:min-w-[calc(33.33%-10px)]',
2020
'md:min-w-[calc(33.33%-35px)] xl:min-w-[calc(25%-38px)]',
21-
'snap-start aspect-5/3 overflow-hidden',
22-
'print:min-w-0 print:aspect-auto',
21+
'aspect-5/3 snap-start overflow-hidden',
22+
'print:aspect-auto print:min-w-0',
2323
)}
2424
>
2525
<a
2626
href={link}
2727
target="_blank"
2828
rel="noreferrer noopener"
2929
title={name}
30-
className="relative block w-full h-full"
30+
className="relative block h-full w-full"
3131
>
3232
<div
3333
className={cx(
@@ -38,8 +38,8 @@ export const ClientItem = ({ name, link }: { name: string; link: string }) => {
3838
/>
3939
<p
4040
className={cx(
41-
'absolute -left-250 -top-250',
42-
'print:relative print:left-auto print:top-auto print:font-300',
41+
'absolute -top-250 -left-250',
42+
'print:font-300 print:relative print:top-auto print:left-auto',
4343
)}
4444
>
4545
{name}

components/About/Clients.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@ import { ClientItem } from './ClientItem';
55
export const Clients = () => {
66
return (
77
<section className="mb-4 break-inside-avoid">
8-
<h3 className="text-white2 capitalize text-4.5 md:text-6 print:text-inherit print:mb-2">
8+
<h3 className="text-white2 text-4.5 md:text-6 capitalize print:mb-2 print:text-inherit">
99
Who I work for
1010
</h3>
1111

1212
<ul
1313
className={cx(
14-
'flex justify-start items-start gap-4 md:gap-8',
15-
'my-0 -mx-4 md:-mx-7.5 p-6 md:p-11',
14+
'flex items-start justify-start gap-4 md:gap-8',
15+
'-mx-4 my-0 p-6 md:-mx-7.5 md:p-11',
1616
'flex-wrap sm:flex-nowrap',
17-
'sm:overflow-x-auto scroll-smooth',
17+
'scroll-smooth sm:overflow-x-auto',
1818
'overscroll-inline-contain snap-inline-mandatory',
1919
'scroll-px-6 md:scroll-px-11',
2020
'webkit-scrollbar:w-1.25 webkit-scrollbar:h-1.25',
@@ -24,7 +24,7 @@ export const Clients = () => {
2424
'webkit-scrollbar-thumb:rounded-1.25',
2525
'webkit-scrollbar-button:w-5',
2626
'lg:webkit-scrollbar-button:w-25',
27-
'print:flex-col print:m-0 print:p-0 print:gap-0',
27+
'print:m-0 print:flex-col print:gap-0 print:p-0',
2828
)}
2929
>
3030
{companies.map(({ name, link }) => {

components/About/Service.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@ import { userData } from '../../src/data';
55
export const Service = () => {
66
return (
77
<section className="mb-9 print:mb-4">
8-
<h3 className="mb-5 text-white2 capitalize text-4.5 md:text-6 print:text-inherit print:mb-2">
8+
<h3 className="text-white2 text-4.5 md:text-6 mb-5 capitalize print:mb-2 print:text-inherit">
99
What I Am Doing
1010
</h3>
1111

1212
<ul
1313
className={cx(
14-
'grid grid-cols-1fr gap-5 xl:grid-cols-1fr1fr xl:gap-y-5 xl:gap-x-6',
14+
'grid-cols-1fr xl:grid-cols-1fr1fr grid gap-5 xl:gap-x-6 xl:gap-y-5',
1515
'print:!gap-0',
1616
)}
1717
>

components/About/ServiceItem.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,16 +20,16 @@ export const ServiceItem = ({
2020
return (
2121
<li
2222
className={cx(
23-
'relative bg-borderGradientOnyx p-5 rounded-3.5 shadow-2 xl:shadow-2xl z-1',
24-
'md:flex md:justify-start md:items-start md:gap-5 md:p-7.5',
25-
'print:bg-none print:border-none print:shadow-none print:p-0 print:!gap-0',
23+
'bg-borderGradientOnyx rounded-3.5 shadow-2 relative z-1 p-5 xl:shadow-2xl',
24+
'md:flex md:items-start md:justify-start md:gap-5 md:p-7.5',
25+
'print:!gap-0 print:border-none print:bg-none print:p-0 print:shadow-none',
2626
)}
2727
>
28-
<div className="absolute inset-px bg-eerieBlack1 bg-bgGradientJet rounded-inherit -z-1 print:hidden" />
29-
<div className="mb-2.5 md:mb-0 md:mt-1.25 print:hidden">
28+
<div className="bg-eerieBlack1 bg-bgGradientJet rounded-inherit absolute inset-px -z-1 print:hidden" />
29+
<div className="mb-2.5 md:mt-1.25 md:mb-0 print:hidden">
3030
<div
3131
className={cx(
32-
'mx-auto aspect-square bg-contain bg-center bg-no-repeat w-10 h-10',
32+
'mx-auto aspect-square h-10 w-10 bg-contain bg-center bg-no-repeat',
3333
classNames[id],
3434
)}
3535
title={name}
@@ -39,8 +39,8 @@ export const ServiceItem = ({
3939
<div className="text-center md:text-left">
4040
<h4
4141
className={cx(
42-
'mb-2 text-white2 capitalize text-4.5 md:text-6',
43-
'print:text-inherit print:text-4.5 print:mb-0',
42+
'text-white2 text-4.5 md:text-6 mb-2 capitalize',
43+
'print:text-4.5 print:mb-0 print:text-inherit',
4444
)}
4545
>
4646
{name}

components/Article.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ export const Article = ({ children }: { children?: ReactNode }) => {
66
<article
77
className={cx(
88
'animate-fade',
9-
'bg-eerieBlack2 border border-solid border-jet rounded-5 p-4 shadow-1 xl:shadow-1xl z-1',
10-
'md:w-130 md:mx-auto md:p-7.5',
11-
'lg:w-175 xl:w-237.5 xl:shadow-5 2xl:w-auto 2xl:min-h-full',
12-
'print:!w-full print:bg-inherit print:border-none print:shadow-none print:p-0',
9+
'bg-eerieBlack2 border-jet rounded-5 shadow-1 xl:shadow-1xl z-1 border border-solid p-4',
10+
'md:mx-auto md:w-130 md:p-7.5',
11+
'xl:shadow-5 lg:w-175 xl:w-237.5 2xl:min-h-full 2xl:w-auto',
12+
'print:!w-full print:border-none print:bg-inherit print:p-0 print:shadow-none',
1313
)}
1414
>
1515
{children}

components/ArticleTitle.tsx

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,18 @@ export const ArticleTitle = memo(({ title }: { title: string }) => {
66
<header>
77
<h2
88
className={cx(
9-
'relative text-white2 capitalize text-6 md:text-8',
10-
'pb-2 mb-4',
11-
'md:font-600 md:pb-4 md:mb-5',
9+
'text-white2 text-6 md:text-8 relative capitalize',
10+
'mb-4 pb-2',
11+
'md:font-600 md:mb-5 md:pb-4',
1212
'lg:pb-5',
1313
'print:hidden',
1414
)}
1515
>
1616
{title}
1717
<div
1818
className={cx(
19-
'absolute bottom-0 left-0 bg-textGradientYellow rounded-1',
20-
'w-7.5 h-1 md:w-10 md:h-1.25',
19+
'bg-textGradientYellow rounded-1 absolute bottom-0 left-0',
20+
'h-1 w-7.5 md:h-1.25 md:w-10',
2121
'print:hidden',
2222
)}
2323
aria-hidden

components/Blog/BlogItem.tsx

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,23 @@ export const BlogItem = (props: BlogItemProps) => {
2323
target="_blank"
2424
rel="noreferrer noopener"
2525
className={cx(
26-
'block relative bg-borderGradientOnyx h-full shadow-4 rounded-2xl z-1',
27-
'print:flex print:relative print:bg-none print:shadow-none',
26+
'bg-borderGradientOnyx shadow-4 relative z-1 block h-full rounded-2xl',
27+
'print:relative print:flex print:bg-none print:shadow-none',
2828
)}
2929
>
30-
<div className="absolute inset-px rounded-inherit bg-eerieBlack1 -z-1 print:hidden" />
30+
<div className="rounded-inherit bg-eerieBlack1 absolute inset-px -z-1 print:hidden" />
3131
<figure
3232
className={cx(
3333
'overflow-hidden',
34-
'w-full h-50 sm:h-auto sm:aspect-video xl:h-57.5 xl:aspect-auto',
34+
'h-50 w-full sm:aspect-video sm:h-auto xl:aspect-auto xl:h-57.5',
3535
'rounded-xl md:rounded-2xl',
36-
'print:w-50 print:h-50 print:mr-4 print:border-black print:border-px print:border-solid',
36+
'print:border-px print:mr-4 print:h-50 print:w-50 print:border-solid print:border-black',
3737
)}
3838
>
3939
<div
4040
className={cx(
41-
'w-full h-full bg-cover bg-center bg-no-repeat',
42-
'transition-all duration-250 ease-default group-hover:scale-110',
41+
'h-full w-full bg-cover bg-center bg-no-repeat',
42+
'ease-default transition-all duration-250 group-hover:scale-110',
4343
)}
4444
style={{
4545
backgroundImage: `url("${image}")`,
@@ -49,28 +49,28 @@ export const BlogItem = (props: BlogItemProps) => {
4949
</figure>
5050

5151
<div className="p-4 md:p-6 print:flex-1 print:!p-0">
52-
<div className="flex justify-start items-center gap-2 mb-2.5">
52+
<div className="mb-2.5 flex items-center justify-start gap-2">
5353
<span className="text-lightGray70 text-3.5 md:text-4 font-300 print:text-inherit">
5454
{category}
5555
</span>
5656

5757
<div
58-
className="bg-lightGray70 w-1 h-1 rounded print:bg-black"
58+
className="bg-lightGray70 h-1 w-1 rounded print:bg-black"
5959
aria-hidden
6060
/>
6161

6262
<time
6363
dateTime={datetime}
64-
className="block text-lightGray70 text-3.5 md:text-4 font-300 print:text-inherit"
64+
className="text-lightGray70 text-3.5 md:text-4 font-300 block print:text-inherit"
6565
>
6666
{formatDateTime(datetime)}
6767
</time>
6868
</div>
6969

7070
<h3
7171
className={cx(
72-
'mb-2.5 leading-x1.3 text-white2 capitalize text-4.5 md:text-6',
73-
'transition-all duration-250 ease-default group-hover:text-orangeYellowCrayola',
72+
'leading-x1.3 text-white2 text-4.5 md:text-6 mb-2.5 capitalize',
73+
'ease-default group-hover:text-orangeYellowCrayola transition-all duration-250',
7474
'print:text-inherit',
7575
)}
7676
>

components/Blog/BlogList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import type { BlogData } from '../../src/types';
44
export const BlogList = ({ blogs }: { blogs: BlogData[] }) => {
55
return (
66
<section className="mb-2.5">
7-
<ul className="grid grid-cols-1fr gap-5 md:gap-7.5 lg:grid-cols-1fr1fr print:!grid-cols-1fr">
7+
<ul className="grid-cols-1fr lg:grid-cols-1fr1fr print:!grid-cols-1fr grid gap-5 md:gap-7.5">
88
{blogs.map(({ id, link, title, desc, image, datetime, category }) => {
99
return (
1010
<BlogItem

0 commit comments

Comments
 (0)