diff --git a/.github/dependabot.yml b/.github/dependabot.yml deleted file mode 100644 index 04f278bf..00000000 --- a/.github/dependabot.yml +++ /dev/null @@ -1,17 +0,0 @@ -# To get started with Dependabot version updates, you'll need to specify which -# package ecosystems to update and where the package manifests are located. -# Please see the documentation for all configuration options: -# https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file - -version: 2 -updates: - - package-ecosystem: 'github-actions' - # Workflow files stored in the default location of `.github/workflows`. (You don't need to specify `/.github/workflows` for `directory`. You can use `directory: "/"`.) - directory: '/' - schedule: - interval: 'weekly' - - - package-ecosystem: 'npm' # See documentation for possible values - directory: '/' # Location of package manifests - schedule: - interval: 'weekly' diff --git a/.github/settings.yml b/.github/settings.yml deleted file mode 100644 index 94f581b2..00000000 --- a/.github/settings.yml +++ /dev/null @@ -1,117 +0,0 @@ -# These labels are automatically synced. -# 1. Install https://github.com/apps/settings to your GitHub account. -# 2. Scroll down and only enable access to selected repositories. -# 3. Select the repositories you want to sync. -# -# !!!!!!! SECURITY WARNING !!!!!!! -# Please be aware that this can escalate anyone with PUSH priviliages to the repository. -# To counteract this, please block force pushing and enable "Require CODE OWNER Approval" for Pull Requests to the main branch. - -labels: - - name: 'Type: CI' - color: 54b2ff - description: A problem or enhancement related to continuous integration. - - - name: 'Type: Breaking' - color: a90000 - description: A problem or enhancement related to a breaking change. - - - name: 'Type: Bug' - color: e80c0c - description: Something isn't working as expected. - - - name: 'Type: Enhancement' - color: 54b2ff - description: Suggest an improvement for an existing feature. - - - name: 'Type: Feature' - color: 54b2ff - description: Suggest a new feature. - - - name: 'Type: Security' - color: fbff00 - description: A problem or enhancement related to a security issue. - - - name: 'Type: Question' - color: 9309ab - description: Request for information. - - - name: 'Type: Test' - color: ce54e3 - description: A problem or enhancement related to a test. - - - name: 'Status: Awaiting Review' - color: 24d15d - description: Ready for review. - - - name: 'Status: WIP' - color: 07b340 - description: Currently being worked on. - - - name: 'Status: Waiting' - color: 38C968 - description: Waiting on something else to be ready. - - - name: 'Status: Stale' - color: 66b38a - description: Has had no activity for some time. - - - name: 'Duplicate' - color: EB862D - description: Duplicate of another issue. - - - name: 'Invalid' - color: faef50 - description: This issue doesn't seem right. - - - name: 'Priority: High +' - color: ff008c - description: Task is considered higher-priority. - - - name: 'Priority: Low -' - color: 690a34 - description: Task is considered lower-priority. - - - name: 'Documentation' - color: 2fbceb - description: An issue/change with the documentation. - - - name: "Won't fix" - color: C8D9E6 - description: Reported issue is working as intended. - - - name: '3rd party issue' - color: e88707 - description: This issue might be caused by a 3rd party script/package/other reasons - - - name: 'Os: Windows' - color: AEB1C2 - description: Is Windows-specific - - - name: 'Os: Mac' - color: AEB1C2 - description: Is Mac-specific - - - name: 'Os: Linux' - color: AEB1C2 - description: Is Linux-specific - - - name: 'Skip-Changelog' - color: AEB1C2 - description: Skip changelog in release tag - - - name: 'help wanted' - color: 008672 - description: Help wanted - - - name: 'Scope: Server' - color: B08EC1 - description: This change affects the server. - - - name: 'Scope: Client' - color: B08EC1 - description: This change affects the client. - - - name: 'Scope: Utilities' - color: B08EC1 - description: This change affects utilities. diff --git a/client/src/components/navbar.tsx b/client/src/components/navbar.tsx index d771b95a..6ef3b515 100644 --- a/client/src/components/navbar.tsx +++ b/client/src/components/navbar.tsx @@ -136,10 +136,10 @@ const Navbar: PageComponent = (): React.JSX.Element => { {/* Load notifications */} {notifications && notifications.length > 0 && - notifications.map((notification, i) => ( + notifications.map((notification) => ( {/* left */}
diff --git a/client/src/components/ui/pieChart.tsx b/client/src/components/ui/pieChart.tsx index 4567729c..ff759861 100644 --- a/client/src/components/ui/pieChart.tsx +++ b/client/src/components/ui/pieChart.tsx @@ -1,7 +1,12 @@ import React from 'react'; import { Pie } from 'react-chartjs-2'; -import { Chart as ChartJS, ArcElement, Tooltip, Legend } from 'chart.js'; -import { TooltipItem } from 'chart.js'; +import { + Chart as ChartJS, + TooltipItem, + ArcElement, + Tooltip, + Legend, +} from 'chart.js'; ChartJS.register(ArcElement, Tooltip, Legend); diff --git a/client/src/lib/api-types/food.ts b/client/src/lib/api-types/food.ts index f7503c3a..191e3a5b 100644 --- a/client/src/lib/api-types/food.ts +++ b/client/src/lib/api-types/food.ts @@ -40,7 +40,6 @@ export type FoodGenerateFailAPI = ErrorResponse< | 'Could not access image!' | 'Could not identify food from image!' | 'Could not get nutrition info!' - | 'Could not access image!' >; /** diff --git a/client/src/lib/api-types/schemas/auth.ts b/client/src/lib/api-types/schemas/auth.ts index 7999318e..853d3953 100644 --- a/client/src/lib/api-types/schemas/auth.ts +++ b/client/src/lib/api-types/schemas/auth.ts @@ -105,7 +105,7 @@ export const registerFormSchema = z.object({ .min(1, { message: 'Please provide a username!' }) .min(3, { message: 'Username needs to be at least 3 characters!' }) .max(20, { message: 'Username cannot be longer than 20 characters!' }) - .regex(/^[\w\d-_]+$/, { + .regex(/^[\w-_]+$/, { message: 'Username may only contain alphanumeric characters and (-_)', }), email: z @@ -131,7 +131,7 @@ export const registerFormSchema = z.object({ message: 'Password needs to contain at least 1 upper case character! (A-Z)', }) - .regex(/[\d]/, { + .regex(/[0-9]/, { message: 'Password needs to contain at least 1 digit! (0-9)', }) .regex(/[!#$%&?'"]/, { diff --git a/client/src/main.tsx b/client/src/main.tsx index dd47a1a6..21b05aeb 100644 --- a/client/src/main.tsx +++ b/client/src/main.tsx @@ -98,9 +98,9 @@ export const Layout = (): JSX.Element => { - {Object.entries(routes).map(([path, details], i) => ( + {Object.entries(routes).map(([path, details]) => ( diff --git a/client/src/pages/food/food.tsx b/client/src/pages/food/food.tsx index 832057e5..c9ba96ec 100644 --- a/client/src/pages/food/food.tsx +++ b/client/src/pages/food/food.tsx @@ -47,7 +47,7 @@ const FoodPage: PageComponent = (props) => { const { toast } = useToast(); const [query, setQuery] = useState( - new URLSearchParams(window.location.search).get('query') || '', + new URLSearchParams(window.location.search).get('query') ?? '', ); const [showModal, setShowModal] = useState(false); const [selectedIndex, setSelectedIndex] = useState(-1); @@ -59,10 +59,10 @@ const FoodPage: PageComponent = (props) => { const currParams = new URLSearchParams(window.location.search); params.q = query || currParams.get('query') || ''; - params.page = parseInt(currParams.get('page') || '') ?? params.page; + params.page = parseInt(currParams.get('page') ?? '') ?? params.page; if (isNaN(params.page) || params.page < 1) params.page = 1; - params.limit = parseInt(currParams.get('limit') || '') ?? params.limit; + params.limit = parseInt(currParams.get('limit') ?? '') ?? params.limit; if (isNaN(params.limit) || params.limit < 1) params.limit = 20; const newParams = new URLSearchParams(); @@ -264,7 +264,7 @@ const FoodPage: PageComponent = (props) => { className="flex h-fit w-full flex-col gap-2" disabled={i === selectedIndex} variant={i === selectedIndex ? 'outline' : 'default'} - key={`food-item-${i}`} + key={`food-item-${item.id}`} onClick={() => setSelectedIndex(i)} >

diff --git a/client/src/pages/user/events-me.tsx b/client/src/pages/user/events-me.tsx index 1cbee19d..c4237adc 100644 --- a/client/src/pages/user/events-me.tsx +++ b/client/src/pages/user/events-me.tsx @@ -74,74 +74,72 @@ const EventView: PageComponent = () => { {events.length > 0 ? (
{events.map((event) => ( - <> -
-
-
-

- Event Name: {event.title} -

-

Description: {event.description}

-

Date: {`${event.date}`}

-

Time: {`${event.time}`}

-

Location: {event.location}

- {user ? ( - <> - -
-
-

- Leaving Event -

-

- Are you sure you want to leave the event:{' '} - {event.title}? -

- - {/* Close button */} - -
+
+
+
+

+ Event Name: {event.title} +

+

Description: {event.description}

+

Date: {`${event.date}`}

+

Time: {`${event.time}`}

+

Location: {event.location}

+ {user ? ( + <> + +
+
+

+ Leaving Event +

+

+ Are you sure you want to leave the event:{' '} + {event.title}? +

+ + {/* Close button */} +
- - ) : ( -

Cannot leave when u are not logged in

- )} -
+
+ + ) : ( +

Cannot leave when u are not logged in

+ )}
- +
))}
) : ( diff --git a/client/src/pages/user/settings.tsx b/client/src/pages/user/settings.tsx index 95be0e90..7bcfbf55 100644 --- a/client/src/pages/user/settings.tsx +++ b/client/src/pages/user/settings.tsx @@ -231,9 +231,9 @@ export const AccountPasskeys = () => { )} {data && - data.map((p, i) => ( + data.map((p) => (
diff --git a/client/src/service/auth.tsx b/client/src/service/auth.tsx index aa373142..ce444904 100644 --- a/client/src/service/auth.tsx +++ b/client/src/service/auth.tsx @@ -144,7 +144,6 @@ export const AuthProvider = ({ children }: { children: React.ReactNode }) => { return ( { logout: logout, login: login, }} - /> + > + {children} + ); }; diff --git a/package-lock.json b/package-lock.json index 386be59e..2d4ac349 100644 --- a/package-lock.json +++ b/package-lock.json @@ -8996,9 +8996,9 @@ } }, "node_modules/micromatch": { - "version": "4.0.7", - "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.7.tgz", - "integrity": "sha512-LPP/3KorzCwBxfeUuZmaR6bG2kdeHSbe0P2tY3FLRU4vYrjYz5hI4QZwV0njUx3jeuKe67YukQ1LSPZBKDqO/Q==", + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.8.tgz", + "integrity": "sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==", "license": "MIT", "dependencies": { "braces": "^3.0.3", diff --git a/server/src/lib/api-types/food.ts b/server/src/lib/api-types/food.ts index f7503c3a..191e3a5b 100644 --- a/server/src/lib/api-types/food.ts +++ b/server/src/lib/api-types/food.ts @@ -40,7 +40,6 @@ export type FoodGenerateFailAPI = ErrorResponse< | 'Could not access image!' | 'Could not identify food from image!' | 'Could not get nutrition info!' - | 'Could not access image!' >; /** diff --git a/server/src/lib/api-types/schemas/auth.ts b/server/src/lib/api-types/schemas/auth.ts index 7999318e..853d3953 100644 --- a/server/src/lib/api-types/schemas/auth.ts +++ b/server/src/lib/api-types/schemas/auth.ts @@ -105,7 +105,7 @@ export const registerFormSchema = z.object({ .min(1, { message: 'Please provide a username!' }) .min(3, { message: 'Username needs to be at least 3 characters!' }) .max(20, { message: 'Username cannot be longer than 20 characters!' }) - .regex(/^[\w\d-_]+$/, { + .regex(/^[\w-_]+$/, { message: 'Username may only contain alphanumeric characters and (-_)', }), email: z @@ -131,7 +131,7 @@ export const registerFormSchema = z.object({ message: 'Password needs to contain at least 1 upper case character! (A-Z)', }) - .regex(/[\d]/, { + .regex(/[0-9]/, { message: 'Password needs to contain at least 1 digit! (0-9)', }) .regex(/[!#$%&?'"]/, { diff --git a/server/src/middleware/errors.ts b/server/src/middleware/errors.ts index 46a2b211..5a74dd9d 100644 --- a/server/src/middleware/errors.ts +++ b/server/src/middleware/errors.ts @@ -71,7 +71,6 @@ export const errorHandler = ( status: 500, errors: [{ message: 'Something went wrong!' }], } satisfies ErrorResponse); - return; }; // Handle 404 Errors diff --git a/shared/api-types/src/food.ts b/shared/api-types/src/food.ts index f7503c3a..191e3a5b 100644 --- a/shared/api-types/src/food.ts +++ b/shared/api-types/src/food.ts @@ -40,7 +40,6 @@ export type FoodGenerateFailAPI = ErrorResponse< | 'Could not access image!' | 'Could not identify food from image!' | 'Could not get nutrition info!' - | 'Could not access image!' >; /** diff --git a/shared/api-types/src/schemas/auth.ts b/shared/api-types/src/schemas/auth.ts index 7999318e..853d3953 100644 --- a/shared/api-types/src/schemas/auth.ts +++ b/shared/api-types/src/schemas/auth.ts @@ -105,7 +105,7 @@ export const registerFormSchema = z.object({ .min(1, { message: 'Please provide a username!' }) .min(3, { message: 'Username needs to be at least 3 characters!' }) .max(20, { message: 'Username cannot be longer than 20 characters!' }) - .regex(/^[\w\d-_]+$/, { + .regex(/^[\w-_]+$/, { message: 'Username may only contain alphanumeric characters and (-_)', }), email: z @@ -131,7 +131,7 @@ export const registerFormSchema = z.object({ message: 'Password needs to contain at least 1 upper case character! (A-Z)', }) - .regex(/[\d]/, { + .regex(/[0-9]/, { message: 'Password needs to contain at least 1 digit! (0-9)', }) .regex(/[!#$%&?'"]/, {