workspace: add eslint-config package (#510)

This commit is contained in:
undefined authored and GitHub committed 2023-02-09 23:06:03 +08:00
1 parent e7945a104f
commit 65311529bd
28 files changed
+230 -267

No files matched your search

+1 -1
View File
@@ -16,7 +16,7 @@ export interface EventMap extends Record<string, any> {
}
function getHooks<K extends keyof EventMap>(name: K) {
const hooks = _hooks[name] || (_hooks[name] = []);
const hooks = (_hooks[name] ||= []);
if (hooks.length >= 2048) {
console.warn(
'max listener count (2048) for event "%s" exceeded, which may be caused by a memory leak',