Skip to content

Commit c564c2d

Browse files
committed
change and run npm run fix
1 parent 3b85139 commit c564c2d

File tree

4 files changed

+26
-25
lines changed

4 files changed

+26
-25
lines changed

.prettierrc.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{}

package-lock.json

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

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
"build": "react-scripts build",
5959
"test": "react-scripts test",
6060
"eject": "react-scripts eject",
61-
"fix": "eslint --fix --ext js,jsx . && prettier -w .",
61+
"fix": "prettier -w .",
6262
"lint": "eslint --ext js,jsx . && prettier -c ."
6363
},
6464
"eslintConfig": {
@@ -97,6 +97,6 @@
9797
"jest": "^29.7.0",
9898
"jest-environment-jsdom": "^29.4.3",
9999
"lint-staged": "^15.2.0",
100-
"prettier": "^3.1.0"
100+
"prettier": "^3.1.1"
101101
}
102102
}

src/pages/household/output/EarningsVariation/BaselineAndReformChart.jsx

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -33,42 +33,42 @@ export default function BaselineAndReformChart(props) {
3333
"2023",
3434
"you",
3535
householdBaselineVariation,
36-
metadata
36+
metadata,
3737
);
3838
const baselineArray = getValueFromHousehold(
3939
variable,
4040
"2023",
4141
null,
4242
householdBaselineVariation,
43-
metadata
43+
metadata,
4444
);
4545
const reformArray = getValueFromHousehold(
4646
variable,
4747
"2023",
4848
null,
4949
householdReformVariation,
50-
metadata
50+
metadata,
5151
);
5252
const currentEarnings = getValueFromHousehold(
5353
"employment_income",
5454
"2023",
5555
"you",
5656
householdBaseline,
57-
metadata
57+
metadata,
5858
);
5959
const currentValue = getValueFromHousehold(
6060
variable,
6161
"2023",
6262
null,
6363
householdReform,
64-
metadata
64+
metadata,
6565
);
6666
const baselineValue = getValueFromHousehold(
6767
variable,
6868
"2023",
6969
null,
7070
householdBaseline,
71-
metadata
71+
metadata,
7272
);
7373
function BaselineAndReformChartWithToggle() {
7474
const [viewMode, setViewMode] = useState("absoluteChange");
@@ -188,7 +188,7 @@ function BaselineAndReformTogetherPlot(props) {
188188
} = props;
189189
const yaxisFormat = getPlotlyAxisFormat(
190190
metadata.variables[variable].unit,
191-
baselineArray.concat(reformArray, currentValue, baselineValue)
191+
baselineArray.concat(reformArray, currentValue, baselineValue),
192192
);
193193
const cliffs1 =
194194
variable === "household_net_income"
@@ -198,7 +198,7 @@ function BaselineAndReformTogetherPlot(props) {
198198
yaxisFormat.range,
199199
false,
200200
"$",
201-
useHoverCard
201+
useHoverCard,
202202
)
203203
: [];
204204
const cliffs2 =
@@ -209,7 +209,7 @@ function BaselineAndReformTogetherPlot(props) {
209209
yaxisFormat.range,
210210
true,
211211
"$",
212-
useHoverCard
212+
useHoverCard,
213213
)
214214
: [];
215215
let data = [
@@ -308,7 +308,7 @@ function BaselineAndReformTogetherPlot(props) {
308308
title: "Household head employment income",
309309
...getPlotlyAxisFormat(
310310
metadata.variables.employment_income.unit,
311-
earningsArray.concat(currentEarnings)
311+
earningsArray.concat(currentEarnings),
312312
),
313313
uirevision: metadata.variables.employment_income.unit,
314314
},
@@ -350,11 +350,11 @@ function BaselineAndReformTogetherPlot(props) {
350350
) {
351351
const variableLabelAmount = convertToCurrencyString(
352352
metadata.currency,
353-
data.points[0].y
353+
data.points[0].y,
354354
);
355355
const employmentIncome = convertToCurrencyString(
356356
metadata.currency,
357-
data.points[0].x
357+
data.points[0].x,
358358
);
359359
const message = `If you earn ${employmentIncome}, your ${
360360
data.points[0].data.name
@@ -373,11 +373,11 @@ function BaselineAndReformTogetherPlot(props) {
373373
body: `Your net income falls after earning
374374
${convertToCurrencyString(
375375
metadata.currency,
376-
Math.min(...data.points[0].data.x)
376+
Math.min(...data.points[0].data.x),
377377
)} until earning
378378
${convertToCurrencyString(
379379
metadata.currency,
380-
Math.max(...data.points[0].data.x)
380+
Math.max(...data.points[0].data.x),
381381
)} in the
382382
${
383383
data.points[0].data.name.includes("reform")
@@ -417,7 +417,7 @@ function BaselineReformDeltaPlot(props) {
417417
} = props;
418418
// Calculate delta values
419419
const deltaArray = reformArray.map(
420-
(value, index) => value - baselineArray[index]
420+
(value, index) => value - baselineArray[index],
421421
);
422422
// Calculate percentage differences, avoiding divide by zero
423423
const percentageDeltaArray = reformArray.map((value, index) => {
@@ -442,7 +442,7 @@ function BaselineReformDeltaPlot(props) {
442442
: deltaArray[index];
443443
const formattedEarnings = convertToCurrencyString(
444444
metadata.currency,
445-
earnings
445+
earnings,
446446
);
447447

448448
if (deltaValue === 0) {
@@ -491,7 +491,7 @@ function BaselineReformDeltaPlot(props) {
491491
title: "Household head employment income",
492492
...getPlotlyAxisFormat(
493493
metadata.variables.employment_income.unit,
494-
earningsArray.concat(currentEarnings)
494+
earningsArray.concat(currentEarnings),
495495
),
496496
uirevision: metadata.variables.employment_income.unit,
497497
},
@@ -504,7 +504,7 @@ function BaselineReformDeltaPlot(props) {
504504
showPercentage ? "%" : metadata.variables[variable].unit,
505505
showPercentage
506506
? percentageDeltaArray
507-
: deltaArray.concat(currentDelta)
507+
: deltaArray.concat(currentDelta),
508508
),
509509
uirevision: metadata.variables[variable].unit,
510510
},
@@ -545,11 +545,11 @@ function BaselineReformDeltaPlot(props) {
545545
) {
546546
const variableLabelAmount = convertToCurrencyString(
547547
metadata.currency,
548-
data.points[0].y
548+
data.points[0].y,
549549
);
550550
const employmentIncome = convertToCurrencyString(
551551
metadata.currency,
552-
data.points[0].x
552+
data.points[0].x,
553553
);
554554
const message = `If you earn ${employmentIncome}, your change in ${variableLabel} will be ${variableLabelAmount}.`;
555555
setHoverCard({

0 commit comments

Comments
 (0)