Files
maternal-app/maternal-app/maternal-app-backend/eslint.config.mjs
Andrei 0531573d3f chore: Migrate ESLint to v9 flat config format
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
2025-10-02 15:49:58 +00:00

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
},
},
];