diff --git a/cypress.config.ts b/cypress.config.ts
index bebdaa5..01bd43f 100644
--- a/cypress.config.ts
+++ b/cypress.config.ts
@@ -9,8 +9,5 @@ export default defineConfig({
},
e2e: {
- setupNodeEvents(on, config) {
- // implement node event listeners here
- },
},
});
diff --git a/cypress/e2e/seed.ts b/cypress/e2e/seed.ts
index c3cd389..a39f255 100644
--- a/cypress/e2e/seed.ts
+++ b/cypress/e2e/seed.ts
@@ -1,3 +1,4 @@
+// eslint-disable-next-line no-relative-import-paths/no-relative-import-paths
import { PrismaClient } from '../../src/generated/prisma';
const prisma = new PrismaClient();
diff --git a/cypress/support/commands.ts b/cypress/support/commands.ts
index 59717f5..aeb4071 100644
--- a/cypress/support/commands.ts
+++ b/cypress/support/commands.ts
@@ -1,3 +1,5 @@
+/* eslint-disable @typescript-eslint/no-namespace */
+/* eslint-disable @typescript-eslint/no-explicit-any */
///
// ***********************************************
// This example commands.ts shows you how to
diff --git a/cypress/support/component.ts b/cypress/support/component.ts
index 1ba57fd..bc93c00 100644
--- a/cypress/support/component.ts
+++ b/cypress/support/component.ts
@@ -1,3 +1,4 @@
+/* eslint-disable @typescript-eslint/no-namespace */
// ***********************************************************
// This example support/component.ts is processed and
// loaded automatically before your test files.
diff --git a/eslint.config.mjs b/eslint.config.mjs
index 0736038..5e7d76f 100644
--- a/eslint.config.mjs
+++ b/eslint.config.mjs
@@ -1,4 +1,5 @@
import { FlatCompat } from '@eslint/eslintrc';
+import noRelativeImportPaths from 'eslint-plugin-no-relative-import-paths';
import { dirname } from 'path';
import { fileURLToPath } from 'url';
@@ -14,6 +15,21 @@ const eslintConfig = [
{
ignores: ['src/generated/**', '.next/**', 'public/**'],
},
+ {
+ plugins: {
+ 'no-relative-import-paths': noRelativeImportPaths,
+ },
+ rules: {
+ 'no-relative-import-paths/no-relative-import-paths': [
+ 'error',
+ {
+ allowSameFolder: true,
+ rootDir: 'src',
+ prefix: "@",
+ },
+ ],
+ },
+ },
];
export default eslintConfig;
diff --git a/package.json b/package.json
index 4db52a7..02848ca 100644
--- a/package.json
+++ b/package.json
@@ -85,6 +85,7 @@
"eslint": "9.30.0",
"eslint-config-next": "15.3.4",
"eslint-config-prettier": "10.1.5",
+ "eslint-plugin-no-relative-import-paths": "^1.6.1",
"orval": "7.10.0",
"postcss": "8.5.6",
"prettier": "3.6.2",
diff --git a/src/app/api/event/[eventID]/participant/[user]/route.ts b/src/app/api/event/[eventID]/participant/[user]/route.ts
index 940594b..fcaedf2 100644
--- a/src/app/api/event/[eventID]/participant/[user]/route.ts
+++ b/src/app/api/event/[eventID]/participant/[user]/route.ts
@@ -15,7 +15,7 @@ import { prisma } from '@/prisma';
import {
ParticipantResponseSchema,
updateParticipantSchema,
-} from '../validation';
+} from '@/app/api/event/[eventID]/participant/validation';
export const GET = auth(async (req, { params }) => {
const authCheck = userAuthenticated(req);
diff --git a/src/app/api/event/[eventID]/participant/[user]/swagger.ts b/src/app/api/event/[eventID]/participant/[user]/swagger.ts
index 10baa9a..df6f1e4 100644
--- a/src/app/api/event/[eventID]/participant/[user]/swagger.ts
+++ b/src/app/api/event/[eventID]/participant/[user]/swagger.ts
@@ -17,7 +17,7 @@ import {
import {
ParticipantResponseSchema,
updateParticipantSchema,
-} from '../validation';
+} from '@/app/api/event/[eventID]/participant/validation';
export default function registerSwaggerPaths(registry: OpenAPIRegistry) {
registry.registerPath({
diff --git a/src/app/api/event/[eventID]/route.ts b/src/app/api/event/[eventID]/route.ts
index 3f3eaa4..13a1168 100644
--- a/src/app/api/event/[eventID]/route.ts
+++ b/src/app/api/event/[eventID]/route.ts
@@ -3,16 +3,18 @@ import {
userAuthenticated,
} from '@/lib/apiHelpers';
-import { auth } from '@/auth';
-import { prisma } from '@/prisma';
-
+import {
+ EventResponseSchema,
+ updateEventSchema,
+} from '@/app/api/event/validation';
import {
ErrorResponseSchema,
SuccessResponseSchema,
ZodErrorResponseSchema,
-} from '../../validation';
-import { EventResponseSchema } from '../validation';
-import { updateEventSchema } from '../validation';
+} from '@/app/api/validation';
+
+import { auth } from '@/auth';
+import { prisma } from '@/prisma';
export const GET = auth(async (req, { params }) => {
const authCheck = userAuthenticated(req);
diff --git a/src/app/api/event/[eventID]/swagger.ts b/src/app/api/event/[eventID]/swagger.ts
index 263b5b8..b9c44be 100644
--- a/src/app/api/event/[eventID]/swagger.ts
+++ b/src/app/api/event/[eventID]/swagger.ts
@@ -13,7 +13,7 @@ import {
SuccessResponseSchema,
} from '@/app/api/validation';
-import { EventResponseSchema, updateEventSchema } from '../validation';
+import { EventResponseSchema, updateEventSchema } from '@/app/api/event/validation';
export default function registerSwaggerPaths(registry: OpenAPIRegistry) {
registry.registerPath({
diff --git a/src/app/api/event/route.ts b/src/app/api/event/route.ts
index f0c1ed6..9afb35e 100644
--- a/src/app/api/event/route.ts
+++ b/src/app/api/event/route.ts
@@ -6,7 +6,7 @@ import {
import { auth } from '@/auth';
import { prisma } from '@/prisma';
-import { ErrorResponseSchema, ZodErrorResponseSchema } from '../validation';
+import { ErrorResponseSchema, ZodErrorResponseSchema } from '@/app/api/validation';
import {
EventResponseSchema,
EventsResponseSchema,
diff --git a/src/app/api/event/validation.ts b/src/app/api/event/validation.ts
index 152666b..5ea6674 100644
--- a/src/app/api/event/validation.ts
+++ b/src/app/api/event/validation.ts
@@ -4,7 +4,7 @@ import zod from 'zod/v4';
import {
PublicUserSchema,
existingUserIdServerSchema,
-} from '../user/validation';
+} from '@/app/api/user/validation';
import { ParticipantSchema } from './[eventID]/participant/validation';
extendZodWithOpenApi(zod);
diff --git a/src/app/api/search/user/validation.ts b/src/app/api/search/user/validation.ts
index 454cdc8..f262a7e 100644
--- a/src/app/api/search/user/validation.ts
+++ b/src/app/api/search/user/validation.ts
@@ -1,6 +1,6 @@
import zod from 'zod/v4';
-import { PublicUserSchema } from '../../user/validation';
+import { PublicUserSchema } from '@/app/api/user/validation';
export const searchUserSchema = zod.object({
query: zod.string().optional().default(''),
diff --git a/src/app/api/user/[user]/route.ts b/src/app/api/user/[user]/route.ts
index 28cbe10..f50727d 100644
--- a/src/app/api/user/[user]/route.ts
+++ b/src/app/api/user/[user]/route.ts
@@ -8,7 +8,7 @@ import { ErrorResponseSchema } from '@/app/api/validation';
import { auth } from '@/auth';
import { prisma } from '@/prisma';
-import { PublicUserResponseSchema } from '../validation';
+import { PublicUserResponseSchema } from '@/app/api/user/validation';
export const GET = auth(async function GET(req, { params }) {
const authCheck = userAuthenticated(req);
diff --git a/src/app/api/user/[user]/swagger.ts b/src/app/api/user/[user]/swagger.ts
index 7ef76d5..1f39610 100644
--- a/src/app/api/user/[user]/swagger.ts
+++ b/src/app/api/user/[user]/swagger.ts
@@ -6,8 +6,8 @@ import {
userNotFoundResponse,
} from '@/lib/defaultApiResponses';
-import { UserIdParamSchema } from '../../validation';
-import { PublicUserResponseSchema } from '../validation';
+import { UserIdParamSchema } from '@/app/api/validation';
+import { PublicUserResponseSchema } from '@/app/api/user/validation';
export default function registerSwaggerPaths(registry: OpenAPIRegistry) {
registry.registerPath({
diff --git a/src/app/api/user/me/password/route.ts b/src/app/api/user/me/password/route.ts
index 02cb3ee..cd031b3 100644
--- a/src/app/api/user/me/password/route.ts
+++ b/src/app/api/user/me/password/route.ts
@@ -13,8 +13,8 @@ import {
import { auth } from '@/auth';
import { prisma } from '@/prisma';
-import { FullUserResponseSchema } from '../../validation';
-import { updateUserPasswordServerSchema } from '../validation';
+import { FullUserResponseSchema } from '@/app/api/user/validation';
+import { updateUserPasswordServerSchema } from '@/app/api/user/me/validation';
export const PATCH = auth(async function PATCH(req) {
const authCheck = userAuthenticated(req);
diff --git a/src/app/api/user/me/password/swagger.ts b/src/app/api/user/me/password/swagger.ts
index feaee00..099c9b2 100644
--- a/src/app/api/user/me/password/swagger.ts
+++ b/src/app/api/user/me/password/swagger.ts
@@ -7,8 +7,8 @@ import {
userNotFoundResponse,
} from '@/lib/defaultApiResponses';
-import { FullUserResponseSchema } from '../../validation';
-import { updateUserPasswordServerSchema } from '../validation';
+import { FullUserResponseSchema } from '@/app/api/user/validation';
+import { updateUserPasswordServerSchema } from '@/app/api/user/me/validation';
export default function registerSwaggerPaths(registry: OpenAPIRegistry) {
registry.registerPath({
diff --git a/src/app/api/user/me/route.ts b/src/app/api/user/me/route.ts
index 03846e1..967d07c 100644
--- a/src/app/api/user/me/route.ts
+++ b/src/app/api/user/me/route.ts
@@ -12,7 +12,7 @@ import {
import { auth } from '@/auth';
import { prisma } from '@/prisma';
-import { FullUserResponseSchema } from '../validation';
+import { FullUserResponseSchema } from '@/app/api/user/validation';
import { updateUserServerSchema } from './validation';
export const GET = auth(async function GET(req) {
diff --git a/src/app/api/user/me/swagger.ts b/src/app/api/user/me/swagger.ts
index f8ab254..54faf1a 100644
--- a/src/app/api/user/me/swagger.ts
+++ b/src/app/api/user/me/swagger.ts
@@ -7,8 +7,8 @@ import {
userNotFoundResponse,
} from '@/lib/defaultApiResponses';
-import { SuccessResponseSchema } from '../../validation';
-import { FullUserResponseSchema } from '../validation';
+import { SuccessResponseSchema } from '@/app/api/validation';
+import { FullUserResponseSchema } from '@/app/api/user/validation';
import { updateUserServerSchema } from './validation';
export default function registerSwaggerPaths(registry: OpenAPIRegistry) {
diff --git a/src/components/custom-ui/event-list-entry.tsx b/src/components/custom-ui/event-list-entry.tsx
index 9452947..fbb94a9 100644
--- a/src/components/custom-ui/event-list-entry.tsx
+++ b/src/components/custom-ui/event-list-entry.tsx
@@ -18,7 +18,7 @@ import {
SelectItem,
SelectTrigger,
SelectValue,
-} from '../ui/select';
+} from '@/components/ui/select';
type EventListEntryProps = zod.output;
diff --git a/src/components/forms/event-form.tsx b/src/components/forms/event-form.tsx
index a73ee73..5915ae8 100644
--- a/src/components/forms/event-form.tsx
+++ b/src/components/forms/event-form.tsx
@@ -24,7 +24,7 @@ import {
} from '@/generated/api/event/event';
import { useGetApiUserMe } from '@/generated/api/user/user';
-import ParticipantListEntry from '../custom-ui/participant-list-entry';
+import ParticipantListEntry from '@/components/custom-ui/participant-list-entry';
import {
Dialog,
DialogContent,
@@ -33,7 +33,7 @@ import {
DialogHeader,
DialogTitle,
DialogTrigger,
-} from '../ui/dialog';
+} from '@/components/ui/dialog';
type User = zod.output;
diff --git a/src/components/wrappers/sidebar-provider.tsx b/src/components/wrappers/sidebar-provider.tsx
index ae0e25f..2568620 100644
--- a/src/components/wrappers/sidebar-provider.tsx
+++ b/src/components/wrappers/sidebar-provider.tsx
@@ -2,7 +2,7 @@
import React from 'react';
-import { SidebarProvider } from '../custom-ui/sidebar';
+import { SidebarProvider } from '@/components/custom-ui/sidebar';
export default function SidebarProviderWrapper({
defaultOpen,
diff --git a/yarn.lock b/yarn.lock
index f56d39f..5e77c18 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -5718,6 +5718,13 @@ __metadata:
languageName: node
linkType: hard
+"eslint-plugin-no-relative-import-paths@npm:^1.6.1":
+ version: 1.6.1
+ resolution: "eslint-plugin-no-relative-import-paths@npm:1.6.1"
+ checksum: 10c0/952d136ae959408d7f50fc6a630a010421ac39e7b8ccb0980817ae058941d19d6abe60233eabb5e9f32198de17d5d6ce9432f87ee8e2f2a243d71605b2e247ef
+ languageName: node
+ linkType: hard
+
"eslint-plugin-react-hooks@npm:^5.0.0":
version: 5.2.0
resolution: "eslint-plugin-react-hooks@npm:5.2.0"
@@ -7860,6 +7867,7 @@ __metadata:
eslint: "npm:9.30.0"
eslint-config-next: "npm:15.3.4"
eslint-config-prettier: "npm:10.1.5"
+ eslint-plugin-no-relative-import-paths: "npm:^1.6.1"
lucide-react: "npm:^0.525.0"
next: "npm:15.3.4"
next-auth: "npm:^5.0.0-beta.25"