import js from '@eslint/js';
import globals from 'globals';
import tseslint from 'typescript-eslint';
import { defineConfig } from 'eslint/config';
import prettier from "eslint-config-prettier";

export default defineConfig([
  {
    files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'],
    plugins: { js },
    extends: ['js/recommended'],
  },
  {
    files: ['**/*.{js,mjs,cjs,ts,jsx,tsx}'],
    languageOptions: { globals: globals.browser },
  },
  tseslint.configs.recommended,
  {
    rules: {
      ...prettier.rules,
      "eqeqeq": "error",
      "no-console": "error",
      "@typescript-eslint/no-unused-vars": "warn"
    }
  }
  // pluginReact.configs.flat.recommended,
]);
