eslint.config.js•909 B
import js from '@eslint/js';
import tseslint from 'typescript-eslint';
import prettier from 'eslint-config-prettier';
export default tseslint.config(
js.configs.recommended,
...tseslint.configs.recommended,
prettier,
{
files: ['**/*.ts', '**/*.tsx'],
languageOptions: {
ecmaVersion: 2022,
sourceType: 'module',
},
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',
},
},
{
files: ['tests/**/*.ts', '**/*.test.ts', '**/*.spec.ts'],
rules: {
// Allow any for test utilities and mocks
'@typescript-eslint/no-explicit-any': 'off',
},
},
{
ignores: ['dist/**', 'node_modules/**'],
}
);