| philip.zeyliger | 26bc659 | 2025-06-30 20:15:30 -0700 | [diff] [blame] | 1 | import eslint from "@eslint/js"; |
| 2 | import tseslint from "typescript-eslint"; |
| 3 | |
| 4 | export default tseslint.config( |
| 5 | { |
| 6 | ignores: [ |
| 7 | "dist/**", |
| 8 | "node_modules/**", |
| 9 | "*.min.js", |
| 10 | "coverage/**", |
| 11 | "playwright/.cache/**", |
| 12 | ], |
| 13 | }, |
| 14 | eslint.configs.recommended, |
| 15 | tseslint.configs.recommended, |
| 16 | { |
| 17 | languageOptions: { |
| 18 | globals: { |
| 19 | // Browser globals |
| 20 | window: "readonly", |
| 21 | document: "readonly", |
| 22 | navigator: "readonly", |
| 23 | URL: "readonly", |
| 24 | URLSearchParams: "readonly", |
| 25 | setTimeout: "readonly", |
| 26 | clearTimeout: "readonly", |
| 27 | setInterval: "readonly", |
| 28 | clearInterval: "readonly", |
| 29 | console: "readonly", |
| 30 | fetch: "readonly", |
| 31 | EventSource: "readonly", |
| 32 | CustomEvent: "readonly", |
| 33 | localStorage: "readonly", |
| 34 | Notification: "readonly", |
| 35 | requestAnimationFrame: "readonly", |
| 36 | cancelAnimationFrame: "readonly", |
| 37 | ResizeObserver: "readonly", |
| 38 | MutationObserver: "readonly", |
| 39 | FormData: "readonly", |
| 40 | Event: "readonly", |
| 41 | DragEvent: "readonly", |
| 42 | AbortController: "readonly", |
| 43 | TextEncoder: "readonly", |
| 44 | ReadableStream: "readonly", |
| 45 | atob: "readonly", |
| 46 | self: "readonly", |
| 47 | }, |
| 48 | }, |
| 49 | rules: { |
| 50 | // Allow unused vars with underscore prefix |
| 51 | "@typescript-eslint/no-unused-vars": [ |
| 52 | "error", |
| 53 | { argsIgnorePattern: "^_", varsIgnorePattern: "^_" }, |
| 54 | ], |
| Josh Bleecher Snyder | a6b995b | 2025-07-24 00:45:05 +0000 | [diff] [blame] | 55 | // Allow explicit any - often needed for interfacing with dynamic data |
| 56 | "@typescript-eslint/no-explicit-any": "off", |
| philip.zeyliger | 26bc659 | 2025-06-30 20:15:30 -0700 | [diff] [blame] | 57 | }, |
| 58 | }, |
| 59 | ); |