Skip to content

Commit b6f11c0

Browse files
committed
refactor: remove ESLint configuration and adjust class order for consistency
1 parent ddb9764 commit b6f11c0

Some content is hidden

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

55 files changed

+232
-216
lines changed

.eslintrc

Lines changed: 0 additions & 12 deletions
This file was deleted.

eslint.config.mjs

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
import pluginNext from '@next/eslint-plugin-next'
2+
import parser from '@typescript-eslint/parser' // optional
3+
import tailwind from 'eslint-plugin-tailwindcss'
4+
5+
export default [
6+
...tailwind.configs['flat/recommended'],
7+
{
8+
name: 'ESLint Config - nextjs',
9+
languageOptions: {
10+
parser, // optional
11+
parserOptions: {
12+
ecmaVersion: 'latest',
13+
sourceType: 'module',
14+
ecmaFeatures: {
15+
jsx: true,
16+
},
17+
},
18+
},
19+
settings: {
20+
tailwindcss: {
21+
callees: ['classnames', 'clsx', 'ctl', 'cn', 'cva'],
22+
},
23+
},
24+
plugins: {
25+
'@next/next': pluginNext,
26+
},
27+
files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'],
28+
rules: {
29+
...pluginNext.configs.recommended.rules,
30+
...pluginNext.configs['core-web-vitals'].rules,
31+
},
32+
},
33+
]

package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
"react-dom": "19.0.0",
3333
"react-github-calendar": "4.5.1",
3434
"react-gtm-module": "2.0.11",
35-
"react-i18next": "15.1.0",
35+
"react-i18next": "15.1.4",
3636
"react-intersection-observer": "9.13.1",
3737
"react-responsive-carousel": "3.2.23",
3838
"react-transition-group": "4.4.5",
@@ -54,15 +54,14 @@
5454
"eslint": "9.16.0",
5555
"eslint-config-next": "15.0.4",
5656
"eslint-config-prettier": "9.1.0",
57-
"eslint-plugin-jsx-a11y": "6.10.2",
5857
"eslint-plugin-tailwindcss": "^3.17.5",
5958
"globby": "14.0.2",
6059
"gray-matter": "4.0.3",
61-
"husky": "9.1.6",
60+
"husky": "9.1.7",
6261
"lint-staged": "15.2.10",
6362
"plaiceholder": "3.0.0",
64-
"postcss": "8.4.47",
65-
"prettier": "3.3.3",
63+
"postcss": "8.4.49",
64+
"prettier": "3.4.2",
6665
"sharp": "0.33.5",
6766
"tailwindcss": "3.4.14",
6867
"typescript": "5.7.2"

pnpm-lock.yaml

Lines changed: 0 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/app/about/page.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ const AboutMePage: NextPage = async () => {
3939
>
4040
<h3 className="mb-4 text-xl">{detail.label}</h3>
4141
<div
42-
className="text-justify max-w-screen-md px-4"
42+
className="max-w-screen-md px-4 text-justify"
4343
dangerouslySetInnerHTML={{
4444
__html: dompurify.sanitize(detail.content),
4545
}}
@@ -52,7 +52,7 @@ const AboutMePage: NextPage = async () => {
5252
<h2 className="text-center">This website is powered by</h2>
5353
<TechStackCarousel techStacks={techStacks} />
5454

55-
<section className="mt-4 mb-2">
55+
<section className="mb-2 mt-4">
5656
<h4 className="text-center">
5757
This awesome carousel is easily made using&nbsp;
5858
<NextLink

src/app/blog/BlogsWrapper.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ const BlogsWrapper = ({blogs}: {blogs: IBlogMetadata[]}) => {
7474
<h2>Empty result👎</h2>
7575
<h3>Try a different combination</h3>
7676
<button
77-
className="px-4 py-2 mt-4 text-white bg-primary-600 rounded-md hover:bg-primary-700"
77+
className="mt-4 rounded-md bg-primary-600 px-4 py-2 text-white hover:bg-primary-700"
7878
onClick={() => {
7979
setSelectedTags(null);
8080
setSearch(null);

src/app/blog/SearchField.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ function DebouncedInput({
4444
return (
4545
<input
4646
{...props}
47-
className="md:pl-8 bg-transparent focus:outline-none w-full ring-1 ring-neutral-500 dark:ring-neutral-200 rounded-md"
47+
className="w-full rounded-md bg-transparent ring-1 ring-neutral-500 focus:outline-none dark:ring-neutral-200 md:pl-8"
4848
value={value}
4949
onChange={e => setValue(e.target.value)}
5050
/>
@@ -72,16 +72,16 @@ export default function SearchField() {
7272
};
7373

7474
return (
75-
<div className="relative flex items-center w-96">
76-
<SearchIcon className="absolute w-4 h-4 ml-2 text-neutral-600 dark:text-neutral-200" />
75+
<div className="relative flex w-96 items-center">
76+
<SearchIcon className="absolute ml-2 size-4 text-neutral-600 dark:text-neutral-200" />
7777
<DebouncedInput
7878
placeholder="Filter by title or description"
7979
value={searchFilter}
8080
onChange={handleGlobalFilterChange}
8181
/>
8282
{searchFilter && (
8383
<div
84-
className="absolute w-4 h-4 mr-2 right-0 flex"
84+
className="absolute right-0 mr-2 flex size-4"
8585
onClick={() => {
8686
setSearchFilter(null);
8787
}}

src/app/blog/[slug]/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ const BlogPage: NextPage<{
6868

6969
if (!blog) {
7070
return (
71-
<div className="h-[80vh] w-full bg-transparent text-center pt-10">
71+
<div className="h-[80vh] w-full bg-transparent pt-10 text-center">
7272
<h2>Please wait</h2>
7373
<h3>Using magic to load content...</h3>
7474
</div>

src/app/blog/page.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ async function BlogPage() {
2121

2222
return (
2323
<>
24-
<main className="flex items-center flex-col sm:pt-12">
24+
<main className="flex flex-col items-center sm:pt-12">
2525
<h1>{t('myBlogs')}</h1>
2626
<BlogsWrapper blogs={blogs} />
2727
</main>

src/app/error.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export default function Error({
1111
}) {
1212
useEffect(() => {
1313
// Log the error to an error reporting service
14-
// eslint-disable-next-line no-console
14+
1515
console.error(error);
1616
}, [error]);
1717

0 commit comments

Comments
 (0)