File
Blob: eslint.config.js
| 1 | import js from "@eslint/js"; |
| 2 | import { defineConfig } from "eslint/config"; |
| 3 | import reactHooks from "eslint-plugin-react-hooks"; |
| 4 | import reactRefresh from "eslint-plugin-react-refresh"; |
| 5 | import globals from "globals"; |
| 6 | import tseslint from "typescript-eslint"; |
| 7 | |
| 8 | export default defineConfig( |
| 9 | { |
| 10 | ignores: ["dist/**", ".wrangler/**", "drizzle/d1/**", "worker-configuration.d.ts"], |
| 11 | }, |
| 12 | js.configs.recommended, |
| 13 | ...tseslint.configs.recommended, |
| 14 | { |
| 15 | files: ["**/*.{ts,tsx}"], |
| 16 | languageOptions: { |
| 17 | ecmaVersion: "latest", |
| 18 | sourceType: "module", |
| 19 | globals: { |
| 20 | ...globals.browser, |
| 21 | ...globals.worker, |
| 22 | ...globals.node, |
| 23 | ...globals.es2023, |
| 24 | }, |
| 25 | }, |
| 26 | rules: { |
| 27 | "no-undef": "off", |
| 28 | }, |
| 29 | }, |
| 30 | { |
| 31 | files: ["src/client/**/*.{ts,tsx}"], |
| 32 | plugins: { |
| 33 | "react-hooks": reactHooks, |
| 34 | }, |
| 35 | rules: reactHooks.configs["recommended-latest"].rules, |
| 36 | }, |
| 37 | { |
| 38 | files: ["src/client/**/*.tsx"], |
| 39 | ...reactRefresh.configs.vite, |
| 40 | }, |
| 41 | ); |