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',
|
'navigator': 'readonly',
|
||||||
'crypto': 'readonly',
|
'crypto': 'readonly',
|
||||||
'setTimeout': 'readonly',
|
'setTimeout': 'readonly',
|
||||||
|
'clearTimeout': 'readonly',
|
||||||
|
'setInterval': 'readonly',
|
||||||
|
'clearInterval': 'readonly',
|
||||||
'alert': 'readonly',
|
'alert': 'readonly',
|
||||||
'confirm': 'readonly',
|
'confirm': 'readonly',
|
||||||
'prompt': 'readonly',
|
'prompt': 'readonly',
|
||||||
@ -27,9 +30,20 @@ export default [
|
|||||||
'localStorage': 'readonly',
|
'localStorage': 'readonly',
|
||||||
'sessionStorage': 'readonly',
|
'sessionStorage': 'readonly',
|
||||||
'indexedDB': 'readonly',
|
'indexedDB': 'readonly',
|
||||||
|
'IDBDatabase': 'readonly',
|
||||||
|
'IDBTransaction': 'readonly',
|
||||||
|
'IDBObjectStore': 'readonly',
|
||||||
|
'IDBRequest': 'readonly',
|
||||||
'customElements': 'readonly',
|
'customElements': 'readonly',
|
||||||
'requestAnimationFrame': 'readonly',
|
'requestAnimationFrame': 'readonly',
|
||||||
'setInterval': 'readonly'
|
'cancelAnimationFrame': 'readonly',
|
||||||
|
'performance': 'readonly',
|
||||||
|
'WebAssembly': 'readonly',
|
||||||
|
'btoa': 'readonly',
|
||||||
|
'atob': 'readonly',
|
||||||
|
'self': 'readonly',
|
||||||
|
'SharedWorker': 'readonly',
|
||||||
|
'Worker': 'readonly'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
plugins: {
|
plugins: {
|
||||||
@ -74,13 +88,35 @@ export default [
|
|||||||
'no-await-in-loop': 'off' // Permettre await dans les boucles pour l'instant
|
'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: [
|
ignores: [
|
||||||
'dist/',
|
'dist/',
|
||||||
'node_modules/',
|
'node_modules/',
|
||||||
'*.js',
|
'*.js',
|
||||||
|
'!eslint.config.js',
|
||||||
'pkg/',
|
'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