import js from "@eslint/js"; import { defineConfig } from "eslint/config"; import reactHooks from "eslint-plugin-react-hooks"; import reactRefresh from "eslint-plugin-react-refresh"; import globals from "globals"; import tseslint from "typescript-eslint"; export default defineConfig( { ignores: ["dist/**", ".wrangler/**", "drizzle/d1/**", "worker-configuration.d.ts"], }, js.configs.recommended, ...tseslint.configs.recommended, { files: ["**/*.{ts,tsx}"], languageOptions: { ecmaVersion: "latest", sourceType: "module", globals: { ...globals.browser, ...globals.worker, ...globals.node, ...globals.es2023, }, }, rules: { "no-undef": "off", }, }, { files: ["src/client/**/*.{ts,tsx}"], plugins: { "react-hooks": reactHooks, }, rules: reactHooks.configs["recommended-latest"].rules, }, { files: ["src/client/**/*.tsx"], ...reactRefresh.configs.vite, }, );