Skip to content

Commit 7513ede

Browse files
committed
chore: Lint
1 parent c73f42a commit 7513ede

File tree

9 files changed

+20
-16
lines changed

9 files changed

+20
-16
lines changed

app/src/components/policyParameterSelectorFrame/ValueSetter.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -408,7 +408,7 @@ export function DateValueSelector(props: ValueSetterProps) {
408408
}
409409

410410
export function MultiYearValueSelector(props: ValueSetterProps) {
411-
const { param, setIntervals, maxDate: _maxDate } = props;
411+
const { param, setIntervals } = props;
412412

413413
// Get active policy to check for user-set reform values
414414
const activePolicy = useSelector(selectActivePolicy);
@@ -430,8 +430,8 @@ export function MultiYearValueSelector(props: ValueSetterProps) {
430430

431431
// Filter available years from metadata to only include current year onwards
432432
const futureYears = availableYears
433-
.map(option => parseInt(option.value, 10))
434-
.filter(year => year >= currentYear)
433+
.map((option) => parseInt(option.value, 10))
434+
.filter((year) => year >= currentYear)
435435
.sort((a, b) => a - b);
436436

437437
// Take only the configured max years for this country

app/src/constants.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ export function getParamDefinitionDate(year?: string): string {
2424
if (!year) {
2525
console.error(
2626
'[getParamDefinitionDate] No year provided - this is likely a bug. ' +
27-
`Falling back to CURRENT_YEAR (${CURRENT_YEAR}). ` +
28-
'Please ensure year is passed from report context.'
27+
`Falling back to CURRENT_YEAR (${CURRENT_YEAR}). ` +
28+
'Please ensure year is passed from report context.'
2929
);
3030
return `${CURRENT_YEAR}-01-01`;
3131
}

app/src/frames/population/HouseholdBuilderFrame.tsx

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,8 @@ export default function HouseholdBuilderFrame({
6767
Configuration Error
6868
</Text>
6969
<Text c="dimmed" ta="center">
70-
No report year available. Please return to the report creation page and select a
71-
year before creating a household.
70+
No report year available. Please return to the report creation page and select a year
71+
before creating a household.
7272
</Text>
7373
</Stack>
7474
}
@@ -476,8 +476,12 @@ export default function HouseholdBuilderFrame({
476476
/>
477477
<NumberInput
478478
value={
479-
HouseholdQueries.getPersonVariable(household, 'you', 'employment_income', reportYear) ||
480-
0
479+
HouseholdQueries.getPersonVariable(
480+
household,
481+
'you',
482+
'employment_income',
483+
reportYear
484+
) || 0
481485
}
482486
onChange={(val) => handleAdultChange('you', 'employment_income', val || 0)}
483487
min={0}

app/src/libs/metadataUtils.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ import { MetadataApiPayload, MetadataState } from '@/types/metadata';
66
export const getTaxYears = createSelector(
77
(state: RootState) => state.metadata.economyOptions.time_period,
88
(timePeriods) => {
9-
if (!timePeriods) return [];
9+
if (!timePeriods) {
10+
return [];
11+
}
1012

1113
// Sort by year in ascending order (2025, 2026, 2027, etc.)
1214
return timePeriods

app/src/reducers/populationReducer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,8 +158,8 @@ export const populationSlice = createSlice({
158158
if (!year) {
159159
console.error(
160160
'[populationReducer.initializeHouseholdAtPosition] No year provided - this is likely a bug. ' +
161-
`Falling back to CURRENT_YEAR (${CURRENT_YEAR}). ` +
162-
'Please ensure year is passed from report state.'
161+
`Falling back to CURRENT_YEAR (${CURRENT_YEAR}). ` +
162+
'Please ensure year is passed from report state.'
163163
);
164164
}
165165
const builder = new HouseholdBuilder(countryId as any, householdYear);

app/src/tests/unit/api/reportCalculations.test.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ import { beforeEach, describe, expect, it, vi } from 'vitest';
22
import { fetchHouseholdCalculation } from '@/api/householdCalculation';
33
import { fetchCalculationWithMeta } from '@/api/reportCalculations';
44
import { fetchSocietyWideCalculation } from '@/api/societyWideCalculation';
5-
import { CURRENT_YEAR } from '@/constants';
65
import {
76
mockEconomyCalcResult,
87
mockEconomyMeta,

app/src/tests/unit/frames/report/ReportCreationFrame.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import reportReducer, * as reportActions from '@/reducers/reportReducer';
1414
import simulationsReducer from '@/reducers/simulationsReducer';
1515
import {
1616
CREATE_REPORT_BUTTON_LABEL,
17-
DEFAULT_YEAR,
1817
EMPTY_REPORT_LABEL,
1918
REPORT_CREATION_FRAME_TITLE,
2019
REPORT_NAME_INPUT_LABEL,

app/src/tests/unit/pages/ReportOutput.page.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { describe, expect, test, vi, beforeEach } from 'vitest';
21
import { render, screen } from '@test-utils';
2+
import { beforeEach, describe, expect, test, vi } from 'vitest';
33
import ReportOutputPage from '@/pages/ReportOutput.page';
44
import {
55
MOCK_REPORT_WITH_YEAR,

app/src/tests/unit/pages/report-output/ReportOutputLayout.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
import { describe, expect, test, vi } from 'vitest';
21
import { render, screen } from '@test-utils';
2+
import { describe, expect, test, vi } from 'vitest';
33
import ReportOutputLayout from '@/pages/report-output/ReportOutputLayout';
44
import {
55
MOCK_REPORT_ID,

0 commit comments

Comments
 (0)