Skip to content

Commit c48d4b0

Browse files
authored
Merge pull request #2 from Mahrjose/dev
Refactor: SEO Integration, Configuration Hardening, and Codebase Modernization
2 parents cf5d8bc + 8bd992a commit c48d4b0

30 files changed

+743
-497
lines changed

eslint.config.mjs

Lines changed: 46 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,47 @@
1-
import { dirname } from "path";
2-
import { fileURLToPath } from "url";
3-
import { FlatCompat } from "@eslint/eslintrc";
1+
import js from '@eslint/js';
2+
import typescriptParser from '@typescript-eslint/parser';
3+
import typescriptPlugin from '@typescript-eslint/eslint-plugin';
4+
import nextPlugin from '@next/eslint-plugin-next';
5+
import reactPlugin from 'eslint-plugin-react';
6+
import reactHooksPlugin from 'eslint-plugin-react-hooks';
47

5-
const __filename = fileURLToPath(import.meta.url);
6-
const __dirname = dirname(__filename);
7-
8-
const compat = new FlatCompat({
9-
baseDirectory: __dirname,
10-
});
11-
12-
const eslintConfig = [
13-
...compat.extends("next/core-web-vitals", "next/typescript"),
14-
];
15-
16-
export default eslintConfig;
8+
export default [
9+
js.configs.recommended,
10+
{
11+
...nextPlugin.configs['core-web-vitals'],
12+
plugins: {
13+
'@next/next': nextPlugin,
14+
},
15+
},
16+
{
17+
files: ['**/*.{ts,tsx}'],
18+
languageOptions: {
19+
parser: typescriptParser,
20+
parserOptions: {
21+
ecmaVersion: 'latest',
22+
sourceType: 'module',
23+
project: './tsconfig.json',
24+
},
25+
},
26+
plugins: {
27+
'@typescript-eslint': typescriptPlugin,
28+
react: reactPlugin,
29+
'react-hooks': reactHooksPlugin,
30+
},
31+
rules: {
32+
...typescriptPlugin.configs.recommended.rules,
33+
...reactPlugin.configs.recommended.rules,
34+
...reactHooksPlugin.configs.recommended.rules,
35+
'@next/next/no-img-element': 'off',
36+
'@typescript-eslint/no-unused-vars': 'warn',
37+
'react/jsx-key': 'warn',
38+
'react/prop-types': 'off',
39+
'react/react-in-jsx-scope': 'off',
40+
},
41+
settings: {
42+
react: {
43+
version: 'detect',
44+
},
45+
},
46+
},
47+
];

next.config.ts

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
import type { NextConfig } from "next";
22

33
const nextConfig: NextConfig = {
4+
reactStrictMode: true,
45
eslint: {
5-
ignoreDuringBuilds: true,
6+
ignoreDuringBuilds: false,
67
},
78
typescript: {
8-
ignoreBuildErrors: true,
9+
ignoreBuildErrors: false,
910
},
1011
images: {
1112
remotePatterns: [
@@ -15,6 +16,20 @@ const nextConfig: NextConfig = {
1516
},
1617
],
1718
},
19+
trailingSlash: false,
20+
poweredByHeader: false,
21+
async headers() {
22+
return [
23+
{
24+
source: '/(.*)',
25+
headers: [
26+
{ key: 'X-Content-Type-Options', value: 'nosniff' },
27+
{ key: 'X-Frame-Options', value: 'SAMEORIGIN' },
28+
{ key: 'Referrer-Policy', value: 'strict-origin-when-cross-origin' },
29+
],
30+
},
31+
];
32+
},
1833
};
1934

2035
export default nextConfig;

package-lock.json

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

package.json

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"scripts": {
66
"dev": "next dev --turbopack",
77
"build": "next build",
8+
"postbuild": "next-sitemap --config ./sitemap.config.ts",
89
"start": "next start",
910
"lint": "next lint"
1011
},
@@ -47,11 +48,13 @@
4748
"input-otp": "^1.4.2",
4849
"lucide-react": "^0.514.0",
4950
"next": "15.3.3",
51+
"next-seo": "^6.8.0",
52+
"next-sitemap": "^4.2.3",
5053
"next-themes": "^0.4.6",
5154
"postcss": "^8.5.4",
52-
"react": "^19.0.0",
55+
"react": "^19.1.0",
5356
"react-day-picker": "^9.7.0",
54-
"react-dom": "^19.0.0",
57+
"react-dom": "^19.1.0",
5558
"react-hook-form": "^7.57.0",
5659
"react-icons": "^5.5.0",
5760
"react-resizable-panels": "^3.0.2",

public/images/banner/og-image.jpg

56.2 KB
Loading

public/robots.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# *
2+
User-agent: *
3+
Allow: /
4+
5+
# Host
6+
Host: https://mahrabhossain.me
7+
8+
# Sitemaps
9+
Sitemap: https://mahrabhossain.me/sitemap.xml

public/sitemap-0.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:news="http://www.google.com/schemas/sitemap-news/0.9" xmlns:xhtml="http://www.w3.org/1999/xhtml" xmlns:mobile="http://www.google.com/schemas/sitemap-mobile/1.0" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1" xmlns:video="http://www.google.com/schemas/sitemap-video/1.1">
3+
<url><loc>https://mahrabhossain.me/contact</loc><lastmod>2025-06-13T21:04:51.929Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
4+
<url><loc>https://mahrabhossain.me/research</loc><lastmod>2025-06-13T21:04:51.929Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
5+
<url><loc>https://mahrabhossain.me/resume</loc><lastmod>2025-06-13T21:04:51.929Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
6+
<url><loc>https://mahrabhossain.me/projects</loc><lastmod>2025-06-13T21:04:51.929Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
7+
<url><loc>https://mahrabhossain.me</loc><lastmod>2025-06-13T21:04:51.929Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
8+
<url><loc>https://mahrabhossain.me/about</loc><lastmod>2025-06-13T21:04:51.929Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
9+
<url><loc>https://mahrabhossain.me/education</loc><lastmod>2025-06-13T21:04:51.929Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
10+
<url><loc>https://mahrabhossain.me/blog</loc><lastmod>2025-06-13T21:04:51.929Z</lastmod><changefreq>daily</changefreq><priority>0.7</priority></url>
11+
</urlset>

public/sitemap.xml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<sitemapindex xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
3+
<sitemap><loc>https://mahrabhossain.me/sitemap-0.xml</loc></sitemap>
4+
</sitemapindex>

0 commit comments

Comments
 (0)