Skip to content

Commit

Permalink
fix: build errors and warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasGross committed Jan 3, 2025
1 parent b0911ba commit 6e827f3
Show file tree
Hide file tree
Showing 11 changed files with 30 additions and 19 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
"scripts": {
"fmt": "prettier --config ./.prettierrc --write \"src/**/*.{js,jsx,ts,tsx}\"",
"lint:js": "eslint \"src/**/*.{js,jsx,ts,tsx}\" --max-warnings 0 --cache --cache-location \".cache/eslint/\"",
"lint:js:fix": "eslint --ext .js --ext .jsx --ext .ts --ext .tsx --fix ./src",
"lint:js:fix": "eslint \"src/**/*.{js,jsx,ts,tsx}\"",
"lint:markdown": "markdownlint-cli2",
"lint:markdown:fix": "markdownlint-cli2-fix",
"lint:scss": "stylelint \"./src/**/*.scss\"",
Expand Down
4 changes: 2 additions & 2 deletions src/apps/dashboard/util/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import dayjs from "dayjs";
import { dateFormatDayjs } from "../../../core/configuration/date-format.json";
import { dateFormatDayjs } from "../../../core/configuration/date-format";
import {
faustIdentifierLength,
digitalMaterialIdentifierLength
} from "../../../core/configuration/identifier-lengths.json";
} from "../../../core/configuration/identifier-lengths";

export const yesterday = dayjs().subtract(1, "day").format(dateFormatDayjs);
export const soon = dayjs().add(7, "days").format(dateFormatDayjs);
Expand Down
2 changes: 1 addition & 1 deletion src/apps/fee-list/stackable-fees/fee-details-content.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import * as React from "react";
import { FC } from "react";
import { FeeV2 } from "../../../core/fbs/model";
import { useText } from "../../../core/utils/text";
import { dateFormatCustom } from "../../../core/configuration/date-format.json";
import { dateFormatCustom } from "../../../core/configuration/date-format";
import StackableFeesList from "./stackable-fees-list";
import GroupModalContent from "../../../components/GroupModal/GroupModalContent";
import { formatCurrency } from "../../../core/utils/helpers/currency";
Expand Down
2 changes: 1 addition & 1 deletion src/apps/fee-list/stackable-fees/fee-status.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import dayjs from "dayjs";
import React, { FC } from "react";
import { dateFormatDefault } from "../../../core/configuration/date-format.json";
import { dateFormatDefault } from "../../../core/configuration/date-format";
import { useText } from "../../../core/utils/text";

interface FeeStatusProps {
Expand Down
4 changes: 0 additions & 4 deletions src/core/configuration/api-strings.json

This file was deleted.

9 changes: 9 additions & 0 deletions src/core/configuration/api-strings.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
const apiStrings = {
dashboardReadyForPickupApiValueText: "readyForPickup",
dashboardReservedApiValueText: "reserved"
};

export const {
dashboardReadyForPickupApiValueText,
dashboardReservedApiValueText
} = apiStrings;
5 changes: 0 additions & 5 deletions src/core/configuration/date-format.json

This file was deleted.

8 changes: 8 additions & 0 deletions src/core/configuration/date-format.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
const dateFormats = {
dateFormatDefault: "DD. MM. YYYY",
dateFormatCustom: "D. MMMM YYYY",
dateFormatDayjs: "YYYY-MM-DD"
};

export const { dateFormatCustom, dateFormatDayjs, dateFormatDefault } =
dateFormats;
4 changes: 0 additions & 4 deletions src/core/configuration/identifier-lengths.json

This file was deleted.

7 changes: 7 additions & 0 deletions src/core/configuration/identifier-lengths.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
const identifierLengths = {
faustIdentifierLength: 8,
digitalMaterialIdentifierLength: 13
};

export const { faustIdentifierLength, digitalMaterialIdentifierLength } =
identifierLengths;
2 changes: 1 addition & 1 deletion src/core/utils/useReservations.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
} from "./helpers/list-mapper";
import { getReadyForPickup } from "../../apps/reservation-list/utils/helpers";
import { ReservationType } from "./types/reservation-type";
import { dashboardReservedApiValueText } from "../configuration/api-strings.json";
import { dashboardReservedApiValueText } from "../configuration/api-strings";
import useGetReservationGroups from "./useGetReservationGroups";

const getQueuedReservations = (list: ReservationType[]) => {
Expand Down

0 comments on commit 6e827f3

Please sign in to comment.