anchorage_layer_simple/features/userwallet-eslint-fix.md
ncantu c3c11f0ef0 Update userwallet components, services and documentation
**Motivations:**
- Add new features and fixes for userwallet application
- Update documentation for pairing, login state machine, and sync
- Add new utilities for bloom filters, nonce store, and contract versioning
- Fix mempool websocket offline issues

**Root causes:**
- N/A (feature additions and improvements)

**Correctifs:**
- Fix mempool websocket offline handling
- Update ESLint configuration

**Evolutions:**
- Add login state machine service and hook
- Add sync loop service
- Add bloom filter utilities for anti-replay and state visibility
- Add nonce store and contract version utilities
- Update pairing confirmation and graph resolver services
- Add new documentation for features and fixes
- Update userwallet components (LoginScreen, SyncScreen)
- Update types for contract, identity, and messages

**Pages affectées:**
- userwallet/src/components/LoginScreen.tsx
- userwallet/src/components/SyncScreen.tsx
- userwallet/src/hooks/useChannel.ts
- userwallet/src/hooks/useLoginStateMachine.ts (new)
- userwallet/src/services/graphResolver.ts
- userwallet/src/services/pairingConfirm.ts
- userwallet/src/services/syncService.ts
- userwallet/src/services/syncLoop.ts (new)
- userwallet/src/services/loginStateMachine.ts (new)
- userwallet/src/types/contract.ts
- userwallet/src/types/identity.ts
- userwallet/src/types/message.ts
- userwallet/src/utils/canonical.ts
- userwallet/src/utils/identity.ts
- userwallet/src/utils/indexedDbStorage.ts
- userwallet/src/utils/relay.ts
- userwallet/src/utils/verification.ts
- userwallet/src/utils/bloom.ts (new)
- userwallet/src/utils/contractVersion.ts (new)
- userwallet/src/utils/nonceStore.ts (new)
- userwallet/eslint.config.mjs
- userwallet/package.json
- userwallet/package-lock.json
- userwallet/docs/synthese.md
- userwallet/docs/specs-champs-obligatoires-cnil.md (new)
- api-relay/README.md
- features/userwallet-pairing-words-only-finalise.md
- features/userwallet-anti-rejeu-etats-visibles-bloom.md (new)
- features/userwallet-bloom-usage-sync.md (new)
- features/userwallet-contrat-login-reste-a-faire.md (new)
- features/userwallet-ecrans-login-a-valider.md (new)
- features/userwallet-eslint-fix.md (new)
- features/userwallet-login-state-machine.md (new)
- features/userwallet-validation-conformite.md (new)
- fixKnowledge/mempool-websocket-offline-fix.md (new)
- mempool (submodule)
- hash_list.txt
- hash_list_cache.txt
2026-01-26 14:00:32 +01:00

13 lines
1.3 KiB
Markdown
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.

# Userwallet Correction ESLint (config + script)
**Objectif :** Faire fonctionner `npm run lint` : résoudre `ERR_MODULE_NOT_FOUND` pour `typescript-eslint`, activer le type-aware linting, et adapter le script lint à la flat config.
**Modifications :**
- **package.json** : ajout de la dépendance `typescript-eslint` ; script `lint` simplifié (`eslint . --report-unused-disable-directives --max-warnings 0`, suppression de `--ext ts,tsx`).
- **eslint.config.mjs** : `import.meta.url` + `fileURLToPath` pour `__dirname` ; `parserOptions.project: ['./tsconfig.json', './tsconfig.node.json']` et `tsconfigRootDir: __dirname` pour les règles type-aware (`prefer-nullish-coalescing`, etc.).
- **Correctifs annexes** : `canonical.ts` et `verification.ts` — variables volontairement non utilisées préfixées par `_` ; `indexedDbStorage.ts` — types de retour explicites sur les callbacks IndexedDB ; `contract.ts` — interfaces vides `Contrat` et `ActionLogin` remplacées par des type aliases.
**Impacts :** `npm run lint` sexécute. Il reste environ 95 erreurs de lint (max-lines, max-lines-per-function, complexity, max-params, no-non-null-assertion, etc.) à traiter au fil de leau par refactoring.
**Modalités danalyse :** Lancer `npm run lint` et `npm run type-check` ; vérifier quaucune régression nest introduite.