Skip to content

Commit 0950e60

Browse files
committed
fix: resolve all TypeScript lint errors in test files
- Replace @ts-ignore with @ts-expect-error with descriptions - Replace 'any' types with proper typed alternatives ('unknown' where appropriate) - Fix require() imports to use ES6 imports - Remove unused variables and imports - Add proper type casting for mock objects (Request, nodemailer.Transporter) - Add eslint-disable comment for necessary require() in next.config.ts - Clean up standalone @ts-expect-error comments All 159 tests passing with 0 errors, only 2 acceptable warnings
1 parent 5c89283 commit 0950e60

33 files changed

+15579
-5152
lines changed

.commitlintrc.json

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
"extends": ["@commitlint/config-conventional"],
3+
"rules": {
4+
"type-enum": [
5+
2,
6+
"always",
7+
[
8+
"feat",
9+
"fix",
10+
"docs",
11+
"style",
12+
"refactor",
13+
"perf",
14+
"test",
15+
"build",
16+
"ci",
17+
"chore",
18+
"revert"
19+
]
20+
],
21+
"subject-case": [2, "never", ["upper-case"]],
22+
"header-max-length": [2, "always", 100]
23+
}
24+
}

.husky/commit-msg

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx --no -- commitlint --edit ${1}

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
npx lint-staged

.husky/pre-push

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
npm run type-check
2+
npm run lint

.lintstagedrc.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"*.{js,jsx,ts,tsx}": ["eslint --fix", "prettier --write"],
3+
"*.{json,md,css,scss}": ["prettier --write"]
4+
}

.prettierignore

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Dependencies
2+
node_modules
3+
.pnp
4+
.pnp.js
5+
6+
# Production
7+
.next
8+
out
9+
build
10+
dist
11+
12+
# Testing
13+
coverage
14+
15+
# Misc
16+
.DS_Store
17+
*.pem
18+
19+
# Debug
20+
npm-debug.log*
21+
yarn-debug.log*
22+
yarn-error.log*
23+
24+
# Local env files
25+
.env*.local
26+
.env
27+
28+
# Vercel
29+
.vercel
30+
31+
# TypeScript
32+
*.tsbuildinfo
33+
next-env.d.ts
34+
35+
# IDE
36+
.vscode
37+
.idea

.prettierrc

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"semi": true,
3+
"trailingComma": "es5",
4+
"singleQuote": false,
5+
"printWidth": 80,
6+
"tabWidth": 2,
7+
"useTabs": false,
8+
"arrowParens": "always",
9+
"endOfLine": "lf",
10+
"plugins": ["prettier-plugin-tailwindcss"]
11+
}

README.md

Lines changed: 38 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,14 @@ A cutting-edge, responsive portfolio built with **Next.js 15**, **TypeScript**,
1010
![GSAP](https://img.shields.io/badge/GSAP-3.0-88CE02)
1111
![Tailwind CSS](https://img.shields.io/badge/Tailwind%20CSS-3.0-38B2AC)
1212
![Vercel](https://img.shields.io/badge/Deployed%20on-Vercel-black)
13+
[![codecov](https://codecov.io/gh/rudra-sah00/Portfolio/branch/main/graph/badge.svg)](https://codecov.io/gh/rudra-sah00/Portfolio)
14+
![Build Status](https://github.com/rudra-sah00/Portfolio/workflows/CI%2FCD%20Pipeline/badge.svg)
15+
![Test Coverage](https://img.shields.io/badge/coverage-87%25-green)
1316

1417
## ✨ Features
1518

1619
### 🎯 Core Features
20+
1721
- **GitHub Integration**: Automatically fetches and displays your repositories with real-time data
1822
- **Organization Support**: Shows repositories from organizations you're part of with custom badges
1923
- **Interactive Terminal**: Built-in terminal with AI chat capabilities powered by Google Gemini
@@ -24,6 +28,7 @@ A cutting-edge, responsive portfolio built with **Next.js 15**, **TypeScript**,
2428
- **Performance Optimized**: Built with Next.js 15 App Router and optimized for speed
2529

2630
### 🎨 Animation Features
31+
2732
- **GSAP Timeline Animations**: Complex animation sequences with precise timing
2833
- **Scroll-Triggered Animations**: Elements animate as they enter the viewport
2934
- **Floating Dock**: Smooth hover animations for social media links
@@ -33,6 +38,7 @@ A cutting-edge, responsive portfolio built with **Next.js 15**, **TypeScript**,
3338
- **Stagger Animations**: Coordinated animations across multiple elements
3439

3540
### 📊 Repository Showcase
41+
3642
- **README Rendering**: Full GitHub-flavored markdown with syntax highlighting
3743
- **Mermaid Diagrams**: Supports complex Mermaid diagrams in README files
3844
- **Tech Stack Visualization**: Interactive language breakdown with animated progress bars
@@ -42,6 +48,7 @@ A cutting-edge, responsive portfolio built with **Next.js 15**, **TypeScript**,
4248
- **Real-time Data**: Fresh repository data fetched from GitHub API
4349

4450
### 🤖 AI Terminal Experience
51+
4552
- **Gemini Integration**: Advanced AI-powered chat assistance with context awareness
4653
- **Command System**: Full Unix-like command interface with autocomplete
4754
- **Contact Form**: Integrated email functionality with form validation
@@ -50,6 +57,7 @@ A cutting-edge, responsive portfolio built with **Next.js 15**, **TypeScript**,
5057
- **Chat Mode**: Seamless transition between command and chat modes
5158

5259
### 🎯 Advanced Customizations
60+
5361
- **Vercel Analytics**: Real-time website analytics and performance monitoring
5462
- **Speed Insights**: Page performance tracking and optimization
5563
- **Custom CSS Variables**: Consistent theming system across all components
@@ -66,36 +74,37 @@ graph TB
6674
A[Next.js 15 App Router] --> B[Server Components]
6775
A --> C[Client Components]
6876
A --> D[GSAP Animations]
69-
77+
7078
B --> E[API Routes]
7179
E --> F[GitHub API]
7280
E --> G[Email Service]
7381
E --> H[Gemini AI]
74-
82+
7583
C --> I[Terminal Engine]
7684
C --> J[Scroll Animations]
7785
C --> K[Project Showcase]
7886
C --> L[Floating Dock UI]
79-
87+
8088
D --> M[Timeline Animations]
8189
D --> N[Scroll Triggers]
8290
D --> O[Interactive Effects]
83-
91+
8492
F --> P[Repository Data]
8593
F --> Q[README Content]
8694
F --> R[Language Stats]
8795
F --> S[Organization Info]
88-
96+
8997
G --> T[Contact Form]
9098
I --> U[AI Chat Mode]
91-
99+
92100
style A fill:#0070f3
93101
style F fill:#24292e
94102
style H fill:#4285f4
95103
style D fill:#88CE02
96104
```
97105

98106
### 🛠️ Tech Stack
107+
99108
- **Frontend**: Next.js 15, React 18, TypeScript 5
100109
- **Styling**: Tailwind CSS, CSS Modules, Custom CSS Variables
101110
- **Animations**: GSAP 3, Framer Motion, CSS Transitions
@@ -107,29 +116,34 @@ graph TB
107116
## 🚀 Quick Start
108117

109118
### Prerequisites
110-
- Node.js 18+
119+
120+
- Node.js 18+
111121
- npm/yarn/pnpm
112122

113123
### Installation
114124

115125
1. **Clone the repository**
126+
116127
```bash
117128
git clone https://github.com/rudra-sah00/portfolio.git
118129
cd portfolio
119130
```
120131

121132
2. **Install dependencies**
133+
122134
```bash
123135
npm install
124136
```
125137

126138
3. **Configure GitHub Username**
127139
Update the username in `src/components/ProjectsSection.tsx`:
140+
128141
```typescript
129-
const username = 'your-github-username';
142+
const username = "your-github-username";
130143
```
131144

132145
4. **Start Development Server**
146+
133147
```bash
134148
npm run dev
135149
```
@@ -176,6 +190,7 @@ portfolio/
176190
### GitHub Token Setup
177191

178192
The portfolio comes with a pre-configured GitHub token for fetching repository data. If you need to use your own token, update it in:
193+
179194
- `src/app/api/repositories/route.ts` (line 23)
180195

181196
### AI Chat Integration
@@ -189,44 +204,50 @@ Contact form emails are configured to work out of the box.
189204
## 🎨 Customization
190205

191206
### Styling
207+
192208
- **CSS Variables**: Located in `src/app/globals.css`
193209
- **Component Styles**: Individual `.module.css` files
194210
- **Responsive Design**: Mobile-first approach with breakpoints
195211

196212
### GitHub Integration
213+
197214
- **Username**: Update in `ProjectsSection.tsx`
198215
- **Repository Filtering**: Modify API route logic
199216
- **README Rendering**: Customize in `ReadmeViewer.tsx`
200217

201218
### Terminal Commands
219+
202220
- **Add Commands**: Extend `src/lib/terminal/commands/index.ts`
203221
- **AI Integration**: Configure in `src/lib/terminal/chat/`
204222

205223
## 📊 Features in Detail
206224

207225
### Repository Showcase
226+
208227
```mermaid
209228
sequenceDiagram
210229
participant Client
211230
participant API
212231
participant GitHub
213-
232+
214233
Client->>API: Request repositories
215234
API->>GitHub: Fetch user repos
216235
API->>GitHub: Fetch org repos
217236
API->>GitHub: Fetch README content
218237
API->>GitHub: Fetch language stats
219238
API->>Client: Return processed data
220-
239+
221240
Note over Client: Render with animations
222241
```
223242

224243
### Tech Stack Visualization
244+
225245
- Language percentage calculation
226246
- Color-coded progress bars
227247
- Responsive layout
228248

229249
### Organization Support
250+
230251
- Automatic detection of organization repositories
231252
- Visual badges with organization names
232253
- Separate filtering and display logic
@@ -236,6 +257,7 @@ sequenceDiagram
236257
### Vercel (Recommended)
237258

238259
1. **Connect Repository**
260+
239261
```bash
240262
vercel --prod
241263
```
@@ -249,6 +271,7 @@ sequenceDiagram
249271
### Other Platforms
250272

251273
Build the project:
274+
252275
```bash
253276
npm run build
254277
```
@@ -272,11 +295,11 @@ npm run build
272295

273296
All API keys are pre-configured in the application:
274297

275-
| Service | Status | Location |
276-
|---------|--------|----------|
277-
| GitHub API | ✅ Configured | `src/app/api/repositories/route.ts` |
278-
| Gemini AI | ✅ Configured | `src/lib/terminal/chat/gemini.ts` |
279-
| Email Service | ✅ Configured | `src/app/api/contact/route.ts` |
298+
| Service | Status | Location |
299+
| ------------- | ------------- | ----------------------------------- |
300+
| GitHub API | ✅ Configured | `src/app/api/repositories/route.ts` |
301+
| Gemini AI | ✅ Configured | `src/lib/terminal/chat/gemini.ts` |
302+
| Email Service | ✅ Configured | `src/app/api/contact/route.ts` |
280303

281304
**Note**: API keys are hardcoded for easy deployment. For production use with sensitive data, consider using environment variables.
282305

0 commit comments

Comments
 (0)