// ESLint-Konfiguration der Syncova-Weboberflaeche. import js from '@eslint/js'; import globals from 'globals'; import typescriptEslint from 'typescript-eslint'; import reactHooks from 'eslint-plugin-react-hooks'; export default typescriptEslint.config( // Gebaute Artefakte werden nicht geprueft. { ignores: ['dist', 'node_modules', 'coverage'] }, js.configs.recommended, ...typescriptEslint.configs.recommended, { files: ['**/*.{ts,tsx}'], languageOptions: { ecmaVersion: 2022, globals: { ...globals.browser, ...globals.es2022 }, }, plugins: { 'react-hooks': reactHooks, }, rules: { ...reactHooks.configs.recommended.rules, // Unbenutzte Bezeichner deuten auf unfertigen Code hin. // Ein fuehrender Unterstrich kennzeichnet eine bewusst ignorierte Variable. '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }], // console.log gehoert nicht in ausgelieferten Code; Warnungen und Fehler schon. 'no-console': ['error', { allow: ['warn', 'error'] }], // Ein stillschweigend verschluckter Fehler widerspricht PROMPT.md ยง140. 'no-empty': ['error', { allowEmptyCatch: false }], }, }, { // In Tests sind Vitest-Globals verfuegbar. files: ['**/*.test.{ts,tsx}', 'src/test/**/*.ts'], languageOptions: { globals: { ...globals.browser, ...globals.node }, }, }, );