mirror of
https://github.com/siop-spelev/siop2.git
synced 2026-08-08 12:41:54 +00:00
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>
57 lines
1.6 KiB
JavaScript
57 lines
1.6 KiB
JavaScript
// 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 l’interface 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',
|
||
},
|
||
},
|
||
);
|