blob: 3298f7cc77798031083d9a00e375882c24eae811 [file] [log] [blame]
philip.zeyliger26bc6592025-06-30 20:15:30 -07001import eslint from "@eslint/js";
2import tseslint from "typescript-eslint";
3
4export 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 Snydera6b995b2025-07-24 00:45:05 +000055 // Allow explicit any - often needed for interfacing with dynamic data
56 "@typescript-eslint/no-explicit-any": "off",
philip.zeyliger26bc6592025-06-30 20:15:30 -070057 },
58 },
59);