feat: add formidable ESLint + Prettier linting setup
Some checks failed
Build and Push Backend Image / build (push) Successful in 47s
Build and Push Frontend Image / build (push) Has been cancelled

- Root-level eslint.config.js (flat config): typescript-eslint,
  eslint-plugin-svelte, eslint-config-prettier, @eslint/js
- Root-level prettier.config.js with prettier-plugin-svelte
- svelte-check added to frontend for Svelte/TS type checking
- lint, lint:fix, format, format:check, check scripts in root
  and both packages
- All 60 lint errors fixed across backend and frontend:
  - Consistent type imports
  - Removed unused imports/variables
  - Added keys to all {#each} blocks for Svelte performance
  - Replaced mutable Set/Map with SvelteSet/SvelteMap
  - Fixed useless assignments and empty catch blocks
- 64 remaining warnings are intentional any usages in the
  Pothos/Drizzle GraphQL resolver layer

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-04 22:24:55 +01:00
parent 741e0c3387
commit 18116072c9
43 changed files with 1023 additions and 5048 deletions

View File

@@ -1,5 +1,6 @@
<script lang="ts">
import { _ } from "svelte-i18n";
import { SvelteSet } from "svelte/reactivity";
import {
Card,
CardContent,
@@ -12,7 +13,7 @@ import PeonyBackground from "$lib/components/background/peony-background.svelte"
import Meta from "$lib/components/meta/meta.svelte";
let searchQuery = $state("");
let expandedItems = $state<Set<number>>(new Set());
let expandedItems = new SvelteSet<number>();
const faqCategories = [
{
@@ -171,7 +172,7 @@ const filteredQuestions = $derived(() => {
});
function toggleExpanded(id: number) {
const newExpanded = new Set(expandedItems);
const newExpanded = new SvelteSet(expandedItems);
if (newExpanded.has(id)) {
newExpanded.delete(id);
} else {
@@ -224,7 +225,7 @@ function toggleExpanded(id: number) {
})}
</h2>
<div class="space-y-4">
{#each filteredQuestions() as question}
{#each filteredQuestions() as question (question.id)}
<Card
class="bg-gradient-to-br from-card/90 via-card/95 to-card/85 backdrop-blur-xl shadow-lg shadow-primary/10"
>
@@ -273,7 +274,7 @@ function toggleExpanded(id: number) {
<!-- Category View -->
<div class="max-w-6xl mx-auto">
<div class="grid grid-cols-1 lg:grid-cols-2 gap-8">
{#each faqCategories as category}
{#each faqCategories as category (category.id)}
<Card
class="bg-gradient-to-br from-card/90 via-card/95 to-card/85 backdrop-blur-xl shadow-lg shadow-primary/10"
>
@@ -290,7 +291,7 @@ function toggleExpanded(id: number) {
</CardHeader>
<CardContent class="pt-0">
<div class="space-y-3">
{#each category.questions as question}
{#each category.questions as question (question.id)}
<div
class="border border-border/50 rounded-lg overflow-hidden"
>