Created new eslint.config.mjs with flat config:
- Migrated from .eslintrc.js to eslint.config.mjs
- Added globals package for Node.js and Jest globals
- Configured TypeScript parser and plugins
- Maintained all existing rules and Prettier integration
ESLint now running successfully with v9 flat config.
Note: 39 unused variable warnings found - these are minor code
quality issues that can be addressed in a separate cleanup PR.
🤖 Generated with Claude Code
43 lines
1.2 KiB
JavaScript
43 lines
1.2 KiB
JavaScript
import eslint from '@eslint/js';
|
|
import tseslint from '@typescript-eslint/eslint-plugin';
|
|
import tsparser from '@typescript-eslint/parser';
|
|
import prettier from 'eslint-plugin-prettier';
|
|
import prettierConfig from 'eslint-config-prettier';
|
|
import globals from 'globals';
|
|
|
|
export default [
|
|
{
|
|
ignores: ['dist/**', 'node_modules/**', 'coverage/**', '.eslintrc.js'],
|
|
},
|
|
eslint.configs.recommended,
|
|
{
|
|
files: ['**/*.ts'],
|
|
languageOptions: {
|
|
parser: tsparser,
|
|
parserOptions: {
|
|
project: './tsconfig.json',
|
|
tsconfigRootDir: import.meta.dirname,
|
|
sourceType: 'module',
|
|
},
|
|
globals: {
|
|
...globals.node,
|
|
...globals.jest,
|
|
},
|
|
},
|
|
plugins: {
|
|
'@typescript-eslint': tseslint,
|
|
prettier: prettier,
|
|
},
|
|
rules: {
|
|
...tseslint.configs.recommended.rules,
|
|
...prettierConfig.rules,
|
|
'@typescript-eslint/interface-name-prefix': 'off',
|
|
'@typescript-eslint/explicit-function-return-type': 'off',
|
|
'@typescript-eslint/explicit-module-boundary-types': 'off',
|
|
'@typescript-eslint/no-explicit-any': 'off',
|
|
'prettier/prettier': 'error',
|
|
'no-undef': 'off', // TypeScript handles this
|
|
},
|
|
},
|
|
];
|