Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bump the eslint group across 1 directory with 3 updates #8305

Merged
merged 6 commits into from
Dec 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -215,9 +215,9 @@
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-graphql": "^4.0.0",
"eslint-plugin-import": "^2.31.0",
"eslint-plugin-jest-dom": "^5.4.0",
"eslint-plugin-storybook": "^0.9.0",
"eslint-plugin-testing-library": "^6.3.0",
"eslint-plugin-jest-dom": "^5.5.0",
"eslint-plugin-storybook": "^0.11.1",
"eslint-plugin-testing-library": "^7.0.0",
"eslint-plugin-unused-imports": "4.1.4",
"focus-trap-react": "^10.2.3",
"jest": "29.7.0",
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/Settings/ManageOrganization.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ const ManageOrganization: React.FC<ManageOrganizationProps> = ({
await onSave(updatedOrganization);
// update default values so the isDirty check applies to current updated data
reset({ ...orgData });
} catch (e) {
} catch {
/* do nothing as the container component already displays error toast */
}
};
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/app/Settings/Users/ManageUsers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -235,7 +235,7 @@ const ManageUsers: React.FC<Props> = ({
updateShowAddUserModal(false);

setIsUpdating(false);
} catch (e: any) {
} catch {
setIsUpdating(false);
}
};
Expand Down Expand Up @@ -276,7 +276,7 @@ const ManageUsers: React.FC<Props> = ({
});
showSuccess("", `User email address changed to ${emailAddress}`);
await refetchUser();
} catch (e: any) {}
} catch {}
};

const handleResetUserPassword = async (userId: string) => {
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/app/TelemetryService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ export function isStaticFileToSkip(envelope: ITelemetryItem) {
) {
return true; // file should be skipped
}
} catch (e) {
} catch {
/* do nothing and don't disrupt logging*/
}
}
Expand Down Expand Up @@ -118,7 +118,7 @@ export function sanitizeOktaToken(envelope: ITelemetryItem): void {
envelope.ext.trace.name
);
}
} catch (e) {
} catch {
/* do nothing and don't disrupt logging*/
}
return;
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/VersionService.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export class VersionService {
localStorage.setItem(key, key);
localStorage.removeItem(key);
return true;
} catch (e: any) {
} catch {
return false;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ export const MfaSendCodeToContact = (props: Props) => {
let valid;
try {
valid = contactIsValid(contact);
} catch (e: any) {
} catch {
valid = false;
}

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/patients/personSchema.ts
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ export function phoneNumberIsValid(input: any) {
try {
const number = phoneUtil.parseAndKeepRawInput(input, "US");
return phoneUtil.isValidNumber(number);
} catch (e: any) {
} catch {
return false;
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ const QuestionsFormContainer = ({
}
setQuestionSet(response.questionSet);
setSessionId(response.sessionId);
} catch (error: any) {
} catch {
setIdentificationVerified(false);
}
setLoading(false);
Expand All @@ -83,7 +83,7 @@ const QuestionsFormContainer = ({
setIdentificationVerified(response.passed);
setEmail(response.email);
setActivationToken(response.activationToken);
} catch (error: any) {
} catch {
setIdentificationVerified(false);
}
setLoading(false);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ const PendingOrganizations = ({
},
});
updatedOrg = mutationResponse as EditOrgMutationResponse;
} catch (e: any) {
} catch {
return Promise.reject();
}
refetch();
Expand Down Expand Up @@ -157,7 +157,7 @@ const PendingOrganizations = ({
externalIdToVerify = updatedOrgExternalId;
}
await submitIdentityVerified(externalIdToVerify, externalNameToVerify);
} catch (e: any) {
} catch {
return Promise.reject();
}
refetch();
Expand All @@ -183,7 +183,7 @@ const PendingOrganizations = ({
const handleDeletionOrg = async (o: PendingOrganization) => {
try {
await submitDeletion(o.externalId, true, o.name);
} catch (e) {
} catch {
updateLocalState(() => initialState);
return Promise.reject();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ const UnarchivePatient = () => {
await fetchAndSetPatients(orgExternalId, currentPage);
await fetchAndSetPatientsCount(orgExternalId);
showSuccess("", "Patient successfully unarchived");
} catch (e) {
} catch {
showError(
"Please escalate this issue to the SimpleReport team.",
"Error unarchiving patient"
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/app/testQueue/TestTimer.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ const saveTimers = () => {
const storage = localStorage.getItem("timers") || "[]";
const cutoff = Date.now() - toMillis(60);
oldTimers = JSON.parse(storage).filter((t: any) => t.alarmAt > cutoff);
} catch (e: any) {}
} catch {}
oldTimers.forEach((t) => {
timers.push(timerFromJSON(t));
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ export const DownloadResultsCsvModal = ({
disabledFeatureDiseaseList
);
setResults(csvResults);
} catch (e) {
} catch {
showError("Error creating results file to download");
}
} else {
Expand Down
8 changes: 4 additions & 4 deletions frontend/src/app/utils/testResultCSV.ts
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mpbrown do you have any thoughts on whether this variable rename workaround is the best way to address the unused-var linting errors I was getting?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that makes sense with this:

"varsIgnorePattern": "^_"

Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export type QueriedTestResult = NonNullable<
NonNullable<GetResultsForDownloadQuery["resultsPage"]>["content"]
>[number];

const resultCSVHeadersString = [
const _resultCSVHeadersString = [
"Patient first name",
"Patient middle name",
"Patient first name",
Expand Down Expand Up @@ -53,20 +53,20 @@ const resultCSVHeadersString = [
"Patient tribal affiliation",
] as const;

const resultCSVHeadersBoolean = [
const _resultCSVHeadersBoolean = [
"Patient is a resident in a congregate setting",
"Patient is employed in healthcare",
] as const;

export type ResultCsvRow =
| {
[_K in (typeof resultCSVHeadersString)[number]]:
[_K in (typeof _resultCSVHeadersString)[number]]:
| string
| null
| undefined;
}
| {
[_K in (typeof resultCSVHeadersBoolean)[number]]:
[_K in (typeof _resultCSVHeadersBoolean)[number]]:
| boolean
| null
| undefined;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ export const SelfRegistration = () => {
await PxpApi.selfRegister(data);
setPersonName(formatFullName(person) || "");
setStep(RegistrationStep.FINISHED);
} catch (e: any) {
} catch {
showError(
t("selfRegistration.form.error.heading"),
t("selfRegistration.form.error.text")
Expand Down
Loading
Loading