Skip to content

Commit 828ff67

Browse files
committed
Added Linting
1 parent 03271a4 commit 828ff67

18 files changed

+60
-67
lines changed

src/App.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ function App() {
9090
setLoading(false);
9191
}, 500);
9292
})
93-
.catch(err => {
93+
.catch(() => {
9494
// Continue anyway after a timeout
9595
setTimeout(() => {
9696
setLoading(false);

src/components/about/Timeline.jsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,8 @@ const Timeline = ({ experiences = [] }) => {
123123
if (!timelineRef.current) return;
124124

125125
const timelineItems = timelineRef.current.querySelectorAll('.timeline-item');
126-
const timelineTop = timelineRef.current.getBoundingClientRect().top;
126+
// Remove or comment out this line:
127+
// const timelineTop = timelineRef.current.getBoundingClientRect().top;
127128
const viewportHeight = window.innerHeight;
128129

129130
// Calculate which item should be active based on scroll position

src/components/common/LoadingScreen.jsx

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,19 @@ const LoadingScreen = ({ progress = 0, isComplete = false, minDisplayTime = 1000
4747
useEffect(() => {
4848
if (!loadingRef.current) return;
4949

50+
// Capture the ref at the top of the effect function
51+
const currentRef = loadingRef.current;
52+
5053
// Create entrance animation
5154
gsap.fromTo(
52-
loadingRef.current.querySelectorAll('.animate-item'),
55+
currentRef.querySelectorAll('.animate-item'),
5356
{ y: 20, opacity: 0 },
5457
{ y: 0, opacity: 1, stagger: 0.1, duration: 0.5, ease: 'power3.out' }
5558
);
5659

5760
return () => {
58-
if (loadingRef.current) {
59-
gsap.to(loadingRef.current, {
61+
if (currentRef) {
62+
gsap.to(currentRef, {
6063
opacity: 0,
6164
duration: 0.5,
6265
});

src/components/common/NavigationPulsar.jsx

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,6 @@ const NavigationPulsar = () => {
2020
{ path: '/hxndev.github.io/contact', label: 'Contact', icon: <IconMail size={20} /> },
2121
];
2222

23-
// Get current section
24-
const currentPath =
25-
navigationItems.find(item => item.path === location.pathname) || navigationItems[0];
26-
2723
// Handle navigation click
2824
const handleNavigate = path => {
2925
setExpanded(false);

src/components/contact/ContactForm.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const ContactForm = () => {
2020
});
2121

2222
const [errors, setErrors] = useState({});
23-
const [focused, setFocused] = useState(null);
23+
const [_focused, setFocused] = useState(null);
2424
const [loading, setLoading] = useState(false);
2525
const [submitted, setSubmitted] = useState(false);
2626

src/components/projects/ProjectDetail.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import { useAnimationContext } from '../../context/AnimationContext';
2525

2626
const ProjectDetail = ({ project, onBack }) => {
2727
const containerRef = useRef(null);
28-
const { colorScheme, quantumColors } = useColorScheme();
28+
const { colorScheme } = useColorScheme();
2929
const { reducedMotion } = useAnimationContext();
3030
const isDark = colorScheme === 'dark';
3131

src/components/projects/ProjectGallery.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ import { gsap } from 'gsap';
55
import ProjectCard from './ProjectCard';
66
import { useAnimationContext } from '../../context/AnimationContext';
77

8-
const ProjectGallery = ({ projects, filteredProjects, searchQuery, onViewDetails }) => {
8+
const ProjectGallery = ({ filteredProjects, searchQuery, onViewDetails }) => {
99
const galleryRef = useRef(null);
1010
const { reducedMotion } = useAnimationContext();
1111
const [animationComplete, setAnimationComplete] = useState(false);

src/components/utils/browserDetection.jsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ export const detectFeatures = () => {
8080
window.WebGLRenderingContext &&
8181
(canvas.getContext('webgl') || canvas.getContext('experimental-webgl'))
8282
);
83-
} catch (e) {
83+
} catch {
8484
return false;
8585
}
8686
})(),
@@ -89,7 +89,7 @@ export const detectFeatures = () => {
8989
try {
9090
const canvas = document.createElement('canvas');
9191
return !!(window.WebGL2RenderingContext && canvas.getContext('webgl2'));
92-
} catch (e) {
92+
} catch {
9393
return false;
9494
}
9595
})(),

src/context/AnimationContext.jsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import React, { createContext, useContext, useState, useEffect, useReducer } from 'react';
1+
import React, { createContext, useContext, useEffect, useReducer } from 'react';
22
import { configureGsap } from '../animations/gsap';
33

44
// Initial state
@@ -139,10 +139,10 @@ export function AnimationProvider({ children }) {
139139

140140
mediaQuery.addEventListener('change', handleChange);
141141
return () => mediaQuery.removeEventListener('change', handleChange);
142-
}, []);
142+
}, [state.reducedMotion]);
143143

144144
return <AnimationContext.Provider value={state}>{children}</AnimationContext.Provider>;
145145
}
146146

147-
// Hook to use animation context
147+
// eslint-disable-next-line react-refresh/only-export-components
148148
export const useAnimationContext = () => useContext(AnimationContext);

src/hooks/useAnimation.jsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { useState, useEffect, useContext, useRef } from 'react';
1+
import { useState, useEffect } from 'react';
22
import { useScrollVelocity } from './useScrollVelocity';
33

44
/**

0 commit comments

Comments
 (0)