-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.eslintcache
1 lines (1 loc) · 12.6 KB
/
.eslintcache
1
[{"/Users/rawbin/activites/medialab/twitch-studies/lore-selfie/components/DailyVisualization/Daily.tsx":"1","/Users/rawbin/activites/medialab/twitch-studies/lore-selfie/components/DailyVisualization/DailyVisualizationSession.tsx":"2","/Users/rawbin/activites/medialab/twitch-studies/lore-selfie/components/HabitsVisualization/Habits.tsx":"3","/Users/rawbin/activites/medialab/twitch-studies/lore-selfie/background/ports/activitycrud.ts":"4","/Users/rawbin/activites/medialab/twitch-studies/lore-selfie/tabs/dev-dashboard.tsx":"5","/Users/rawbin/activites/medialab/twitch-studies/lore-selfie/components/Diary/DaySummary.tsx":"6"},{"size":3500,"mtime":1737718927406,"results":"7","hashOfConfig":"8"},{"size":8719,"mtime":1737729336937,"results":"9","hashOfConfig":"8"},{"size":12177,"mtime":1737729463384,"results":"10","hashOfConfig":"8"},{"size":22322,"mtime":1737729782596,"results":"11","hashOfConfig":"8"},{"size":20896,"mtime":1737729750129,"results":"12","hashOfConfig":"8"},{"size":2064,"mtime":1737730278394,"results":"13","hashOfConfig":"8"},{"filePath":"14","messages":"15","suppressedMessages":"16","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"zyjoan",{"filePath":"17","messages":"18","suppressedMessages":"19","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"20","messages":"21","suppressedMessages":"22","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"23","messages":"24","suppressedMessages":"25","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"26","messages":"27","suppressedMessages":"28","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},{"filePath":"29","messages":"30","suppressedMessages":"31","errorCount":0,"fatalErrorCount":0,"warningCount":0,"fixableErrorCount":0,"fixableWarningCount":0},"/Users/rawbin/activites/medialab/twitch-studies/lore-selfie/components/DailyVisualization/Daily.tsx",[],[],"/Users/rawbin/activites/medialab/twitch-studies/lore-selfie/components/DailyVisualization/DailyVisualizationSession.tsx",[],[],"/Users/rawbin/activites/medialab/twitch-studies/lore-selfie/components/HabitsVisualization/Habits.tsx",[],[],"/Users/rawbin/activites/medialab/twitch-studies/lore-selfie/background/ports/activitycrud.ts",[],["32","33","34","35","36","37","38","39"],"/Users/rawbin/activites/medialab/twitch-studies/lore-selfie/tabs/dev-dashboard.tsx",[],[],"/Users/rawbin/activites/medialab/twitch-studies/lore-selfie/components/Diary/DaySummary.tsx",[],[],{"ruleId":"40","severity":2,"message":"41","line":217,"column":7,"nodeType":null,"messageId":"42","endLine":217,"endColumn":25,"suppressions":"43"},{"ruleId":"44","severity":1,"message":"45","line":300,"column":7,"nodeType":"46","messageId":"47","endLine":300,"endColumn":37,"suggestions":"48","suppressions":"49"},{"ruleId":"44","severity":1,"message":"45","line":380,"column":7,"nodeType":"46","messageId":"47","endLine":383,"endColumn":46,"suggestions":"50","suppressions":"51"},{"ruleId":"44","severity":1,"message":"45","line":417,"column":7,"nodeType":"46","messageId":"47","endLine":420,"endColumn":46,"suggestions":"52","suppressions":"53"},{"ruleId":"44","severity":1,"message":"45","line":423,"column":7,"nodeType":"46","messageId":"47","endLine":423,"endColumn":22,"suggestions":"54","suppressions":"55"},{"ruleId":"44","severity":1,"message":"45","line":433,"column":7,"nodeType":"46","messageId":"47","endLine":463,"endColumn":8,"suggestions":"56","suppressions":"57"},{"ruleId":"44","severity":1,"message":"45","line":468,"column":7,"nodeType":"46","messageId":"47","endLine":468,"endColumn":41,"suggestions":"58","suppressions":"59"},{"ruleId":"44","severity":1,"message":"45","line":470,"column":7,"nodeType":"46","messageId":"47","endLine":528,"endColumn":21,"suggestions":"60","suppressions":"61"},"@typescript-eslint/no-unused-vars","'AvailablePlatforms' is assigned a value but never used.","unusedVar",["62"],"no-case-declarations","Unexpected lexical declaration in case block.","VariableDeclaration","unexpected",["63"],["64"],["65"],["66"],["67"],["68"],["69"],["70"],["71"],["72"],["73"],["74"],["75"],["76"],{"kind":"77","justification":"78"},{"messageId":"79","fix":"80","desc":"81"},{"kind":"77","justification":"78"},{"messageId":"79","fix":"82","desc":"81"},{"kind":"77","justification":"78"},{"messageId":"79","fix":"83","desc":"81"},{"kind":"77","justification":"78"},{"messageId":"79","fix":"84","desc":"81"},{"kind":"77","justification":"78"},{"messageId":"79","fix":"85","desc":"81"},{"kind":"77","justification":"78"},{"messageId":"79","fix":"86","desc":"81"},{"kind":"77","justification":"78"},{"messageId":"79","fix":"87","desc":"81"},{"kind":"77","justification":"78"},"directive","","addBrackets",{"range":"88","text":"89"},"Add {} brackets around the case block.",{"range":"90","text":"91"},{"range":"92","text":"93"},{"range":"94","text":"93"},{"range":"95","text":"93"},{"range":"96","text":"93"},{"range":"97","text":"93"},[8869,10469],"{ filteredEvents = filterEvents(\n activity,\n payload as FilterEventsPayload\n ).filter((event) => {\n if (event.type === BROWSE_VIEW) {\n return event.metadata && event.metadata.channelId\n }\n })\n // eslint-disable-next-line\n const channelsList = new Map()\n filteredEvents.forEach((event: BrowseViewEvent) => {\n const { channelId, channelName } = event.metadata\n const { platform, url } = event\n const id = `${channelId}-${platform}`\n // console.log('channel', { channelId, channelName, id, platform })\n if (!channelsList.has(id)) {\n const newChannel: AvailableChannel = {\n id,\n channelId,\n channelName,\n platform,\n urls: new Set([url])\n }\n channelsList.set(id, newChannel)\n } else {\n const existing = channelsList.get(id)\n const newUrls = new Set(Array.from(existing.urls))\n newUrls.add(url)\n const updated = {\n ...existing,\n urls: newUrls\n }\n channelsList.set(id, updated)\n }\n })\n res.send({\n responseType: ACTION_END,\n actionType,\n payload,\n requestId,\n result: {\n status: \"success\",\n data: Array.from(\n channelsList.values().map(\n (channel): AvailableChannel => ({\n ...channel,\n urlsCount: Array.from(channel.urls).length\n })\n )\n ) as AvailableChannels\n }\n })\n break }",[11549,12606],"{ const {\n bin = DAY_IN_MS, // 'day',\n ...settings\n } = payload as GetBinnedActivityPayload\n filteredEvents = filterEvents(activity, settings as FilterEventsPayload)\n units = filteredEvents.reduce((cur, event) => {\n const time = new Date(event.date).getTime()\n const key = time - (time % bin)\n if (cur && !cur.has(key)) {\n cur.set(key, [event])\n } else if (cur && cur.has(key)) {\n cur.set(key, [...cur.get(key), event])\n }\n return cur\n }, new Map<number, CaptureEventsList>()) as Map<number, CaptureEventsList>\n loadedUnits = []\n for (const [dateTime, events] of (\n units as Map<number, CaptureEventsList>\n ).entries()) {\n loadedUnits.push({\n date: dateTime,\n eventsCount: events.length\n })\n }\n res.send({\n responseType: ACTION_END,\n requestId,\n actionType,\n payload,\n result: {\n status: \"success\",\n data: loadedUnits\n }\n })\n break }",[12673,17443],"{ const {\n bin: binsDuration, // 'day',\n ...otherSettings\n } = payload as GetBinnedActivityPayload\n\n // eslint-disable-next-line\n const bins = []\n for (let h = 0; h < 24 * 3600 * 1000; h += binsDuration) {\n bins.push({\n start: h,\n end: h + binsDuration,\n label: `${h / 3600000}h-${(h + binsDuration) / 3600000}h`\n })\n }\n\n // eslint-disable-next-line\n const initOutput: HabitsData = [0, 1, 2, 3, 4, 5, 6].reduce(\n (res1, dayId) => ({\n ...res1,\n [dayId]: bins.reduce((res2, bin) => {\n const {\n start\n // end\n } = bin\n return {\n ...res2,\n [start]: {\n count: 0,\n duration: 0,\n channels: {},\n breakdown: {\n ...PLATFORMS.reduce((res3, platformId) => {\n return {\n ...res3,\n [platformId]: {\n count: 0,\n duration: 0\n }\n }\n }, {})\n }\n }\n }\n }, {})\n }),\n {}\n )\n\n filteredEvents = filterEvents(activity, otherSettings)\n\n // eslint-disable-next-line\n const urlToChannelSlug = new Map()\n // eslint-disable-next-line\n const output: HabitsData = filteredEvents.reduce((tempOutput, event) => {\n const date = new Date(event.date)\n const day = date.getDay()\n const { platform, type, url } = event\n const thatBin = getDateBin(date, binsDuration)\n tempOutput[day][thatBin].count += 1\n tempOutput[day][thatBin].breakdown[platform].count += 1\n if (type === LIVE_USER_ACTIVITY_RECORD) {\n if (\n platform === \"twitch\" ||\n (event as LiveUserActivityRecordEvent).isPlaying\n ) {\n const thatSpan = event.timeSpan\n tempOutput[day][thatBin].count += 1\n tempOutput[day][thatBin].duration += thatSpan\n\n tempOutput[day][thatBin].breakdown[platform].count += 1\n tempOutput[day][thatBin].breakdown[platform].duration += thatSpan\n const channelSlug = urlToChannelSlug.get(url)\n // console.log('test', channelSlug, tempOutput[day][thatBin].channels, tempOutput[day][thatBin].channels[channelSlug])\n if (channelSlug && tempOutput[day][thatBin].channels[channelSlug]) {\n // console.log('obj', tempOutput[day][thatBin].channels[channelSlug])\n tempOutput[day][thatBin].channels[channelSlug].count += 1\n tempOutput[day][thatBin].channels[channelSlug].duration +=\n thatSpan\n // video was browsed before bin start\n } else if (\n channelSlug &&\n !tempOutput[day][thatBin].channels[channelSlug]\n ) {\n tempOutput[day][thatBin].channels[channelSlug] = {\n channel: channelSlug,\n platform,\n duration: thatSpan,\n count: 1\n }\n } else {\n console.warn(\"did not count event for url:\", event.url)\n }\n }\n } else if (type === BROWSE_VIEW) {\n const channel = event.metadata.channelName || event.metadata.channelId\n if (channel) {\n const channelSlug = `${channel} (${event.platform})`\n if (!tempOutput[day][thatBin].channels[channelSlug]) {\n tempOutput[day][thatBin].channels[channelSlug] = {\n channel,\n platform,\n duration: 0,\n count: 0\n }\n }\n if (!urlToChannelSlug.has(url)) {\n urlToChannelSlug.set(url, channelSlug)\n }\n }\n }\n return tempOutput\n }, initOutput)\n\n // units = filteredEvents.reduce((cur, event) => {\n // const time = new Date(event.date).getTime();\n // const key = time - time % binsDuration;\n // if (cur && !cur.has(key)) {\n // cur.set(key, [event]);\n // } else if (cur && cur.has(key)) {\n // cur.set(key, [...cur.get(key), event])\n // }\n // return cur;\n // }, new Map());\n // loadedUnits = []\n // for ([dateTime, events] of units.entries()) {\n // loadedUnits.push({\n // date: dateTime,\n // eventsCount: events.length\n // })\n // }\n\n res.send({\n responseType: ACTION_END,\n requestId,\n actionType,\n payload,\n result: {\n status: \"success\",\n data: output\n }\n })\n break }",[12673,17443],[12673,17443],[12673,17443],[12673,17443]]