Skip to content

Commit 2d33bf0

Browse files
Merge pull request #1534 from ASU/uds-2004
chore: add precommit hook and update linted files
2 parents 14bf82c + 093dbbd commit 2d33bf0

File tree

23 files changed

+62
-55
lines changed

23 files changed

+62
-55
lines changed

.husky/pre-push

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,10 @@
11
#!/bin/sh
2-
# yarn test
2+
[ -n "$CI" ] && exit 0
3+
4+
echo "Running build and tests..."
5+
yarn test && yarn build
6+
7+
if [ $? -ne 0 ]; then
8+
echo "Build or tests failed. Please fix errors before pushing."
9+
exit 1
10+
fi

packages/app-degree-pages/src/components/DetailPage/components/AtAGlance/index.jsx

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,9 +46,7 @@ export const AtAGlance = ({
4646
{timeCommitment && (
4747
<GlanceItem item={timeCommitment} type="timeCommitment" />
4848
)}
49-
{stemOptText && (
50-
<GlanceItem item={stemOptText} type="stemOptText" />
51-
)}
49+
{stemOptText && <GlanceItem item={stemOptText} type="stemOptText" />}
5250
</ul>
5351
</section>
5452
);

packages/app-degree-pages/src/components/DetailPage/index.jsx

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -231,10 +231,7 @@ const DetailPage = ({
231231
mathIntensity={
232232
atAGlance?.mathIntensity || resolver.getMathIntensity()
233233
}
234-
stemOptText={
235-
resolver.hasStemOptText()
236-
}
237-
234+
stemOptText={resolver.hasStemOptText()}
238235
/>
239236
)}
240237
{!introContent?.hideRequiredCourses &&

packages/app-degree-pages/src/core/constants/component-constants.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ const glanceItemsMap = {
2222
},
2323
mathIntensity: { icon: "calculator", title: "Math intensity" },
2424
timeCommitment: { icon: "calendar-alt", title: "Time commitment" },
25-
stemOptText: {icon: "star", title: "STEM-OPT extension eligible"}
25+
stemOptText: { icon: "star", title: "STEM-OPT extension eligible" },
2626
};
2727

2828
const GRID_VIEW_ID = "grid-view";

packages/app-rfi/src/components/steps/questions/Campus.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import { RfiSelect } from "../../controls";
99
* @param {{ gaData: import("../../../../../../shared/services/googleAnalytics").GAEventObject}} props
1010
*/
1111
// eslint-disable-next-line react/prop-types
12-
export const Campus = ({ gaData, autoFocus}) => {
12+
export const Campus = ({ gaData, autoFocus }) => {
1313
const label = "Which applies to you?";
1414
const name = "Campus";
1515

packages/app-rfi/src/components/steps/questions/Country.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import React, { useEffect, useState } from "react";
22

33
import { gaEventPropTypes, trackGAEvent } from "../../../../../../shared";
4+
import { PII_VALUE } from "../../../core/utils/constants";
45
import { fetchCountries } from "../../../core/utils/fetchCountries";
56
import { useRfiContext } from "../../../core/utils/rfiContext";
67
import { RfiSelect } from "../../controls";
7-
import { PII_VALUE } from "../../../core/utils/constants";
88

99
// Options
1010
function getCountryOptions(resultsArrayOfObjects) {

packages/app-rfi/src/components/steps/questions/EmailAddress.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React from "react";
22

33
import { gaEventPropTypes, trackGAEvent } from "../../../../../../shared";
4-
import { RfiEmailInput } from "../../controls";
54
import { PII_VALUE } from "../../../core/utils/constants";
5+
import { RfiEmailInput } from "../../controls";
66

77
/**
88
* @param {{ gaData: import("../../../../../../shared/services/googleAnalytics").GAEventObject}} props

packages/app-rfi/src/components/steps/questions/FirstName.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React from "react";
22

33
import { gaEventPropTypes, trackGAEvent } from "../../../../../../shared";
4-
import { RfiTextInput } from "../../controls";
54
import { PII_VALUE } from "../../../core/utils/constants";
5+
import { RfiTextInput } from "../../controls";
66

77
/**
88
* @param {{ gaData: import("../../../../../../shared/services/googleAnalytics").GAEventObject}} props

packages/app-rfi/src/components/steps/questions/LastName.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React from "react";
22

33
import { gaEventPropTypes, trackGAEvent } from "../../../../../../shared";
4-
import { RfiTextInput } from "../../controls";
54
import { PII_VALUE } from "../../../core/utils/constants";
5+
import { RfiTextInput } from "../../controls";
66

77
/**
88
* @param {{ gaData: import("../../../../../../shared/services/googleAnalytics").GAEventObject}} props

packages/app-rfi/src/components/steps/questions/Phone.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
import React from "react";
22

33
import { gaEventPropTypes, trackGAEvent } from "../../../../../../shared";
4-
import { RfiPhone } from "../../controls";
54
import { PII_VALUE } from "../../../core/utils/constants";
5+
import { RfiPhone } from "../../controls";
66

77
/**
88
* @param {{ gaData: import("../../../../../../shared/services/googleAnalytics").GAEventObject}} props

0 commit comments

Comments
 (0)