Skip to content

Commit 7d5e330

Browse files
kitfunsoclaude
andcommitted
chore: remove unused variables and imports
Cleaned up 24 lint warnings across 19 files: - Removed unused imports (COMMON_EXPENSES, CONCRETE_PRICES, Slider, etc.) - Removed unused variables (winnerColor, tableWidth, currencySymbol, etc.) - Removed dead code assignments All 109 test files (444 tests) still pass. Lint now reports 0 errors and 0 warnings. Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 60afa5f commit 7d5e330

19 files changed

Lines changed: 5 additions & 67 deletions

File tree

src/components/calculators/BuyVsRent/BuyVsRent.tsx

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -48,14 +48,6 @@ export default function BuyVsRent() {
4848
setInputs(getDefaultInputs(newCurrency));
4949
};
5050

51-
// Get winner color
52-
const winnerColor =
53-
result.finalComparison.winner === 'buy'
54-
? 'text-emerald-400'
55-
: result.finalComparison.winner === 'rent'
56-
? 'text-blue-400'
57-
: 'text-[var(--color-cream)]';
58-
5951
return (
6052
<ThemeProvider defaultColor="green">
6153
<Card variant="elevated">

src/components/calculators/CarBuyLease/calculations.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,13 +38,11 @@ export function calculateCarBuyLease(inputs: CarBuyLeaseInputs): CarBuyLeaseResu
3838

3939
// Year-by-year comparison
4040
const yearByYear: YearComparison[] = [];
41-
const totalMonths = yearsToOwn * 12;
4241

4342
let buyCumulative = downPayment;
4443
let leaseCumulative = leaseDownPayment;
4544
let currentCarValue = vehiclePrice;
4645
let loanBalance = loanAmount;
47-
let leaseNumber = 1;
4846
let leaseMonthsUsed = 0;
4947
let totalExcessMiles = 0;
5048

@@ -87,7 +85,6 @@ export function calculateCarBuyLease(inputs: CarBuyLeaseInputs): CarBuyLeaseResu
8785
// Start new lease
8886
leaseYearCost += leaseDownPayment;
8987
leaseMonthsUsed = 0;
90-
leaseNumber++;
9188
}
9289
}
9390
leaseCumulative += leaseYearCost;

src/components/calculators/ConferenceRoomCalculator/calculations.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,6 @@ export function calculateConferenceRoom(inputs: ConferenceRoomInputs): Conferenc
144144
};
145145
} else if (seatingStyle === 'boardroom') {
146146
// Single large table
147-
const tableWidth = Math.min(5, effectiveWidth * 0.4);
148147
const tableLength2 = Math.min(seatingLength - 4, 20);
149148
const seatsLong = Math.floor(tableLength2 / 2.5) * 2; // both long sides
150149
const seatsShort = 2; // ends

src/components/calculators/ConsultingRate/ConsultingRate.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
import { useState, useMemo } from 'preact/hooks';
88
import { calculateConsultingRate } from './calculations';
9-
import { getDefaultInputs, type ConsultingRateInputs, COMMON_EXPENSES } from './types';
9+
import { getDefaultInputs, type ConsultingRateInputs } from './types';
1010
import {
1111
type Currency,
1212
getCurrencySymbol,

src/components/calculators/EmployeeCost/calculations.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,6 @@ export function calculateEmployeeCost(inputs: EmployeeCostInputs): EmployeeCostR
3030
const totalPtoDays = ptoDays + holidays;
3131
const workingDaysPerYear = weeksPerYear * 5 - totalPtoDays;
3232
const actualWorkingHours = workingDaysPerYear * (hoursPerWeek / 5);
33-
const totalAnnualHours = weeksPerYear * hoursPerWeek;
34-
35-
// Cost of PTO (paid for time not worked)
36-
const dailyRate = annualSalary / (weeksPerYear * 5);
37-
const ptoCost = dailyRate * totalPtoDays;
3833

3934
// Total benefits cost
4035
const totalBenefits = healthInsurance + retirementMatch + otherBenefits;

src/components/calculators/FenceCalculator/FenceCalculator.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ import { calculateFence } from './calculations';
99
import {
1010
getDefaultInputs,
1111
MATERIAL_PRICES,
12-
CONCRETE_PRICES,
1312
type FenceCalculatorInputs,
1413
type FenceMaterial,
1514
type FenceHeight,

src/components/calculators/GraduationPartyPlanner/calculations.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ export function calculateGraduationParty(inputs: GraduationPartyInputs): Graduat
1515
currency,
1616
guestCount,
1717
graduationType,
18-
partyStyle,
1918
menuStyle,
2019
partyDuration,
2120
includeMainDish,

src/components/calculators/JobOfferComparison/JobOfferComparison.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ import {
2121
CurrencySelector,
2222
Label,
2323
Input,
24-
Slider,
2524
Grid,
2625
Divider,
2726
ResultCard,

src/components/calculators/MovingCost/MovingCost.tsx

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,7 @@ import {
1414
type MoveMethod,
1515
type Season,
1616
} from './types';
17-
import {
18-
type Currency,
19-
getCurrencySymbol,
20-
getInitialCurrency,
21-
formatCurrency,
22-
} from '../../../lib/regions';
17+
import { type Currency, getInitialCurrency, formatCurrency } from '../../../lib/regions';
2318
import {
2419
ThemeProvider,
2520
Card,
@@ -67,8 +62,6 @@ export default function MovingCost() {
6762
getDefaultInputs(getInitialCurrency())
6863
);
6964

70-
const currencySymbol = getCurrencySymbol(inputs.currency);
71-
7265
const result = useMemo(() => calculateMovingCost(inputs), [inputs]);
7366

7467
const updateInput = <K extends keyof MovingCostInputs>(field: K, value: MovingCostInputs[K]) => {

src/components/calculators/OvertimeCalculator/calculations.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ import { US_TAX_BRACKETS, UK_TAX_BRACKETS } from './types';
99
import type { Currency } from '../../../lib/regions';
1010
import { formatCurrency as formatCurrencyByRegion } from '../../../lib/regions';
1111

12-
/** FICA tax rate (Social Security 6.2% + Medicare 1.45%) */
13-
const FICA_RATE = 0.0765;
14-
1512
/** Social Security wage base for 2025 */
1613
const SS_WAGE_BASE = 176100;
1714

@@ -133,12 +130,10 @@ export function calculateOvertime(inputs: OvertimeCalculatorInputs): OvertimeCal
133130

134131
// Monthly breakdown showing cumulative effect and diminishing returns
135132
const monthlyBreakdown: OvertimeCalculatorResult['monthlyBreakdown'] = [];
136-
let cumulativeGross = 0;
137133
let cumulativeNet = 0;
138134

139135
for (let month = 1; month <= 12; month++) {
140136
const monthlyGross = (weeklyGrossOT * WEEKS_PER_YEAR) / 12;
141-
cumulativeGross += monthlyGross;
142137

143138
// Calculate tax with progressive income
144139
const incomeToDate = currentAnnualIncome * (month / 12);

0 commit comments

Comments
 (0)