|
| 1 | +// @ts-check |
| 2 | + |
| 3 | +import js from "@eslint/js"; |
| 4 | +import { config, configs as tsConfigs } from "typescript-eslint"; |
| 5 | + |
| 6 | +export default config( |
| 7 | + js.configs.recommended, |
| 8 | + ...tsConfigs.recommended, |
| 9 | + { |
| 10 | + files: [ |
| 11 | + "src/**/*.{ts,tsx,cts,mts}", |
| 12 | + "tests/**/*.{ts,tsx,cts,mts}", |
| 13 | + "types/**/*.{ts,tsx,cts,mts}", |
| 14 | + ], |
| 15 | + rules: { |
| 16 | + "@typescript-eslint/no-explicit-any": "off", |
| 17 | + "@typescript-eslint/no-unused-vars": [ |
| 18 | + "error", |
| 19 | + { |
| 20 | + args: "all", |
| 21 | + argsIgnorePattern: "^_", |
| 22 | + caughtErrors: "all", |
| 23 | + caughtErrorsIgnorePattern: "^_", |
| 24 | + destructuredArrayIgnorePattern: "^_", |
| 25 | + varsIgnorePattern: "^_", |
| 26 | + ignoreRestSiblings: true, |
| 27 | + }, |
| 28 | + ], |
| 29 | + "prefer-const": [ |
| 30 | + "error", |
| 31 | + { |
| 32 | + destructuring: "all", |
| 33 | + ignoreReadBeforeAssign: false, |
| 34 | + }, |
| 35 | + ], |
| 36 | + "no-mixed-spaces-and-tabs": "off", |
| 37 | + "no-restricted-globals": [ |
| 38 | + 2, |
| 39 | + "window", |
| 40 | + "self", |
| 41 | + "document", |
| 42 | + "name", |
| 43 | + "location", |
| 44 | + "customElements", |
| 45 | + "history", |
| 46 | + "locationbar", |
| 47 | + "menubar", |
| 48 | + "personalbar", |
| 49 | + "scrollbars", |
| 50 | + "statusbar", |
| 51 | + "toolbar", |
| 52 | + "status", |
| 53 | + "closed", |
| 54 | + "frames", |
| 55 | + "length", |
| 56 | + "top", |
| 57 | + "opener", |
| 58 | + "parent", |
| 59 | + "frameElement", |
| 60 | + "navigator", |
| 61 | + "origin", |
| 62 | + "external", |
| 63 | + "screen", |
| 64 | + "innerWidth", |
| 65 | + "innerHeight", |
| 66 | + "scrollX", |
| 67 | + "pageXOffset", |
| 68 | + "scrollY", |
| 69 | + "pageYOffset", |
| 70 | + "visualViewport", |
| 71 | + "screenX", |
| 72 | + "screenY", |
| 73 | + "outerWidth", |
| 74 | + "outerHeight", |
| 75 | + "devicePixelRatio", |
| 76 | + "clientInformation", |
| 77 | + "screenLeft", |
| 78 | + "screenTop", |
| 79 | + "defaultStatus", |
| 80 | + "defaultstatus", |
| 81 | + "styleMedia", |
| 82 | + "onsearch", |
| 83 | + "isSecureContext", |
| 84 | + "performance", |
| 85 | + "onappinstalled", |
| 86 | + "onbeforeinstallprompt", |
| 87 | + "crypto", |
| 88 | + "indexedDB", |
| 89 | + "webkitStorageInfo", |
| 90 | + "sessionStorage", |
| 91 | + "localStorage", |
| 92 | + "onbeforexrselect", |
| 93 | + "onabort", |
| 94 | + "onblur", |
| 95 | + "oncancel", |
| 96 | + "oncanplay", |
| 97 | + "oncanplaythrough", |
| 98 | + "onchange", |
| 99 | + "onclick", |
| 100 | + "onclose", |
| 101 | + "oncontextmenu", |
| 102 | + "oncuechange", |
| 103 | + "ondblclick", |
| 104 | + "ondrag", |
| 105 | + "ondragend", |
| 106 | + "ondragenter", |
| 107 | + "ondragleave", |
| 108 | + "ondragover", |
| 109 | + "ondragstart", |
| 110 | + "ondrop", |
| 111 | + "ondurationchange", |
| 112 | + "onemptied", |
| 113 | + "onended", |
| 114 | + "onerror", |
| 115 | + "onfocus", |
| 116 | + "onformdata", |
| 117 | + "oninput", |
| 118 | + "oninvalid", |
| 119 | + "onkeydown", |
| 120 | + "onkeypress", |
| 121 | + "onkeyup", |
| 122 | + "onload", |
| 123 | + "onloadeddata", |
| 124 | + "onloadedmetadata", |
| 125 | + "onloadstart", |
| 126 | + "onmousedown", |
| 127 | + "onmouseenter", |
| 128 | + "onmouseleave", |
| 129 | + "onmousemove", |
| 130 | + "onmouseout", |
| 131 | + "onmouseover", |
| 132 | + "onmouseup", |
| 133 | + "onmousewheel", |
| 134 | + "onpause", |
| 135 | + "onplay", |
| 136 | + "onplaying", |
| 137 | + "onprogress", |
| 138 | + "onratechange", |
| 139 | + "onreset", |
| 140 | + "onresize", |
| 141 | + "onscroll", |
| 142 | + "onseeked", |
| 143 | + "onseeking", |
| 144 | + "onselect", |
| 145 | + "onstalled", |
| 146 | + "onsubmit", |
| 147 | + "onsuspend", |
| 148 | + "ontimeupdate", |
| 149 | + "ontoggle", |
| 150 | + "onvolumechange", |
| 151 | + "onwaiting", |
| 152 | + "onwebkitanimationend", |
| 153 | + "onwebkitanimationiteration", |
| 154 | + "onwebkitanimationstart", |
| 155 | + "onwebkittransitionend", |
| 156 | + "onwheel", |
| 157 | + "onauxclick", |
| 158 | + "ongotpointercapture", |
| 159 | + "onlostpointercapture", |
| 160 | + "onpointerdown", |
| 161 | + "onpointermove", |
| 162 | + "onpointerup", |
| 163 | + "onpointercancel", |
| 164 | + "onpointerover", |
| 165 | + "onpointerout", |
| 166 | + "onpointerenter", |
| 167 | + "onpointerleave", |
| 168 | + "onselectstart", |
| 169 | + "onselectionchange", |
| 170 | + "onanimationend", |
| 171 | + "onanimationiteration", |
| 172 | + "onanimationstart", |
| 173 | + "ontransitionrun", |
| 174 | + "ontransitionstart", |
| 175 | + "ontransitionend", |
| 176 | + "ontransitioncancel", |
| 177 | + "onafterprint", |
| 178 | + "onbeforeprint", |
| 179 | + "onbeforeunload", |
| 180 | + "onhashchange", |
| 181 | + "onlanguagechange", |
| 182 | + "onmessage", |
| 183 | + "onmessageerror", |
| 184 | + "onoffline", |
| 185 | + "ononline", |
| 186 | + "onpagehide", |
| 187 | + "onpageshow", |
| 188 | + "onpopstate", |
| 189 | + "onrejectionhandled", |
| 190 | + "onstorage", |
| 191 | + "onunhandledrejection", |
| 192 | + "onunload", |
| 193 | + "alert", |
| 194 | + "atob", |
| 195 | + "blur", |
| 196 | + "btoa", |
| 197 | + "cancelAnimationFrame", |
| 198 | + "cancelIdleCallback", |
| 199 | + "captureEvents", |
| 200 | + "close", |
| 201 | + "confirm", |
| 202 | + "createImageBitmap", |
| 203 | + "find", |
| 204 | + "focus", |
| 205 | + "getComputedStyle", |
| 206 | + "getSelection", |
| 207 | + "matchMedia", |
| 208 | + "moveBy", |
| 209 | + "moveTo", |
| 210 | + "open", |
| 211 | + "postMessage", |
| 212 | + "print", |
| 213 | + "prompt", |
| 214 | + "queueMicrotask", |
| 215 | + "releaseEvents", |
| 216 | + "requestAnimationFrame", |
| 217 | + "requestIdleCallback", |
| 218 | + "resizeBy", |
| 219 | + "resizeTo", |
| 220 | + "scroll", |
| 221 | + "scrollBy", |
| 222 | + "scrollTo", |
| 223 | + "stop", |
| 224 | + "webkitCancelAnimationFrame", |
| 225 | + "webkitRequestAnimationFrame", |
| 226 | + "chrome", |
| 227 | + "originAgentCluster", |
| 228 | + "trustedTypes", |
| 229 | + "speechSynthesis", |
| 230 | + "onpointerrawupdate", |
| 231 | + "crossOriginIsolated", |
| 232 | + "openDatabase", |
| 233 | + "webkitRequestFileSystem", |
| 234 | + "webkitResolveLocalFileSystemURL", |
| 235 | + ], |
| 236 | + }, |
| 237 | + }, |
| 238 | + { |
| 239 | + ignores: ["coverage/**", "dist/**", "**/*.mjs", "**/*.cjs"], |
| 240 | + }, |
| 241 | +); |
0 commit comments