import globals from "globals"
import pluginJs from "@eslint/js"
import tseslint from "typescript-eslint"
import pluginReact from "eslint-plugin-react"

export default [
  // Base configuration
  {
    files: ["src/**/*.{js,ts}"],
    ignores: ["node_modules/**", "dist/**", "*.config.{js,mjs}", "eslint.config.mjs", "test-*.js"],
    languageOptions: {
      globals: {
        ...globals.browser,
        ...globals.node,
      },
      parser: tseslint.parser,
      parserOptions: {
        project: ["./tsconfig.json"],
        tsconfigRootDir: import.meta.dirname,
      },
    },
    plugins: {
      "@typescript-eslint": tseslint.plugin,
    },
  },

  // Apply recommended configs
  ...tseslint.configs.recommended,
]
