Copilot commented on code in PR #39957:
URL: https://github.com/apache/superset/pull/39957#discussion_r3210068930
##########
superset-frontend/src/pages/FileHandler/index.test.tsx:
##########
@@ -123,7 +128,11 @@ const setupLaunchQueue = (fileHandle: MockFileHandle |
null = null) => {
setConsumer: (consumer: (params: { files?: MockFileHandle[] }) => void) =>
{
savedConsumer = consumer;
if (fileHandle) {
- consumer({ files: [fileHandle] });
+ const id = setTimeout(() => {
+ pendingTimerIds.delete(id);
+ consumer({ files: [fileHandle] });
+ }, 0);
+ pendingTimerIds.add(id);
Review Comment:
The `id` constant is referenced inside the `setTimeout` callback in the same
statement where it’s declared (`const id = setTimeout(() => {
pendingTimerIds.delete(id); ...`) which is likely to violate the repo’s
`@typescript-eslint/no-use-before-define` rule and fail frontend linting.
Please declare the timer id before using it in the callback (e.g., `let id; id
= setTimeout(...);`) or otherwise restructure to avoid referencing the
identifier in its own initializer.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]