mirror of
https://github.com/siop-spelev/siop2.git
synced 2026-08-08 12:41:54 +00:00
test(r0.12): ESLint monorepo + parcours démo Playwright — R0.12 clos
- ESLint 10 flat config racine (typescript-eslint, react-hooks) ; règle ADR-001 codée : no-restricted-imports interdit « minio » partout sauf minio-storage.service.ts (violation vérifiée) ; jobs lint par paquet - Playwright apps/web/e2e : redirection sans jeton, connexion démo 1 clic, coquille (rail actif, chip DÉMO), bascule de rôle chronométrée < 3 s (ADR-002), /design, déconnexion avec purge ; webServer api dist + vite, seed idempotent en globalSetup, PW_CHANNEL=chrome en local - CI : jobs lint + e2e (services PostgreSQL/Redis, artefact playwright-report sur échec) ; vitest restreint à src/ Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
56
eslint.config.mjs
Normal file
56
eslint.config.mjs
Normal file
@@ -0,0 +1,56 @@
|
||||
// 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}'],
|
||||
plugins: { 'react-hooks': reactHooks },
|
||||
rules: {
|
||||
'react-hooks/rules-of-hooks': 'error',
|
||||
'react-hooks/exhaustive-deps': 'error',
|
||||
},
|
||||
},
|
||||
);
|
||||
Reference in New Issue
Block a user