File
Blob: eslint.config.js
| 1 | import js from "@eslint/js"; |
| 2 | import reactHooks from "eslint-plugin-react-hooks"; |
| 3 | import reactRefresh from "eslint-plugin-react-refresh"; |
| 4 | import globals from "globals"; |
| 5 | import tseslint from "typescript-eslint"; |
| 6 | |
| 7 | export default tseslint.config( |
| 8 | { |
| 9 | ignores: ["dist/**", ".wrangler/**", "drizzle/**", "worker-configuration.d.ts", "src/client/lib/openapi-types.ts"], |
| 10 | }, |
| 11 | { |
| 12 | files: ["src/client/**/*.{ts,tsx}"], |
| 13 | extends: [js.configs.recommended, ...tseslint.configs.recommended, reactHooks.configs.flat["recommended-latest"]], |
| 14 | languageOptions: { |
| 15 | ecmaVersion: "latest", |
| 16 | globals: globals.browser, |
| 17 | }, |
| 18 | rules: { |
| 19 | // tsconfig.client.json's noUnusedLocals/noUnusedParameters are authoritative. |
| 20 | "no-unused-vars": "off", |
| 21 | "@typescript-eslint/no-unused-vars": "off", |
| 22 | "react-hooks/refs": "error", |
| 23 | }, |
| 24 | }, |
| 25 | { |
| 26 | files: ["src/client/**/*.tsx"], |
| 27 | ...reactRefresh.configs.vite, |
| 28 | }, |
| 29 | ); |