import { defineConfig, globalIgnores } from 'eslint/config'; import nextVitals from 'eslint-config-next/core-web-vitals'; import nextTs from 'eslint-config-next/typescript'; const eslintConfig = defineConfig([ ...nextVitals, ...nextTs, // Override default ignores of eslint-config-next. globalIgnores([ // Default ignores of eslint-config-next: '.next/**', 'out/**', 'build/**', 'next-env.d.ts' ]), { rules: { // Diese Regeln sind heilig und dürfen NIE verändert werden. // Andernfalls droht der Tod durch Amboss. 'semi': [ 'error', 'always' ], 'quotes': [ 'error', 'single' ], 'jsx-quotes': [ 'error', 'prefer-double' ], 'comma-dangle': [ 'error', 'never' ], 'brace-style': [ 'error', '1tbs', { allowSingleLine: true } ], 'object-curly-spacing': [ 'error', 'always' ], 'array-bracket-spacing': [ 'error', 'always' ], 'comma-spacing': [ 'error', { before: false, after: true } ], 'id-length': [ 'error', { min: 2, exceptions: [ '_', 'x', 'y', 't' ] } ], 'indent': [ 'error', 'tab', { SwitchCase: 1, flatTernaryExpressions: true } ], 'camelcase': [ 'error', { properties: 'always', ignoreDestructuring: true } ], 'eqeqeq': [ 'error', 'always' ], 'yoda': 'error', 'no-unused-vars': 'off', 'no-console': 'warn', 'no-debugger': 'warn', '@typescript-eslint/no-unused-vars': [ 'warn', { args: 'all', argsIgnorePattern: '^_', destructuredArrayIgnorePattern: '^_' } ], 'no-useless-assignment': [ 'warn' ] } } ]); export default eslintConfig;