import { defineConfig } from 'eslint/config'
{{#if js}}
import jsConfig from 'eslint-config-lavy/js'
{{/if}}
{{#if ts}}
import tsConfig from 'eslint-config-lavy/ts'
{{/if}}
{{#if jsx}}
import jsxConfig from 'eslint-config-lavy/jsx'
{{/if}}
{{#if tsx}}
import tsxConfig from 'eslint-config-lavy/tsx'
{{/if}}
{{#if vue}}
import vueConfig from 'eslint-config-lavy/vue'
{{/if}}

export default defineConfig([
  // Global ignores
  {
    ignores: [
      '**/node_modules/**',
      '**/dist/**',
      '**/build/**',
      '**/coverage/**',
      '**/.next/**',
      '**/.nuxt/**',
      '**/.output/**',
      '**/*.min.js',
      '**/public/**',
      '**/vendor/**'
    ]
  },

  // Base configs
{{#if js}}
  ...jsConfig,
{{/if}}
{{#if ts}}
  ...tsConfig,
{{/if}}
{{#if jsx}}
  ...jsxConfig,
{{/if}}
{{#if tsx}}
  ...tsxConfig,
{{/if}}
{{#if vue}}
  ...vueConfig,
{{/if}}

  // Project-specific overrides
  {
{{#if ts}}
    {{#if tsx}}
    files: ['**/*.{ts,tsx}'],
    {{else}}
      {{#if vue}}
    files: ['**/*.{ts,vue}'],
      {{else}}
    files: ['**/*.ts'],
      {{/if}}
    {{/if}}
{{else}}
    {{#if jsx}}
    files: ['**/*.{js,jsx}'],
    {{else}}
      {{#if vue}}
    files: ['**/*.{js,vue}'],
      {{else}}
    files: ['**/*.js'],
      {{/if}}
    {{/if}}
{{/if}}
    rules: {
      // Add project-specific rules here
    }
  },

  // Test files - relaxed rules
  {
    files: ['**/*.test.{js,ts,tsx}', '**/*.spec.{js,ts,tsx}', '**/tests/**', '**/__tests__/**'],
    rules: {
      '@typescript-eslint/no-explicit-any': 'off',
      'no-console': 'off'
    }
  }
])