Skip to content

Commit

Permalink
Prettify various files according to the latest lint:js:fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Adamik10 committed Jan 7, 2025
1 parent 2cd1cc6 commit f34ca84
Show file tree
Hide file tree
Showing 10 changed files with 18 additions and 19 deletions.
2 changes: 1 addition & 1 deletion src/apps/advanced-search/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const advancedSearchIndexTranslations = {
"term.isbn": "advancedSearchIdentifierText"
} as const;

export type AdvancedSearchIndex = typeof advancedSearchIndexes[number];
export type AdvancedSearchIndex = (typeof advancedSearchIndexes)[number];

export type AdvancedSearchClause = {
value: "AND" | "OR" | "NOT";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const getReservationsForSaving = ({
selectedBranch: string;
}) => {
const getSelectedExpiryDate = (value: FormSelectValue) =>
typeof value === "number" ? getFutureDateString(value) : expiryDate ?? "";
typeof value === "number" ? getFutureDateString(value) : (expiryDate ?? "");
const getSelectedPickupBranch = (value: FormSelectValue) =>
typeof value === "string" ? value : selectedBranch;

Expand Down
2 changes: 1 addition & 1 deletion src/core/dbc-gateway/helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { beforeAll, vi } from "vitest";
import { getServiceBaseUrl } from "../utils/reduxMiddleware/extractServiceBaseUrls";
import queryMap from "./queryMap";

type Baseurl = typeof queryMap[keyof typeof queryMap];
type Baseurl = (typeof queryMap)[keyof typeof queryMap];

export const resolveBaseUrl = (query?: string) => {
if (!query) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
</ul>
*/
export type AuthenticatedPatronV6AuthenticateStatus =
typeof AuthenticatedPatronV6AuthenticateStatus[keyof typeof AuthenticatedPatronV6AuthenticateStatus];
(typeof AuthenticatedPatronV6AuthenticateStatus)[keyof typeof AuthenticatedPatronV6AuthenticateStatus];

export const AuthenticatedPatronV6AuthenticateStatus = {
VALID: "VALID",
Expand Down
2 changes: 1 addition & 1 deletion src/core/publizon/model/apiResponseCode.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ Orders/loans created in test environment will not be invoiced. Please request a
* 101 = Success, 105 = InvalidContentIdentifier, 118 = InvalidRequestIdentity, 120 = MaxConcurrentLoansPerBorrowerExceeded, 125 = MaxAmountPerMonthExceeded, 128 = ContentNotFound, 131 = NotLoanable, 134 = CardTemporarilyBlocked, 135 = MaxLoansOnTitleReached, 136 = InsufficientCopiesException, 137 = ReservationLimitReached, 138 = GenericFault, 139 = InvalidAgreement, 140 = AlreadyReserved, 141 = InvalidEmail, 142 = InvalidPhone, 143 = CostFreeLimitReached, 147 = CountryNotFound, 148 = InvalidInstitutionId, 149 = InvalidCardFormat, 150 = InvalidCardByCulr, 151 = CardNotFound, 152 = InvalidClientId, 153 = LoanNotFound
*/
export type ApiResponseCode =
typeof ApiResponseCode[keyof typeof ApiResponseCode];
(typeof ApiResponseCode)[keyof typeof ApiResponseCode];

export const ApiResponseCode = {
NUMBER_101: 101,
Expand Down
2 changes: 1 addition & 1 deletion src/core/publizon/model/bookTypes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ Orders/loans created in test environment will not be invoiced. Please request a
/**
* 0 = Ebook, 1 = Audio
*/
export type BookTypes = typeof BookTypes[keyof typeof BookTypes];
export type BookTypes = (typeof BookTypes)[keyof typeof BookTypes];

export const BookTypes = {
NUMBER_0: 0,
Expand Down
2 changes: 1 addition & 1 deletion src/core/publizon/model/contentLoanStatusEnum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Orders/loans created in test environment will not be invoiced. Please request a
*/

export type ContentLoanStatusEnum =
typeof ContentLoanStatusEnum[keyof typeof ContentLoanStatusEnum];
(typeof ContentLoanStatusEnum)[keyof typeof ContentLoanStatusEnum];

export const ContentLoanStatusEnum = {
NUMBER_0: 0,
Expand Down
2 changes: 1 addition & 1 deletion src/core/publizon/model/fileExtensionType.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Orders/loans created in test environment will not be invoiced. Please request a
*/

export type FileExtensionType =
typeof FileExtensionType[keyof typeof FileExtensionType];
(typeof FileExtensionType)[keyof typeof FileExtensionType];

export const FileExtensionType = {
NUMBER_1: 1,
Expand Down
2 changes: 1 addition & 1 deletion src/core/publizon/model/identifierTypeEnum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Orders/loans created in test environment will not be invoiced. Please request a
*/

export type IdentifierTypeEnum =
typeof IdentifierTypeEnum[keyof typeof IdentifierTypeEnum];
(typeof IdentifierTypeEnum)[keyof typeof IdentifierTypeEnum];

export const IdentifierTypeEnum = {
NUMBER_2: 2,
Expand Down
19 changes: 9 additions & 10 deletions src/core/utils/withFocusTrap.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,12 @@ export default <P extends object>(
Component: React.ComponentType<P>
): FC<P & { withFocusTrap?: boolean }> =>
// eslint-disable-next-line @typescript-eslint/no-unused-vars
({ withFocusTrap, ...props }) =>
(
<FocusTrap
focusTrapOptions={{
allowOutsideClick: true
}}
>
<Component {...(props as P)} />
</FocusTrap>
);
({ withFocusTrap, ...props }) => (
<FocusTrap
focusTrapOptions={{
allowOutsideClick: true
}}
>
<Component {...(props as P)} />
</FocusTrap>
);

0 comments on commit f34ca84

Please sign in to comment.