Files
siop2/eslint.config.mjs
pr-daaif 5c8d5aac92 feat(r4.1): socle mobile Expo — connexion démo, Ma journée, lecture hors-ligne
apps/mobile (Expo SDK 57, TS strict, workspace pnpm) : connexion
e-mail/mdp + sélecteur démo ADR-002 (uniquement si l'API l'expose),
tabbar de la maquette validée (onglets futurs marqués R4.2/R4.3),
« Ma journée » triée priorité puis échéance (fonction pure testée),
urgence en tête, pastille de synchro.

D1 en actes (lecture) : cache TanStack persisté dans AsyncStorage
(7 jours), NetInfo → onlineManager + bandeau hors-ligne horodaté ;
jeton en SecureStore ; tokens light/dark répliqués et testés ; client
typé régénéré depuis docs/openapi.json (règle d'or).

API : CORS_ORIGINS opt-in (vide par défaut) — Expo web/debug seulement,
le web de prod reste derrière le proxy, les apps natives n'ont pas
d'Origin.

Vérifié 10/10 en Expo web piloté (connexion démo Ahmed → Ma journée
scopée → hors-ligne servie du cache → retour) ; 6 tests jest-expo ;
lint racine étendu (react-hooks) ; job CI mobile, deploy en dépend.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-17 03:12:34 +01:00

57 lines
1.6 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// ESLint (R0.12) — config unique du monorepo (flat config, ESLint 9).
// Porte notamment la règle d'architecture ADR-001 : le SDK MinIO ne
// s'importe QUE dans l'implémentation de FileStorage.
import eslint from '@eslint/js';
import reactHooks from 'eslint-plugin-react-hooks';
import tseslint from 'typescript-eslint';
export default tseslint.config(
{
ignores: [
'**/dist/**',
'**/node_modules/**',
'**/*.d.ts',
'**/coverage/**',
'docs/**',
'**/*.config.{js,mjs,ts}',
'apps/api/jest.config.js',
],
},
eslint.configs.recommended,
...tseslint.configs.recommended,
{
rules: {
'@typescript-eslint/no-unused-vars': [
'error',
{ argsIgnorePattern: '^_', varsIgnorePattern: '^_' },
],
// ADR-001 : MinIO derrière l'interface FileStorage, jamais en direct
'no-restricted-imports': [
'error',
{
paths: [
{
name: 'minio',
message:
'Import direct du SDK MinIO interdit (ADR-001) : passez par linterface FileStorage (apps/api/src/files).',
},
],
},
],
},
},
{
// Seul fichier autorisé : l'implémentation MinIO de FileStorage
files: ['apps/api/src/files/minio-storage.service.ts'],
rules: { 'no-restricted-imports': 'off' },
},
{
files: ['apps/web/**/*.{ts,tsx}', 'apps/mobile/**/*.{ts,tsx}'],
plugins: { 'react-hooks': reactHooks },
rules: {
'react-hooks/rules-of-hooks': 'error',
'react-hooks/exhaustive-deps': 'error',
},
},
);