import js from "@eslint/js"; import eslintPluginPrettier from "eslint-plugin-prettier/recommended"; import globals from "globals"; import reactHooks from "eslint-plugin-react-hooks"; import reactRefresh from "eslint-plugin-react-refresh"; import tseslint from "typescript-eslint"; export default tseslint.config( { ignores: [ "node_modules", "frontend/dist", "backend/.tmp", "storage", "frontend/src/routeTree.gen.ts", "package-lock.json", ], }, { extends: [js.configs.recommended], files: ["backend/src/**/*.js", "scripts/**/*.js"], languageOptions: { ecmaVersion: 2022, sourceType: "module", globals: globals.node, }, rules: { "no-unused-vars": ["warn", { argsIgnorePattern: "^_" }], }, }, { extends: [js.configs.recommended, ...tseslint.configs.recommended], files: ["frontend/src/**/*.{ts,tsx}", "frontend/vite.config.ts"], languageOptions: { ecmaVersion: 2022, globals: globals.browser, }, plugins: { "react-hooks": reactHooks, "react-refresh": reactRefresh, }, rules: { ...reactHooks.configs.recommended.rules, "react-refresh/only-export-components": "off", "@typescript-eslint/no-unused-vars": ["warn", { argsIgnorePattern: "^_" }], }, }, eslintPluginPrettier, );