30 lines
720 B
TypeScript
30 lines
720 B
TypeScript
import { dirname } from 'path';
|
|
import { fileURLToPath } from 'url';
|
|
import { FlatCompat } from '@eslint/eslintrc';
|
|
|
|
const __filename = fileURLToPath(import.meta.url);
|
|
const __dirname = dirname(__filename);
|
|
|
|
const compat = new FlatCompat({
|
|
baseDirectory: __dirname,
|
|
recommendedConfig: {
|
|
plugins: [],
|
|
rules: {},
|
|
},
|
|
});
|
|
|
|
const eslintConfig = [
|
|
...compat.extends('next/typescript', 'eslint:recommended', 'plugin:@typescript-eslint/recommended', 'prettier'),
|
|
{
|
|
ignores: ['coverage/**', 'node_modules/**', '.next/**', 'out/**', 'build/**', 'next-env.d.ts'],
|
|
},
|
|
{
|
|
files: ['**/*.{js,jsx,ts,tsx}'],
|
|
rules: {
|
|
// Add any API-specific rules here
|
|
},
|
|
},
|
|
];
|
|
|
|
export default eslintConfig;
|