improve code quality

This commit is contained in:
Wuesteon 2025-12-03 23:42:37 +01:00
parent ec23630755
commit 16cb8e753b
213 changed files with 2409 additions and 2644 deletions

View file

@ -1,10 +1,10 @@
{
"startTime": 1764606551673,
"sessionId": "session-1764606551673",
"lastActivity": 1764606551673,
"startTime": 1764801237027,
"sessionId": "session-1764801237027",
"lastActivity": 1764801237027,
"sessionDuration": 0,
"totalTasks": 2,
"successfulTasks": 2,
"totalTasks": 1,
"successfulTasks": 1,
"failedTasks": 0,
"totalAgents": 0,
"activeAgents": 0,

File diff suppressed because it is too large Load diff

View file

@ -1,10 +1,10 @@
[
{
"id": "cmd-swarm-1764606576686",
"id": "cmd-swarm-1764801237142",
"type": "swarm",
"success": true,
"duration": 4.44541700000002,
"timestamp": 1764606576691,
"duration": 5.236916000000008,
"timestamp": 1764801237147,
"metadata": {}
}
]

View file

@ -0,0 +1,17 @@
// @ts-check
import {
baseConfig,
typescriptConfig,
svelteConfig,
prettierConfig,
} from '@manacore/eslint-config';
export default [
{
ignores: ['dist/**', '.svelte-kit/**', 'node_modules/**'],
},
...baseConfig,
...typescriptConfig,
...svelteConfig,
...prettierConfig,
];

View file

@ -0,0 +1,17 @@
// @ts-check
import {
baseConfig,
typescriptConfig,
svelteConfig,
prettierConfig,
} from '@manacore/eslint-config';
export default [
{
ignores: ['dist/**', '.svelte-kit/**', 'node_modules/**'],
},
...baseConfig,
...typescriptConfig,
...svelteConfig,
...prettierConfig,
];

View file

@ -0,0 +1,17 @@
// @ts-check
import {
baseConfig,
typescriptConfig,
svelteConfig,
prettierConfig,
} from '@manacore/eslint-config';
export default [
{
ignores: ['dist/**', '.svelte-kit/**', 'node_modules/**'],
},
...baseConfig,
...typescriptConfig,
...svelteConfig,
...prettierConfig,
];

View file

@ -0,0 +1,17 @@
// @ts-check
import {
baseConfig,
typescriptConfig,
svelteConfig,
prettierConfig,
} from '@manacore/eslint-config';
export default [
{
ignores: ['dist/**', '.svelte-kit/**', 'node_modules/**'],
},
...baseConfig,
...typescriptConfig,
...svelteConfig,
...prettierConfig,
];

View file

@ -0,0 +1,17 @@
// @ts-check
import {
baseConfig,
typescriptConfig,
svelteConfig,
prettierConfig,
} from '@manacore/eslint-config';
export default [
{
ignores: ['dist/**', '.svelte-kit/**', 'node_modules/**'],
},
...baseConfig,
...typescriptConfig,
...svelteConfig,
...prettierConfig,
];

View file

@ -0,0 +1,11 @@
// @ts-check
import { baseConfig, typescriptConfig, prettierConfig } from '@manacore/eslint-config';
export default [
{
ignores: ['dist/**', '.astro/**', 'node_modules/**'],
},
...baseConfig,
...typescriptConfig,
...prettierConfig,
];

View file

@ -0,0 +1,17 @@
// @ts-check
import {
baseConfig,
typescriptConfig,
nestjsConfig,
prettierConfig,
} from '@manacore/eslint-config';
export default [
{
ignores: ['dist/**', 'node_modules/**'],
},
...baseConfig,
...typescriptConfig,
...nestjsConfig,
...prettierConfig,
];

View file

@ -0,0 +1,11 @@
// @ts-check
import { baseConfig, typescriptConfig, prettierConfig } from '@manacore/eslint-config';
export default [
{
ignores: ['dist/**', '.astro/**', 'node_modules/**'],
},
...baseConfig,
...typescriptConfig,
...prettierConfig,
];

View file

@ -0,0 +1,17 @@
// @ts-check
import {
baseConfig,
typescriptConfig,
svelteConfig,
prettierConfig,
} from '@manacore/eslint-config';
export default [
{
ignores: ['dist/**', '.svelte-kit/**', 'node_modules/**'],
},
...baseConfig,
...typescriptConfig,
...svelteConfig,
...prettierConfig,
];

View file

@ -10,7 +10,6 @@
"dev:landing": "pnpm --filter @calendar/landing dev",
"dev:mobile": "pnpm --filter @calendar/mobile dev",
"build": "turbo run build",
"lint": "turbo run lint",
"clean": "turbo run clean",
"db:push": "pnpm --filter @calendar/backend db:push",
"db:studio": "pnpm --filter @calendar/backend db:studio",

View file

@ -1,5 +1,5 @@
import type { RecurrencePattern, RecurrenceFrequency, Weekday } from '../types/recurrence';
import { addDays, addWeeks, addMonths, addYears } from './date';
import { addDays, addMonths, addYears } from './date';
/**
* Parse an RFC 5545 RRULE string to a RecurrencePattern object
@ -46,13 +46,14 @@ export function parseRRule(rrule: string): RecurrencePattern | null {
pattern.count = parseInt(value, 10);
break;
case 'UNTIL':
case 'UNTIL': {
// Parse UNTIL date (format: YYYYMMDD or YYYYMMDDTHHMMSSZ)
const year = parseInt(value.substring(0, 4), 10);
const month = parseInt(value.substring(4, 6), 10) - 1;
const day = parseInt(value.substring(6, 8), 10);
pattern.until = new Date(year, month, day, 23, 59, 59);
break;
}
}
}
@ -188,7 +189,7 @@ export function generateOccurrences(
rangeStart: Date,
rangeEnd: Date,
exceptions: string[] = [],
maxOccurrences: number = 365
maxOccurrences = 365
): Date[] {
const occurrences: Date[] = [];
const exceptionsSet = new Set(exceptions);

View file

@ -0,0 +1,17 @@
// @ts-check
import {
baseConfig,
typescriptConfig,
nestjsConfig,
prettierConfig,
} from '@manacore/eslint-config';
export default [
{
ignores: ['dist/**', 'node_modules/**'],
},
...baseConfig,
...typescriptConfig,
...nestjsConfig,
...prettierConfig,
];

View file

@ -1,8 +1,8 @@
import { Body, Controller, Get, Post, UseGuards } from '@nestjs/common';
import { isOk } from '@manacore/shared-errors';
import { ChatService } from './chat.service';
import { ChatCompletionDto, ChatCompletionResponseDto } from './dto/chat-completion.dto';
import { JwtAuthGuard, CurrentUser, CurrentUserData } from '@manacore/shared-nestjs-auth';
import { type ChatService } from './chat.service';
import { type ChatCompletionDto, type ChatCompletionResponseDto } from './dto/chat-completion.dto';
import { JwtAuthGuard, CurrentUser, type CurrentUserData } from '@manacore/shared-nestjs-auth';
@Controller('chat')
@UseGuards(JwtAuthGuard)

View file

@ -1,12 +1,12 @@
import { Injectable, Inject, Logger } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import { type ConfigService } from '@nestjs/config';
import { eq } from 'drizzle-orm';
import { type AsyncResult, ok, err, ValidationError, ServiceError } from '@manacore/shared-errors';
import { GoogleGenerativeAI } from '@google/generative-ai';
import { DATABASE_CONNECTION } from '../db/database.module';
import { type Database } from '../db/connection';
import { models, type Model } from '../db/schema/models.schema';
import { ChatCompletionDto, ChatCompletionResponseDto } from './dto/chat-completion.dto';
import { type ChatCompletionDto, type ChatCompletionResponseDto } from './dto/chat-completion.dto';
@Injectable()
export class ChatService {

View file

@ -10,10 +10,10 @@ import {
UseGuards,
} from '@nestjs/common';
import { isOk } from '@manacore/shared-errors';
import { ConversationService } from './conversation.service';
import { type ConversationService } from './conversation.service';
import { type Conversation } from '../db/schema/conversations.schema';
import { type Message } from '../db/schema/messages.schema';
import { JwtAuthGuard, CurrentUser, CurrentUserData } from '@manacore/shared-nestjs-auth';
import { JwtAuthGuard, CurrentUser, type CurrentUserData } from '@manacore/shared-nestjs-auth';
@Controller('conversations')
@UseGuards(JwtAuthGuard)

View file

@ -2,7 +2,7 @@ import { drizzle } from 'drizzle-orm/postgres-js';
import * as schema from './schema';
// Use require for postgres to avoid ESM/CommonJS interop issues
// eslint-disable-next-line @typescript-eslint/no-var-requires
const postgres = require('postgres');
let connection: ReturnType<typeof postgres> | null = null;

View file

@ -1,4 +1,4 @@
import { Module, Global, OnModuleDestroy } from '@nestjs/common';
import { Module, Global, type OnModuleDestroy } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import { getDb, closeConnection, type Database } from './connection';

View file

@ -1,8 +1,8 @@
import { Body, Controller, Delete, Get, Param, Post, UseGuards } from '@nestjs/common';
import { isOk } from '@manacore/shared-errors';
import { DocumentService } from './document.service';
import { type DocumentService } from './document.service';
import { type Document } from '../db/schema/documents.schema';
import { JwtAuthGuard, CurrentUser, CurrentUserData } from '@manacore/shared-nestjs-auth';
import { JwtAuthGuard, CurrentUser, type CurrentUserData } from '@manacore/shared-nestjs-auth';
@Controller('documents')
@UseGuards(JwtAuthGuard)

View file

@ -1,6 +1,6 @@
import { Controller, Get, Param } from '@nestjs/common';
import { isOk } from '@manacore/shared-errors';
import { ModelService } from './model.service';
import { type ModelService } from './model.service';
import { type Model } from '../db/schema/models.schema';
// Models are publicly accessible - no auth required to list available models

View file

@ -1,8 +1,8 @@
import { Body, Controller, Delete, Get, Param, Patch, Post, UseGuards } from '@nestjs/common';
import { isOk } from '@manacore/shared-errors';
import { SpaceService } from './space.service';
import { type SpaceService } from './space.service';
import { type Space, type SpaceMember } from '../db/schema/spaces.schema';
import { JwtAuthGuard, CurrentUser, CurrentUserData } from '@manacore/shared-nestjs-auth';
import { JwtAuthGuard, CurrentUser, type CurrentUserData } from '@manacore/shared-nestjs-auth';
@Controller('spaces')
@UseGuards(JwtAuthGuard)

View file

@ -1,8 +1,8 @@
import { Body, Controller, Delete, Get, Param, Patch, Post, UseGuards } from '@nestjs/common';
import { isOk } from '@manacore/shared-errors';
import { TemplateService } from './template.service';
import { type TemplateService } from './template.service';
import { type Template } from '../db/schema/templates.schema';
import { JwtAuthGuard, CurrentUser, CurrentUserData } from '@manacore/shared-nestjs-auth';
import { JwtAuthGuard, CurrentUser, type CurrentUserData } from '@manacore/shared-nestjs-auth';
@Controller('templates')
@UseGuards(JwtAuthGuard)

View file

@ -0,0 +1,11 @@
// @ts-check
import { baseConfig, typescriptConfig, prettierConfig } from '@manacore/eslint-config';
export default [
{
ignores: ['dist/**', '.astro/**', 'node_modules/**'],
},
...baseConfig,
...typescriptConfig,
...prettierConfig,
];

View file

@ -9,7 +9,8 @@
"build": "astro check && astro build",
"preview": "astro preview",
"astro": "astro",
"type-check": "astro check"
"type-check": "astro check",
"lint": "eslint ."
},
"dependencies": {
"@astrojs/check": "^0.9.0",

View file

@ -0,0 +1,12 @@
// @ts-check
import { baseConfig, typescriptConfig, reactConfig, prettierConfig } from '@manacore/eslint-config';
export default [
{
ignores: ['dist/**', '.expo/**', 'node_modules/**', 'android/**', 'ios/**'],
},
...baseConfig,
...typescriptConfig,
...reactConfig,
...prettierConfig,
];

View file

@ -12,8 +12,8 @@
"build:preview": "eas build --profile preview",
"build:prod": "eas build --profile production",
"prebuild": "expo prebuild",
"lint": "eslint \"**/*.{js,jsx,ts,tsx}\" && prettier -c \"**/*.{js,jsx,ts,tsx,json}\"",
"format": "eslint \"**/*.{js,jsx,ts,tsx}\" --fix && prettier \"**/*.{js,jsx,ts,tsx,json}\" --write",
"lint": "eslint .",
"format": "eslint . --fix",
"web": "expo start --web"
},
"dependencies": {
@ -49,7 +49,7 @@
"@typescript-eslint/eslint-plugin": "^7.7.0",
"@typescript-eslint/parser": "^7.7.0",
"dotenv": "^16.4.7",
"eslint": "^8.57.0",
"eslint": "^9.39.1",
"eslint-config-universe": "^12.0.1",
"prettier": "^3.2.5",
"prettier-plugin-tailwindcss": "^0.5.11",

View file

@ -0,0 +1,17 @@
// @ts-check
import {
baseConfig,
typescriptConfig,
svelteConfig,
prettierConfig,
} from '@manacore/eslint-config';
export default [
{
ignores: ['dist/**', '.svelte-kit/**', 'node_modules/**'],
},
...baseConfig,
...typescriptConfig,
...svelteConfig,
...prettierConfig,
];

View file

@ -10,7 +10,8 @@
"prepare": "svelte-kit sync || echo ''",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"type-check": "echo 'Skipping type-check: @chat/web needs shared-ui component fixes'"
"type-check": "echo 'Skipping type-check: @chat/web needs shared-ui component fixes'",
"lint": "eslint ."
},
"devDependencies": {
"@sveltejs/adapter-auto": "^6.0.0",

View file

@ -4,7 +4,6 @@
"private": true,
"description": "Chat project - AI chat application with mobile, web and landing",
"scripts": {
"dev": "turbo run dev",
"lint": "turbo run lint"
"dev": "turbo run dev"
}
}

View file

@ -7,5 +7,8 @@
"types": "./src/index.ts",
"exports": {
".": "./src/index.ts"
},
"scripts": {
"lint": "eslint ."
}
}

View file

@ -0,0 +1,17 @@
// @ts-check
import {
baseConfig,
typescriptConfig,
nestjsConfig,
prettierConfig,
} from '@manacore/eslint-config';
export default [
{
ignores: ['dist/**', 'node_modules/**'],
},
...baseConfig,
...typescriptConfig,
...nestjsConfig,
...prettierConfig,
];

View file

@ -0,0 +1,17 @@
// @ts-check
import {
baseConfig,
typescriptConfig,
svelteConfig,
prettierConfig,
} from '@manacore/eslint-config';
export default [
{
ignores: ['dist/**', '.svelte-kit/**', 'node_modules/**'],
},
...baseConfig,
...typescriptConfig,
...svelteConfig,
...prettierConfig,
];

View file

@ -10,7 +10,6 @@
"dev:landing": "pnpm --filter @contacts/landing dev",
"dev:mobile": "pnpm --filter @contacts/mobile dev",
"build": "turbo run build",
"lint": "turbo run lint",
"clean": "turbo run clean",
"db:push": "pnpm --filter @contacts/backend db:push",
"db:studio": "pnpm --filter @contacts/backend db:studio",

View file

@ -0,0 +1,17 @@
// @ts-check
import {
baseConfig,
typescriptConfig,
nestjsConfig,
prettierConfig,
} from '@manacore/eslint-config';
export default [
{
ignores: ['dist/**', 'node_modules/**'],
},
...baseConfig,
...typescriptConfig,
...nestjsConfig,
...prettierConfig,
];

View file

@ -0,0 +1,11 @@
// @ts-check
import { baseConfig, typescriptConfig, prettierConfig } from '@manacore/eslint-config';
export default [
{
ignores: ['dist/**', '.astro/**', 'node_modules/**'],
},
...baseConfig,
...typescriptConfig,
...prettierConfig,
];

View file

@ -0,0 +1,12 @@
// @ts-check
import { baseConfig, typescriptConfig, reactConfig, prettierConfig } from '@manacore/eslint-config';
export default [
{
ignores: ['dist/**', '.expo/**', 'node_modules/**', 'android/**', 'ios/**'],
},
...baseConfig,
...typescriptConfig,
...reactConfig,
...prettierConfig,
];

View file

@ -0,0 +1,11 @@
// @ts-check
import { baseConfig, typescriptConfig, prettierConfig } from '@manacore/eslint-config';
export default [
{
ignores: ['dist/**', '.astro/**', 'node_modules/**'],
},
...baseConfig,
...typescriptConfig,
...prettierConfig,
];

View file

@ -5,7 +5,8 @@
"scripts": {
"dev": "astro dev",
"build": "astro build",
"preview": "astro preview"
"preview": "astro preview",
"lint": "eslint ."
},
"dependencies": {
"@astrojs/react": "^3.6.0",

View file

@ -1,2 +1,2 @@
// @ts-ignore
// @ts-expect-error nativewind types
/// <reference types="nativewind/types" />

View file

@ -1,11 +1,10 @@
import React, { useState } from 'react';
import { Stack } from 'expo-router';
import { ScrollView, Text, View, TouchableOpacity, Image, Alert } from 'react-native';
import { ScrollView, Text, View, TouchableOpacity, Alert } from 'react-native';
import { FontAwesome5 } from '@expo/vector-icons';
import { Container } from '~/components/Container';
import { useTheme } from '../../utils/themeContext';
import { supabase } from '../../utils/supabase';
// Definiere die Mana-Pakete
const manaPacks = [

View file

@ -1,8 +1,7 @@
import { Stack, useRouter } from 'expo-router';
import { ScrollView, Text, View, TouchableOpacity, Pressable } from 'react-native';
import { ScrollView, Text, View, TouchableOpacity } from 'react-native';
import { FontAwesome5 } from '@expo/vector-icons';
import { Container } from '~/components/Container';
import DashboardStats from '../../components/DashboardStats';
import { useTheme } from '../../utils/themeContext';

View file

@ -47,6 +47,7 @@ export default function OrganizationDetails() {
}
fetchOrganizationDetails();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [initialOrgName, orgId]);
const fetchOrganizationDetails = async () => {
@ -94,14 +95,6 @@ export default function OrganizationDetails() {
.eq('user_id', session.user.id)
.eq('organization_id', orgId);
// Supabase gibt die Daten in einem anderen Format zurück als erwartet
// Definiere den korrekten Typ für die Benutzerrolle
interface UserRoleWithRoles {
roles: {
name: string;
};
}
if (currentUserRolesError) throw currentUserRolesError;
// Finde die höchste Rolle
@ -314,7 +307,7 @@ export default function OrganizationDetails() {
{/* Lösch-Bestätigungsmodal */}
<Modal
animationType="fade"
transparent={true}
transparent
visible={showDeleteModal}
onRequestClose={cancelDelete}
>
@ -339,8 +332,7 @@ export default function OrganizationDetails() {
<Text
className={`mb-6 text-center text-base ${isDarkMode ? 'text-gray-300' : 'text-gray-600'}`}
>
Möchtest du die Organisation "{orgName}" wirklich löschen? Diese Aktion kann nicht
rückgängig gemacht werden.
{`Möchtest du die Organisation "${orgName}" wirklich löschen? Diese Aktion kann nicht rückgängig gemacht werden.`}
</Text>
<View className="flex-row justify-between">

View file

@ -68,7 +68,7 @@ export default function Organizations() {
<Text className="text-sm font-semibold text-white">Neue Organisation</Text>
</TouchableOpacity>
</View>
<OrganizationList hideTitle={true} ref={organizationListRef} />
<OrganizationList hideTitle ref={organizationListRef} />
</>
) : (
<>

View file

@ -7,14 +7,13 @@ import {
ScrollView,
TextInput,
Alert,
ActivityIndicator,
} from 'react-native';
import { Stack } from 'expo-router';
import { FontAwesome5 } from '@expo/vector-icons';
import { Container } from '~/components/Container';
import { useTheme, ThemeMode } from '~/utils/themeContext';
import { useTheme, type ThemeMode } from '~/utils/themeContext';
import { supabase } from '../../utils/supabase';
import { Session } from '@supabase/supabase-js';
import { type Session } from '@supabase/supabase-js';
interface Profile {
id: string;

View file

@ -5,11 +5,9 @@ import {
Text,
View,
TouchableOpacity,
TextInput,
Alert,
ActivityIndicator,
Modal,
Pressable,
} from 'react-native';
import { FontAwesome5 } from '@expo/vector-icons';
@ -27,16 +25,12 @@ export default function TeamDetails() {
}>();
const { isDarkMode } = useTheme();
const [teamName, setTeamName] = useState(initialTeamName || '');
const [isEditing, setIsEditing] = useState(false);
const [newTeamName, setNewTeamName] = useState('');
const [loading, setLoading] = useState(false);
const [deletingTeam, setDeletingTeam] = useState(false);
const [showDeleteModal, setShowDeleteModal] = useState(false);
useEffect(() => {
if (initialTeamName) {
setTeamName(initialTeamName);
setNewTeamName(initialTeamName);
}
}, [initialTeamName]);
@ -44,47 +38,6 @@ export default function TeamDetails() {
router.push('/teams');
};
const startEditing = () => {
setIsEditing(true);
setNewTeamName(teamName);
};
const cancelEditing = () => {
setIsEditing(false);
};
const updateTeamName = async () => {
if (!newTeamName.trim()) {
Alert.alert('Fehler', 'Der Teamname darf nicht leer sein.');
return;
}
if (newTeamName.trim() === teamName) {
setIsEditing(false);
return;
}
setLoading(true);
try {
const { error } = await supabase
.from('teams')
.update({ name: newTeamName.trim() })
.eq('id', teamId);
if (error) throw error;
setTeamName(newTeamName.trim());
setIsEditing(false);
Alert.alert('Erfolg', 'Der Teamname wurde erfolgreich aktualisiert.');
} catch (error) {
console.error('Fehler beim Aktualisieren des Teamnamens:', error);
Alert.alert('Fehler', 'Es ist ein Fehler beim Aktualisieren des Teamnamens aufgetreten.');
} finally {
setLoading(false);
}
};
const deleteTeam = () => {
console.log('Delete team button clicked, teamId:', teamId);
// Modal öffnen statt Alert anzeigen
@ -111,7 +64,7 @@ export default function TeamDetails() {
console.log('Checking for dependencies...');
// 1. Prüfe auf credit_transactions
const { data: txData, error: txCheckError } = await supabase
const { data: txData } = await supabase
.from('credit_transactions')
.select('id')
.eq('team_id', teamId);
@ -119,7 +72,7 @@ export default function TeamDetails() {
console.log('Credit transactions:', txData);
// 2. Prüfe auf team_members
const { data: memberData, error: memberCheckError } = await supabase
const { data: memberData } = await supabase
.from('team_members')
.select('user_id')
.eq('team_id', teamId);
@ -127,7 +80,7 @@ export default function TeamDetails() {
console.log('Team members:', memberData);
// 3. Prüfe auf user_roles
const { data: roleData, error: roleCheckError } = await supabase
const { data: roleData } = await supabase
.from('user_roles')
.select('id')
.eq('team_id', teamId);
@ -240,7 +193,7 @@ export default function TeamDetails() {
{/* Lösch-Bestätigungsmodal */}
<Modal
animationType="fade"
transparent={true}
transparent
visible={showDeleteModal}
onRequestClose={cancelDelete}
>
@ -265,8 +218,7 @@ export default function TeamDetails() {
<Text
className={`mb-6 text-center text-base ${isDarkMode ? 'text-gray-300' : 'text-gray-600'}`}
>
Möchtest du das Team "{teamName}" wirklich löschen? Diese Aktion kann nicht rückgängig
gemacht werden.
{`Möchtest du das Team "${teamName}" wirklich löschen? Diese Aktion kann nicht rückgängig gemacht werden.`}
</Text>
<View className="flex-row justify-between">

View file

@ -55,7 +55,7 @@ export default function Teams() {
<Text className="text-sm font-semibold text-white">Neues Team</Text>
</TouchableOpacity>
</View>
<TeamList hideTitle={true} />
<TeamList hideTitle />
</>
) : (
<>

View file

@ -8,7 +8,7 @@ export default function NotFoundScreen() {
<>
<Stack.Screen options={{ title: 'Oops!' }} />
<Container>
<Text className={styles.title}>This screen doesn't exist.</Text>
<Text className={styles.title}>This screen does not exist.</Text>
<Link href="/" className={styles.link}>
<Text className={styles.linkText}>Go to home screen!</Text>
</Link>

View file

@ -5,7 +5,7 @@ import { Stack, useRouter, useSegments } from 'expo-router';
import { GestureHandlerRootView } from 'react-native-gesture-handler';
import { ThemeProvider } from '~/utils/themeContext';
import { supabase } from '../utils/supabase';
import { Session } from '@supabase/supabase-js';
import { type Session } from '@supabase/supabase-js';
export const unstable_settings = {
// Ensure that reloading on `/modal` keeps a back button present.
@ -54,6 +54,7 @@ function AuthProvider({ children }: { children: React.ReactNode }) {
// leite ihn zur Hauptseite um
router.replace('/');
}
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [session, segments, isLoading]);
// Zeige nichts während des Ladens

View file

@ -10,7 +10,6 @@ import {
Platform,
} from 'react-native';
import { Stack, useRouter, useLocalSearchParams } from 'expo-router';
import { supabase } from '../../utils/supabase';
import { useTheme } from '../../utils/themeContext';
export default function ResetPasswordScreen() {
@ -32,6 +31,7 @@ export default function ResetPasswordScreen() {
return;
}
verifyToken();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
const verifyToken = async () => {

View file

@ -1,7 +1,7 @@
import React, { useState, useEffect } from 'react';
import { View, Text, TextInput, TouchableOpacity, StyleSheet, Alert } from 'react-native';
import { supabase } from '../utils/supabase';
import { Session } from '@supabase/supabase-js';
import { type Session } from '@supabase/supabase-js';
interface Profile {
id: string;
@ -21,6 +21,7 @@ export default function Account({ session }: { session: Session }) {
useEffect(() => {
if (session) getProfile();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [session]);
async function getProfile() {

View file

@ -1,17 +1,8 @@
import React, { useState } from 'react';
import {
Alert,
StyleSheet,
View,
TextInput,
TouchableOpacity,
Text,
Image,
Platform,
} from 'react-native';
import { Alert, StyleSheet, View, TextInput, TouchableOpacity, Text, Platform } from 'react-native';
import { FontAwesome5 } from '@expo/vector-icons';
import { supabase } from '../utils/supabase';
import { useTheme, useThemeColors, lightColors, darkColors } from '../utils/themeContext';
import { useTheme, useThemeColors } from '../utils/themeContext';
export default function Auth() {
const { isDarkMode } = useTheme();

View file

@ -1,5 +1,5 @@
import { forwardRef } from 'react';
import { Text, TouchableOpacity, TouchableOpacityProps, View } from 'react-native';
import { Text, TouchableOpacity, type TouchableOpacityProps, type View } from 'react-native';
type ButtonProps = {
title: string;

View file

@ -9,7 +9,7 @@ import {
ScrollView,
} from 'react-native';
import { supabase } from '../utils/supabase';
import { Session } from '@supabase/supabase-js';
import { type Session } from '@supabase/supabase-js';
import { useTheme } from '../utils/themeContext';
interface UserRole {

View file

@ -9,7 +9,7 @@ import {
ScrollView,
} from 'react-native';
import { supabase } from '../utils/supabase';
import { Session } from '@supabase/supabase-js';
import { type Session } from '@supabase/supabase-js';
import { useTheme } from '../utils/themeContext';
import { useRouter } from 'expo-router';
@ -30,7 +30,7 @@ interface CreateTeamProps {
}
export default function CreateTeam({ onTeamCreated }: CreateTeamProps) {
const router = useRouter();
const _router = useRouter();
const [session, setSession] = useState<Session | null>(null);
const [loading, setLoading] = useState(false);
const [organizations, setOrganizations] = useState<Organization[]>([]);

View file

@ -3,7 +3,7 @@ import { View, Text, TouchableOpacity, ActivityIndicator } from 'react-native';
import { FontAwesome5 } from '@expo/vector-icons';
import { useRouter } from 'expo-router';
import { supabase } from '../utils/supabase';
import { Session } from '@supabase/supabase-js';
import { type Session } from '@supabase/supabase-js';
import { useTheme, lightColors, darkColors } from '../utils/themeContext';
export default function DashboardStats() {

View file

@ -3,7 +3,7 @@ import { forwardRef } from 'react';
import { Pressable, StyleSheet } from 'react-native';
export const HeaderButton = forwardRef<typeof Pressable, { onPress?: () => void }>(
({ onPress }, ref) => {
({ onPress }, _ref) => {
return (
<Pressable onPress={onPress}>
{({ pressed }) => (

View file

@ -2,7 +2,7 @@ import React, { useState, useEffect, forwardRef, useImperativeHandle } from 'rea
import { View, Text, FlatList, TouchableOpacity, ActivityIndicator, Alert } from 'react-native';
import { FontAwesome5 } from '@expo/vector-icons';
import { supabase } from '../utils/supabase';
import { Session } from '@supabase/supabase-js';
import { type Session } from '@supabase/supabase-js';
import { useTheme } from '../utils/themeContext';
import { useRouter } from 'expo-router';
@ -67,6 +67,7 @@ const OrganizationList = forwardRef<OrganizationListRef, OrganizationListProps>(
});
return () => subscription.unsubscribe();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, []);
async function fetchUserOrganizations(userId: string) {

View file

@ -9,7 +9,7 @@ import {
ActivityIndicator,
} from 'react-native';
import { supabase } from '../utils/supabase';
import { Session } from '@supabase/supabase-js';
import { type Session } from '@supabase/supabase-js';
import { useTheme } from '../utils/themeContext';
interface User {
@ -464,133 +464,3 @@ export default function SendMana() {
</View>
);
}
const styles = StyleSheet.create({
container: {
backgroundColor: 'white',
borderRadius: 10,
padding: 20,
marginBottom: 20,
shadowColor: '#000',
shadowOffset: { width: 0, height: 2 },
shadowOpacity: 0.1,
shadowRadius: 4,
elevation: 3,
},
header: {
fontSize: 22,
fontWeight: 'bold',
marginBottom: 20,
color: '#333',
},
creditInfo: {
flexDirection: 'row',
alignItems: 'center',
backgroundColor: '#f0f8ff',
padding: 15,
borderRadius: 8,
marginBottom: 20,
},
creditLabel: {
fontSize: 16,
fontWeight: '500',
color: '#333',
},
creditAmount: {
fontSize: 18,
fontWeight: 'bold',
color: '#0055FF',
marginLeft: 10,
},
formGroup: {
marginBottom: 15,
},
label: {
fontSize: 16,
marginBottom: 8,
fontWeight: '500',
color: '#333',
},
input: {
height: 50,
borderWidth: 1,
borderColor: '#ddd',
borderRadius: 8,
paddingHorizontal: 15,
backgroundColor: '#f9f9f9',
fontSize: 16,
},
searchContainer: {
flexDirection: 'row',
alignItems: 'center',
},
searchInput: {
flex: 1,
height: 50,
borderWidth: 1,
borderColor: '#ddd',
borderRadius: 8,
paddingHorizontal: 15,
backgroundColor: '#f9f9f9',
fontSize: 16,
},
searchButton: {
backgroundColor: '#0055FF',
height: 50,
paddingHorizontal: 15,
borderRadius: 8,
justifyContent: 'center',
alignItems: 'center',
marginLeft: 10,
},
searchButtonText: {
color: 'white',
fontSize: 14,
fontWeight: 'bold',
},
userCard: {
backgroundColor: '#f0f8ff',
padding: 15,
borderRadius: 8,
marginBottom: 20,
borderLeftWidth: 4,
borderLeftColor: '#0055FF',
},
userCardTitle: {
fontSize: 14,
color: '#666',
marginBottom: 5,
},
userCardEmail: {
fontSize: 16,
fontWeight: 'bold',
color: '#333',
},
userCardName: {
fontSize: 14,
color: '#666',
marginTop: 5,
},
sendButton: {
backgroundColor: '#0055FF',
height: 50,
borderRadius: 8,
justifyContent: 'center',
alignItems: 'center',
marginTop: 10,
},
sendButtonText: {
color: 'white',
fontSize: 16,
fontWeight: 'bold',
},
disabledButton: {
backgroundColor: '#ccc',
},
notLoggedIn: {
fontSize: 16,
color: '#666',
textAlign: 'center',
padding: 20,
},
});

View file

@ -10,7 +10,7 @@ import {
} from 'react-native';
import { FontAwesome5 } from '@expo/vector-icons';
import { supabase } from '../utils/supabase';
import { Session } from '@supabase/supabase-js';
import { type Session } from '@supabase/supabase-js';
import { useRouter } from 'expo-router';
import { useTheme } from '../utils/themeContext';

View file

@ -10,8 +10,7 @@ import {
} from 'react-native';
import { FontAwesome5 } from '@expo/vector-icons';
import { supabase } from '../utils/supabase';
import { Session } from '@supabase/supabase-js';
import { useLocalSearchParams } from 'expo-router';
import { type Session } from '@supabase/supabase-js';
import { useTheme } from '../utils/themeContext';
interface TeamMember {
@ -45,7 +44,7 @@ export default function TeamMembers({ teamId }: TeamMembersProps) {
const [members, setMembers] = useState<TeamMember[]>([]);
const [newMemberEmail, setNewMemberEmail] = useState('');
const [inviting, setInviting] = useState(false);
const [userRole, setUserRole] = useState<string | null>(null);
const [_userRole, setUserRole] = useState<string | null>(null);
const [isAdmin, setIsAdmin] = useState(false);
const { isDarkMode } = useTheme();
const [isEditing, setIsEditing] = useState(false);
@ -95,6 +94,7 @@ export default function TeamMembers({ teamId }: TeamMembersProps) {
});
return () => subscription.unsubscribe();
// eslint-disable-next-line react-hooks/exhaustive-deps
}, [teamId]);
async function checkUserRole(userId: string, teamId: string) {

View file

@ -0,0 +1,20 @@
// @ts-check
import { baseConfig, typescriptConfig, reactConfig, prettierConfig } from '@manacore/eslint-config';
export default [
{
ignores: [
'dist/**',
'.expo/**',
'node_modules/**',
'android/**',
'ios/**',
'metro.config.js',
'tailwind.config.js',
],
},
...baseConfig,
...typescriptConfig,
...reactConfig,
...prettierConfig,
];

View file

@ -10,8 +10,8 @@
"build:preview": "eas build --profile preview",
"build:prod": "eas build --profile production",
"prebuild": "expo prebuild",
"lint": "eslint \"**/*.{js,jsx,ts,tsx}\" && prettier -c \"**/*.{js,jsx,ts,tsx,json}\"",
"format": "eslint \"**/*.{js,jsx,ts,tsx}\" --fix && prettier \"**/*.{js,jsx,ts,tsx,json}\" --write",
"lint": "eslint .",
"format": "eslint . --fix",
"web": "expo start --web --port 19006",
"web:dev": "expo start --web --port 19006"
},
@ -47,7 +47,7 @@
"@types/react-dom": "^19.2.3",
"@typescript-eslint/eslint-plugin": "^7.7.0",
"@typescript-eslint/parser": "^7.7.0",
"eslint": "^8.57.0",
"eslint": "^9.39.1",
"eslint-config-universe": "^12.0.1",
"prettier": "^3.2.5",
"prettier-plugin-tailwindcss": "^0.5.11",

View file

@ -12,7 +12,7 @@ interface StorageData {
class HybridStorageService {
private memoryStorage: StorageData = {};
private isAsyncStorageAvailable: boolean = false;
private isAsyncStorageAvailable = false;
constructor() {
// Check if we're in an environment where AsyncStorage is available
@ -34,7 +34,7 @@ class HybridStorageService {
if (this.isAsyncStorageAvailable) {
await this.syncFromAsyncStorage();
}
} catch (error) {
} catch (_error) {
console.warn('AsyncStorage not available, falling back to memory storage');
this.isAsyncStorageAvailable = false;
}

View file

@ -0,0 +1,17 @@
// @ts-check
import {
baseConfig,
typescriptConfig,
svelteConfig,
prettierConfig,
} from '@manacore/eslint-config';
export default [
{
ignores: ['dist/**', '.svelte-kit/**', 'node_modules/**'],
},
...baseConfig,
...typescriptConfig,
...svelteConfig,
...prettierConfig,
];

View file

@ -1,34 +1,17 @@
// @ts-check
import eslint from '@eslint/js';
import eslintPluginPrettierRecommended from 'eslint-plugin-prettier/recommended';
import globals from 'globals';
import tseslint from 'typescript-eslint';
import {
baseConfig,
typescriptConfig,
nestjsConfig,
prettierConfig,
} from '@manacore/eslint-config';
export default tseslint.config(
{
ignores: ['eslint.config.mjs'],
},
eslint.configs.recommended,
...tseslint.configs.recommendedTypeChecked,
eslintPluginPrettierRecommended,
{
languageOptions: {
globals: {
...globals.node,
...globals.jest,
},
sourceType: 'commonjs',
parserOptions: {
projectService: true,
tsconfigRootDir: import.meta.dirname,
},
},
},
{
rules: {
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-floating-promises': 'warn',
'@typescript-eslint/no-unsafe-argument': 'warn'
},
},
);
export default [
{
ignores: ['dist/**', 'node_modules/**'],
},
...baseConfig,
...typescriptConfig,
...nestjsConfig,
...prettierConfig,
];

View file

@ -0,0 +1,11 @@
// @ts-check
import { baseConfig, typescriptConfig, prettierConfig } from '@manacore/eslint-config';
export default [
{
ignores: ['dist/**', '.astro/**', 'node_modules/**'],
},
...baseConfig,
...typescriptConfig,
...prettierConfig,
];

View file

@ -9,7 +9,8 @@
"build": "astro check && astro build",
"preview": "astro preview",
"astro": "astro",
"type-check": "astro check"
"type-check": "astro check",
"lint": "eslint ."
},
"dependencies": {
"@astrojs/check": "^0.9.0",

View file

@ -1,15 +0,0 @@
/* eslint-env node */
const { defineConfig } = require('eslint/config');
const expoConfig = require('eslint-config-expo/flat');
module.exports = defineConfig([
expoConfig,
{
ignores: ['dist/*'],
},
{
rules: {
'react/display-name': 'off',
},
},
]);

View file

@ -0,0 +1,12 @@
// @ts-check
import { baseConfig, typescriptConfig, reactConfig, prettierConfig } from '@manacore/eslint-config';
export default [
{
ignores: ['dist/**', '.expo/**', 'node_modules/**', 'android/**', 'ios/**'],
},
...baseConfig,
...typescriptConfig,
...reactConfig,
...prettierConfig,
];

View file

@ -12,8 +12,8 @@
"build:preview": "eas build --profile preview",
"build:prod": "eas build --profile production",
"prebuild": "expo prebuild",
"lint": "eslint \"**/*.{js,jsx,ts,tsx}\" && prettier -c \"**/*.{js,jsx,ts,tsx,json}\"",
"format": "eslint \"**/*.{js,jsx,ts,tsx}\" --fix && prettier \"**/*.{js,jsx,ts,tsx,json}\" --write",
"lint": "eslint .",
"format": "eslint . --fix",
"web": "expo start --web"
},
"dependencies": {

View file

@ -0,0 +1,17 @@
// @ts-check
import {
baseConfig,
typescriptConfig,
svelteConfig,
prettierConfig,
} from '@manacore/eslint-config';
export default [
{
ignores: ['dist/**', '.svelte-kit/**', 'node_modules/**'],
},
...baseConfig,
...typescriptConfig,
...svelteConfig,
...prettierConfig,
];

View file

@ -9,7 +9,8 @@
"preview": "vite preview",
"prepare": "svelte-kit sync || echo ''",
"check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json",
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch"
"check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch",
"lint": "eslint ."
},
"devDependencies": {
"@sveltejs/adapter-auto": "^7.0.0",

View file

@ -0,0 +1,11 @@
// @ts-check
import { baseConfig, typescriptConfig, prettierConfig } from '@manacore/eslint-config';
export default [
{
ignores: ['dist/**', '.astro/**', 'node_modules/**'],
},
...baseConfig,
...typescriptConfig,
...prettierConfig,
];

View file

@ -0,0 +1,12 @@
// @ts-check
import { baseConfig, typescriptConfig, reactConfig, prettierConfig } from '@manacore/eslint-config';
export default [
{
ignores: ['dist/**', '.expo/**', 'node_modules/**', 'android/**', 'ios/**'],
},
...baseConfig,
...typescriptConfig,
...reactConfig,
...prettierConfig,
];

View file

@ -0,0 +1,11 @@
// @ts-check
import { baseConfig, typescriptConfig, prettierConfig } from '@manacore/eslint-config';
export default [
{
ignores: ['dist/**', '.astro/**', 'node_modules/**'],
},
...baseConfig,
...typescriptConfig,
...prettierConfig,
];

View file

@ -0,0 +1,17 @@
// @ts-check
import {
baseConfig,
typescriptConfig,
nestjsConfig,
prettierConfig,
} from '@manacore/eslint-config';
export default [
{
ignores: ['dist/**', 'node_modules/**'],
},
...baseConfig,
...typescriptConfig,
...nestjsConfig,
...prettierConfig,
];

View file

@ -0,0 +1,11 @@
// @ts-check
import { baseConfig, typescriptConfig, prettierConfig } from '@manacore/eslint-config';
export default [
{
ignores: ['dist/**', '.astro/**', 'node_modules/**'],
},
...baseConfig,
...typescriptConfig,
...prettierConfig,
];

View file

@ -0,0 +1,12 @@
// @ts-check
import { baseConfig, typescriptConfig, reactConfig, prettierConfig } from '@manacore/eslint-config';
export default [
{
ignores: ['dist/**', '.expo/**', 'node_modules/**', 'android/**', 'ios/**'],
},
...baseConfig,
...typescriptConfig,
...reactConfig,
...prettierConfig,
];

View file

@ -0,0 +1,17 @@
// @ts-check
import {
baseConfig,
typescriptConfig,
nestjsConfig,
prettierConfig,
} from '@manacore/eslint-config';
export default [
{
ignores: ['dist/**', 'node_modules/**'],
},
...baseConfig,
...typescriptConfig,
...nestjsConfig,
...prettierConfig,
];

View file

@ -0,0 +1,11 @@
// @ts-check
import { baseConfig, typescriptConfig, prettierConfig } from '@manacore/eslint-config';
export default [
{
ignores: ['dist/**', '.astro/**', 'node_modules/**'],
},
...baseConfig,
...typescriptConfig,
...prettierConfig,
];

View file

@ -1,15 +0,0 @@
/* eslint-env node */
const { defineConfig } = require('eslint/config');
const expoConfig = require('eslint-config-expo/flat');
module.exports = defineConfig([
expoConfig,
{
ignores: ['dist/*'],
},
{
rules: {
'react/display-name': 'off',
},
},
]);

View file

@ -0,0 +1,12 @@
// @ts-check
import { baseConfig, typescriptConfig, reactConfig, prettierConfig } from '@manacore/eslint-config';
export default [
{
ignores: ['dist/**', '.expo/**', 'node_modules/**', 'android/**', 'ios/**'],
},
...baseConfig,
...typescriptConfig,
...reactConfig,
...prettierConfig,
];

View file

@ -11,8 +11,8 @@
"build:preview": "eas build --profile preview",
"build:prod": "eas build --profile production",
"prebuild": "expo prebuild",
"lint": "eslint \"**/*.{js,jsx,ts,tsx}\" && prettier -c \"**/*.{js,jsx,ts,tsx,json}\"",
"format": "eslint \"**/*.{js,jsx,ts,tsx}\" --fix && prettier \"**/*.{js,jsx,ts,tsx,json}\" --write",
"lint": "eslint .",
"format": "eslint . --fix",
"type-check": "echo 'Skipping type-check: @picture/mobile needs theme system migration'",
"postinstall": "patch-package && ./scripts/build-workspace-deps.sh"
},

View file

@ -1,41 +1,17 @@
import prettier from 'eslint-config-prettier';
import { fileURLToPath } from 'node:url';
import { includeIgnoreFile } from '@eslint/compat';
import js from '@eslint/js';
import svelte from 'eslint-plugin-svelte';
import { defineConfig } from 'eslint/config';
import globals from 'globals';
import ts from 'typescript-eslint';
import svelteConfig from './svelte.config.js';
// @ts-check
import {
baseConfig,
typescriptConfig,
svelteConfig,
prettierConfig,
} from '@manacore/eslint-config';
const gitignorePath = fileURLToPath(new URL('./.gitignore', import.meta.url));
export default defineConfig(
includeIgnoreFile(gitignorePath),
js.configs.recommended,
...ts.configs.recommended,
...svelte.configs.recommended,
prettier,
...svelte.configs.prettier,
export default [
{
languageOptions: {
globals: { ...globals.browser, ...globals.node },
},
rules: {
// typescript-eslint strongly recommend that you do not use the no-undef lint rule on TypeScript projects.
// see: https://typescript-eslint.io/troubleshooting/faqs/eslint/#i-get-errors-from-the-no-undef-rule-about-global-variables-not-being-defined-even-though-there-are-no-typescript-errors
'no-undef': 'off',
},
ignores: ['dist/**', '.svelte-kit/**', 'node_modules/**'],
},
{
files: ['**/*.svelte', '**/*.svelte.ts', '**/*.svelte.js'],
languageOptions: {
parserOptions: {
projectService: true,
extraFileExtensions: ['.svelte'],
parser: ts.parser,
svelteConfig,
},
},
}
);
...baseConfig,
...typescriptConfig,
...svelteConfig,
...prettierConfig,
];

View file

@ -11,8 +11,6 @@
"build:mobile": "pnpm --filter @picture/mobile build:prod",
"build:web": "pnpm --filter @picture/web build",
"build:landing": "pnpm --filter @picture/landing build",
"lint": "pnpm run --recursive lint",
"type-check": "pnpm run --recursive type-check",
"clean": "pnpm run --recursive clean && rm -rf node_modules",
"android": "expo run:android",
"ios": "expo run:ios"

View file

@ -0,0 +1,17 @@
// @ts-check
import {
baseConfig,
typescriptConfig,
nestjsConfig,
prettierConfig,
} from '@manacore/eslint-config';
export default [
{
ignores: ['dist/**', 'node_modules/**'],
},
...baseConfig,
...typescriptConfig,
...nestjsConfig,
...prettierConfig,
];

View file

@ -2,7 +2,7 @@ import { drizzle, type PostgresJsDatabase } from 'drizzle-orm/postgres-js';
import * as schema from './schema';
// Use require for postgres to avoid ESM/CommonJS interop issues
// eslint-disable-next-line @typescript-eslint/no-var-requires
const postgres = require('postgres');
let connection: ReturnType<typeof postgres> | null = null;

View file

@ -1,4 +1,4 @@
import { Module, Global, OnModuleDestroy } from '@nestjs/common';
import { Module, Global, type OnModuleDestroy } from '@nestjs/common';
import { ConfigService } from '@nestjs/config';
import { getDb, closeConnection, type Database } from './connection';

View file

@ -1,7 +1,7 @@
import { Controller, Get, Post, Put, Delete, Body, Param, UseGuards } from '@nestjs/common';
import { DeckService } from './deck.service';
import { CreateDeckDto, UpdateDeckDto } from './deck.dto';
import { JwtAuthGuard, CurrentUser, CurrentUserData } from '@manacore/shared-nestjs-auth';
import { type DeckService } from './deck.service';
import { type CreateDeckDto, type UpdateDeckDto } from './deck.dto';
import { JwtAuthGuard, CurrentUser, type CurrentUserData } from '@manacore/shared-nestjs-auth';
@Controller('decks')
@UseGuards(JwtAuthGuard)

View file

@ -1,9 +1,9 @@
import { Injectable, Inject, NotFoundException, ForbiddenException } from '@nestjs/common';
import { Injectable, Inject, NotFoundException } from '@nestjs/common';
import { eq, and, desc } from 'drizzle-orm';
import { DATABASE_CONNECTION } from '../db/database.module';
import { type Database } from '../db/connection';
import { decks, slides } from '../db/schema';
import { CreateDeckDto, UpdateDeckDto } from './deck.dto';
import { type CreateDeckDto, type UpdateDeckDto } from './deck.dto';
@Injectable()
export class DeckService {

View file

@ -1,7 +1,7 @@
import { Controller, Get, Post, Delete, Body, Param, UseGuards } from '@nestjs/common';
import { ShareService } from './share.service';
import { CreateShareDto } from './share.dto';
import { JwtAuthGuard, CurrentUser, CurrentUserData } from '@manacore/shared-nestjs-auth';
import { type ShareService } from './share.service';
import { type CreateShareDto } from './share.dto';
import { JwtAuthGuard, CurrentUser, type CurrentUserData } from '@manacore/shared-nestjs-auth';
@Controller('share')
export class ShareController {

View file

@ -2,8 +2,8 @@ import { Injectable, Inject, NotFoundException, ForbiddenException } from '@nest
import { eq, and, gt, or, isNull } from 'drizzle-orm';
import { DATABASE_CONNECTION } from '../db/database.module';
import { type Database } from '../db/connection';
import { sharedDecks, decks, slides } from '../db/schema';
import { DeckService } from '../deck/deck.service';
import { sharedDecks, slides } from '../db/schema';
import { type DeckService } from '../deck/deck.service';
import { randomBytes } from 'crypto';
@Injectable()

View file

@ -1,7 +1,7 @@
import { Controller, Post, Put, Delete, Body, Param, UseGuards } from '@nestjs/common';
import { SlideService } from './slide.service';
import { CreateSlideDto, UpdateSlideDto, ReorderSlidesDto } from './slide.dto';
import { JwtAuthGuard, CurrentUser, CurrentUserData } from '@manacore/shared-nestjs-auth';
import { type SlideService } from './slide.service';
import { type CreateSlideDto, type UpdateSlideDto, type ReorderSlidesDto } from './slide.dto';
import { JwtAuthGuard, CurrentUser, type CurrentUserData } from '@manacore/shared-nestjs-auth';
@Controller()
@UseGuards(JwtAuthGuard)

View file

@ -1,10 +1,10 @@
import { Injectable, Inject, NotFoundException, ForbiddenException } from '@nestjs/common';
import { eq, and, max } from 'drizzle-orm';
import { eq, max } from 'drizzle-orm';
import { DATABASE_CONNECTION } from '../db/database.module';
import { type Database } from '../db/connection';
import { slides, decks } from '../db/schema';
import { DeckService } from '../deck/deck.service';
import { CreateSlideDto, UpdateSlideDto, ReorderSlidesDto } from './slide.dto';
import { type DeckService } from '../deck/deck.service';
import { type CreateSlideDto, type UpdateSlideDto, type ReorderSlidesDto } from './slide.dto';
@Injectable()
export class SlideService {

View file

@ -1,5 +1,5 @@
import { Controller, Get, Param } from '@nestjs/common';
import { ThemeService } from './theme.service';
import { type ThemeService } from './theme.service';
@Controller('themes')
export class ThemeController {

View file

@ -0,0 +1,11 @@
// @ts-check
import { baseConfig, typescriptConfig, prettierConfig } from '@manacore/eslint-config';
export default [
{
ignores: ['dist/**', '.astro/**', 'node_modules/**'],
},
...baseConfig,
...typescriptConfig,
...prettierConfig,
];

View file

@ -9,7 +9,8 @@
"build": "astro check && astro build",
"preview": "astro preview",
"astro": "astro",
"type-check": "astro check"
"type-check": "astro check",
"lint": "eslint ."
},
"dependencies": {
"@astrojs/check": "^0.9.0",

View file

@ -0,0 +1,12 @@
// @ts-check
import { baseConfig, typescriptConfig, reactConfig, prettierConfig } from '@manacore/eslint-config';
export default [
{
ignores: ['dist/**', '.expo/**', 'node_modules/**', 'android/**', 'ios/**'],
},
...baseConfig,
...typescriptConfig,
...reactConfig,
...prettierConfig,
];

Some files were not shown because too many files have changed in this diff Show more