chore: clean up and improve ESLint configuration
**Motivations :** - Le projet a déjà ESLint mais la configuration était mixte (ancien et nouveau format) - Améliorer la configuration pour gérer les Web Workers et les globals manquants - Supprimer les fichiers de configuration obsolètes **Modifications :** - Supprimer .eslintrc.json (ancien format, ignoré par ESLint 9) - Supprimer .eslintignore (remplacé par ignores dans eslint.config.js) - Améliorer eslint.config.js avec les globals nécessaires (Web Workers, IndexedDB, etc.) - Ajouter une configuration spécifique pour les fichiers worker.ts - Les ignores sont maintenant centralisés dans eslint.config.js **Pages affectées :** - eslint.config.js (amélioration de la configuration) - Suppression de .eslintrc.json et .eslintignore
This commit is contained in:
parent
102ee331db
commit
64476b639c
@ -20,6 +20,9 @@ export default [
|
||||
'navigator': 'readonly',
|
||||
'crypto': 'readonly',
|
||||
'setTimeout': 'readonly',
|
||||
'clearTimeout': 'readonly',
|
||||
'setInterval': 'readonly',
|
||||
'clearInterval': 'readonly',
|
||||
'alert': 'readonly',
|
||||
'confirm': 'readonly',
|
||||
'prompt': 'readonly',
|
||||
@ -27,9 +30,20 @@ export default [
|
||||
'localStorage': 'readonly',
|
||||
'sessionStorage': 'readonly',
|
||||
'indexedDB': 'readonly',
|
||||
'IDBDatabase': 'readonly',
|
||||
'IDBTransaction': 'readonly',
|
||||
'IDBObjectStore': 'readonly',
|
||||
'IDBRequest': 'readonly',
|
||||
'customElements': 'readonly',
|
||||
'requestAnimationFrame': 'readonly',
|
||||
'setInterval': 'readonly'
|
||||
'cancelAnimationFrame': 'readonly',
|
||||
'performance': 'readonly',
|
||||
'WebAssembly': 'readonly',
|
||||
'btoa': 'readonly',
|
||||
'atob': 'readonly',
|
||||
'self': 'readonly',
|
||||
'SharedWorker': 'readonly',
|
||||
'Worker': 'readonly'
|
||||
}
|
||||
},
|
||||
plugins: {
|
||||
@ -74,13 +88,35 @@ export default [
|
||||
'no-await-in-loop': 'off' // Permettre await dans les boucles pour l'instant
|
||||
}
|
||||
},
|
||||
{
|
||||
files: ['**/*.worker.ts', '**/*.worker.js'],
|
||||
languageOptions: {
|
||||
globals: {
|
||||
'self': 'readonly',
|
||||
'postMessage': 'readonly',
|
||||
'onmessage': 'readonly',
|
||||
'importScripts': 'readonly',
|
||||
'btoa': 'readonly',
|
||||
'atob': 'readonly',
|
||||
'crypto': 'readonly',
|
||||
'console': 'readonly'
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
ignores: [
|
||||
'dist/',
|
||||
'node_modules/',
|
||||
'*.js',
|
||||
'!eslint.config.js',
|
||||
'pkg/',
|
||||
'vite.config.ts'
|
||||
'vite.config.ts',
|
||||
'test-browser/',
|
||||
'logs/',
|
||||
'coverage/',
|
||||
'.nyc_output/',
|
||||
'**/*.test.ts',
|
||||
'**/*.spec.ts'
|
||||
]
|
||||
}
|
||||
];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user