import js from '@eslint/js'; import tseslint from 'typescript-eslint'; export default tseslint.config( js.configs.recommended, ...tseslint.configs.recommended, { files: ['src/**/*.ts'], languageOptions: { parserOptions: { project: './tsconfig.json', }, }, rules: { // TypeScript-specific rules '@typescript-eslint/no-unused-vars': ['warn', { argsIgnorePattern: '^_', varsIgnorePattern: '^_', }], '@typescript-eslint/no-explicit-any': 'warn', '@typescript-eslint/explicit-function-return-type': 'off', '@typescript-eslint/no-non-null-assertion': 'warn', // General rules 'no-console': 'off', // Allow console for CLI tool 'prefer-const': 'error', 'no-var': 'error', 'eqeqeq': ['error', 'always'], 'curly': ['warn', 'multi-line'], // Allow single-line if without braces }, }, { ignores: ['dist/**', 'node_modules/**', '*.js', '*.mjs'], } );