import js from '@eslint/js'; import tseslint from '@typescript-eslint/eslint-plugin'; import tsparser from '@typescript-eslint/parser'; export default [ js.configs.recommended, { files: ['**/*.ts', '**/*.tsx'], languageOptions: { parser: tsparser, parserOptions: { ecmaVersion: 2022, sourceType: 'module', project: true, }, }, plugins: { '@typescript-eslint': tseslint, }, rules: { // TypeScript specific rules '@typescript-eslint/no-unused-vars': ['error', { argsIgnorePattern: '^_' }], '@typescript-eslint/explicit-function-return-type': 'off', '@typescript-eslint/explicit-module-boundary-types': 'off', '@typescript-eslint/no-explicit-any': 'warn', '@typescript-eslint/prefer-const': 'error', // General rules 'no-console': 'warn', 'no-debugger': 'error', 'prefer-const': 'error', 'no-var': 'error', // Import rules 'sort-imports': ['error', { ignoreDeclarationSort: true }], }, ignores: [ 'dist/**', 'node_modules/**', 'coverage/**', '*.config.js', '*.config.ts', ], }, ];