Skip to content
File

Blob: eslint.config.js

javascript42 lines
1import js from "@eslint/js";
2import { defineConfig } from "eslint/config";
3import reactHooks from "eslint-plugin-react-hooks";
4import reactRefresh from "eslint-plugin-react-refresh";
5import globals from "globals";
6import tseslint from "typescript-eslint";
7 
8export 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);