From 720d4dbbf848178cc6b2d200337d76e25bb28585 Mon Sep 17 00:00:00 2001 From: Hermann_Kitio Date: Fri, 17 Apr 2026 17:56:20 +0300 Subject: [PATCH] style(format): appliquer Prettier sur 6 fichiers du scaffold Sprint 0 Co-Authored-By: Claude Opus 4.7 (1M context) --- src/app/router.tsx | 5 +---- src/entities/user/__tests__/access.test.ts | 9 ++------- src/entities/user/__tests__/lib.test.ts | 2 +- src/index.css | 8 +++----- src/shared/config/env.ts | 4 +--- src/shared/lib/api-client.ts | 19 +++---------------- 6 files changed, 11 insertions(+), 36 deletions(-) diff --git a/src/app/router.tsx b/src/app/router.tsx index 9dcdd25..dfe0538 100644 --- a/src/app/router.tsx +++ b/src/app/router.tsx @@ -12,10 +12,7 @@ function ScaffoldPlaceholder() { return (

Expria — scaffold Sprint 0

-

- Aucune feature n'est encore branchée. Les routes seront ajoutées au fil - des sprints. -

+

Aucune feature n'est encore branchée. Les routes seront ajoutées au fil des sprints.

) } diff --git a/src/entities/user/__tests__/access.test.ts b/src/entities/user/__tests__/access.test.ts index f031c12..14d1855 100644 --- a/src/entities/user/__tests__/access.test.ts +++ b/src/entities/user/__tests__/access.test.ts @@ -10,12 +10,7 @@ */ import { describe, it, expect } from 'vitest' -import { - canUserSimulate, - checkFeatureAccess, - getPlanPermissions, - PLANS, -} from '../access' +import { canUserSimulate, checkFeatureAccess, getPlanPermissions, PLANS } from '../access' describe('canUserSimulate', () => { // Plan FREE — dans les limites @@ -174,7 +169,7 @@ describe('checkFeatureAccess', () => { }) describe('PLANS structure', () => { - it("les trois plans ont les mêmes clés", () => { + it('les trois plans ont les mêmes clés', () => { const freeKeys = Object.keys(PLANS.free).sort() const standardKeys = Object.keys(PLANS.standard).sort() const premiumKeys = Object.keys(PLANS.premium).sort() diff --git a/src/entities/user/__tests__/lib.test.ts b/src/entities/user/__tests__/lib.test.ts index 23f1d2a..4892365 100644 --- a/src/entities/user/__tests__/lib.test.ts +++ b/src/entities/user/__tests__/lib.test.ts @@ -63,7 +63,7 @@ describe('canSimulate (alias de canUserSimulate avec signature ergonomique)', () expect(result.reason).toBe('invalid_plan') }) - it("accepte bien la signature (plan, used) avec les bons arguments", () => { + it('accepte bien la signature (plan, used) avec les bons arguments', () => { // Vérifie que l'ordre des arguments est correct // (un inversement accidentel donnerait un plan='0' ce qui bloquerait tout) const result = canSimulate('premium', 100) diff --git a/src/index.css b/src/index.css index c4b94ee..3914fb6 100644 --- a/src/index.css +++ b/src/index.css @@ -1,4 +1,4 @@ -@import "tailwindcss"; +@import 'tailwindcss'; :root { --text: #6b6375; @@ -10,8 +10,7 @@ --accent-bg: rgba(170, 59, 255, 0.1); --accent-border: rgba(170, 59, 255, 0.5); --social-bg: rgba(244, 243, 236, 0.5); - --shadow: - rgba(0, 0, 0, 0.1) 0 10px 15px -3px, rgba(0, 0, 0, 0.05) 0 4px 6px -2px; + --shadow: rgba(0, 0, 0, 0.1) 0 10px 15px -3px, rgba(0, 0, 0, 0.05) 0 4px 6px -2px; --sans: system-ui, 'Segoe UI', Roboto, sans-serif; --heading: system-ui, 'Segoe UI', Roboto, sans-serif; @@ -43,8 +42,7 @@ --accent-bg: rgba(192, 132, 252, 0.15); --accent-border: rgba(192, 132, 252, 0.5); --social-bg: rgba(47, 48, 58, 0.5); - --shadow: - rgba(0, 0, 0, 0.4) 0 10px 15px -3px, rgba(0, 0, 0, 0.25) 0 4px 6px -2px; + --shadow: rgba(0, 0, 0, 0.4) 0 10px 15px -3px, rgba(0, 0, 0, 0.25) 0 4px 6px -2px; } #social .button-icon { diff --git a/src/shared/config/env.ts b/src/shared/config/env.ts index 573abff..bae1c42 100644 --- a/src/shared/config/env.ts +++ b/src/shared/config/env.ts @@ -11,9 +11,7 @@ const envSchema = z.object({ const parsed = envSchema.safeParse(import.meta.env) if (!parsed.success) { - const issues = parsed.error.issues - .map((i) => ` - ${i.path.join('.')}: ${i.message}`) - .join('\n') + const issues = parsed.error.issues.map((i) => ` - ${i.path.join('.')}: ${i.message}`).join('\n') throw new Error( `Variables d'environnement invalides ou manquantes :\n${issues}\n\nVérifier .env.example`, ) diff --git a/src/shared/lib/api-client.ts b/src/shared/lib/api-client.ts index aeb410b..05edd8f 100644 --- a/src/shared/lib/api-client.ts +++ b/src/shared/lib/api-client.ts @@ -1,10 +1,5 @@ import { env } from '@/shared/config/env' -import type { - ApiError, - ClientError, - FetchError, - FrontendErrorCode, -} from '@/shared/types/api' +import type { ApiError, ClientError, FetchError, FrontendErrorCode } from '@/shared/types/api' import { getAccessToken } from './auth-client' import { logger } from './logger' @@ -21,10 +16,7 @@ export interface ApiFetchOptions { retry?: { max: number; baseDelayMs: number } } -export async function apiFetch( - path: string, - options: ApiFetchOptions = {}, -): Promise { +export async function apiFetch(path: string, options: ApiFetchOptions = {}): Promise { const method = (options.method ?? 'GET').toUpperCase() const timeoutMs = options.timeoutMs ?? DEFAULT_TIMEOUT_MS const retry = @@ -144,12 +136,7 @@ function isFetchError(err: unknown): err is FetchError { async function parseApiError(response: Response): Promise { try { const body = await response.json() - if ( - body && - typeof body === 'object' && - body.error === true && - typeof body.code === 'string' - ) { + if (body && typeof body === 'object' && body.error === true && typeof body.code === 'string') { return body as ApiError } } catch {