[Beta] Remove linter TODOs (#5102)

This commit is contained in:
dan
2022-09-24 02:02:32 +01:00
committed by GitHub
parent d56aec2dd1
commit 26fc12cf0a
6 changed files with 19 additions and 19 deletions

View File

@@ -65,7 +65,7 @@
"eslint-plugin-import": "2.x",
"eslint-plugin-jsx-a11y": "6.x",
"eslint-plugin-react": "7.x",
"eslint-plugin-react-hooks": "2.x",
"eslint-plugin-react-hooks": "experimental",
"fs-extra": "^9.0.1",
"globby": "^11.0.1",
"gray-matter": "^4.0.2",

View File

@@ -489,7 +489,7 @@ function ChatRoom({ roomId, theme }) {
});
connection.connect();
return () => connection.disconnect();
}, [roomId, onConnected]); // TODO: Linter will allow [roomId] in the future
}, [roomId]);
return <h1>Welcome to the {roomId} room!</h1>
}

View File

@@ -1414,7 +1414,7 @@ function Welcome({ duration }) {
return () => {
animation.stop();
};
}, [onAppear]); // TODO: Linter will allow [] in the future
}, []);
return (
<h1
@@ -2209,7 +2209,7 @@ export default function ChatRoom({ roomId, isEncrypted, onMessage }) {
connection.on('message', (msg) => onReceiveMessage(msg));
connection.connect();
return () => connection.disconnect();
}, [roomId, isEncrypted, onReceiveMessage]); // TODO: Linter will allow [roomId, isEncrypted] in the future
}, [roomId, isEncrypted]);
return <h1>Welcome to the {roomId} room!</h1>;
}

View File

@@ -1002,7 +1002,7 @@ export function useChatRoom({ serverUrl, roomId, onReceiveMessage }) {
onMessage(msg);
});
return () => connection.disconnect();
}, [roomId, serverUrl, onMessage]); // TODO: Linter will allow [roomId, serverUrl]
}, [roomId, serverUrl]);
}
```
@@ -1673,7 +1673,7 @@ function useAnimationLoop(isRunning, drawFrame) {
tick();
return () => cancelAnimationFrame(frameId);
}, [isRunning, onFrame]); // TODO: Linter will allow [isRunning] in the future
}, [isRunning]);
}
```
@@ -2306,7 +2306,7 @@ export function useInterval(callback, delay) {
useEffect(() => {
const id = setInterval(onTick, delay);
return () => clearInterval(id);
}, [delay, onTick]); // TODO: Linter will allow [delay] in the future
}, [delay]);
}
```

View File

@@ -482,7 +482,7 @@ function ChatRoom({ roomId, theme }) {
});
connection.connect();
return () => connection.disconnect();
}, [roomId, onConnected]); // TODO: Linter will allow [roomId] in the future
}, [roomId]);
return <h1>Welcome to the {roomId} room!</h1>
}
@@ -813,7 +813,7 @@ export default function App() {
useEffect(() => {
window.addEventListener('pointermove', onMove);
return () => window.removeEventListener('pointermove', onMove);
}, [onMove]); // TODO: Linter will allow [] in the future
}, []);
return (
<>
@@ -1172,7 +1172,7 @@ export default function Timer() {
return () => {
clearInterval(id);
};
}, [onTick]); // TODO: Linter will allow [] in the future
}, []);
return (
<>
@@ -1342,7 +1342,7 @@ export default function Timer() {
return () => {
clearInterval(id);
}
}, [delay, onTick]); // TODO: Linter will allow [delay] in the future
}, [delay]);
return (
<>
@@ -1441,7 +1441,7 @@ function ChatRoom({ roomId, theme }) {
});
connection.connect();
return () => connection.disconnect();
}, [roomId, onConnected]); // TODO: Linter will allow [roomId] in the future
}, [roomId]);
return <h1>Welcome to the {roomId} room!</h1>
}
@@ -1582,7 +1582,7 @@ function ChatRoom({ roomId, theme }) {
});
connection.connect();
return () => connection.disconnect();
}, [roomId, onConnected]); // TODO: Linter will allow [roomId] in the future
}, [roomId]);
return <h1>Welcome to the {roomId} room!</h1>
}
@@ -1725,7 +1725,7 @@ function ChatRoom({ roomId, theme }) {
clearTimeout(notificationTimeoutId);
}
};
}, [roomId, onConnected]); // TODO: Linter will allow [roomId] in the future
}, [roomId]);
return <h1>Welcome to the {roomId} room!</h1>
}

View File

@@ -2500,16 +2500,16 @@ eslint-plugin-jsx-a11y@6.x, eslint-plugin-jsx-a11y@^6.4.1:
language-tags "^1.0.5"
minimatch "^3.0.4"
eslint-plugin-react-hooks@2.x:
version "2.5.1"
resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-2.5.1.tgz#4ef5930592588ce171abeb26f400c7fbcbc23cd0"
integrity sha512-Y2c4b55R+6ZzwtTppKwSmK/Kar8AdLiC2f9NADCuxbcTgPPg41Gyqa6b9GppgXSvCtkRw43ZE86CT5sejKC6/g==
eslint-plugin-react-hooks@^4.2.0:
version "4.3.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-4.3.0.tgz#318dbf312e06fab1c835a4abef00121751ac1172"
integrity sha512-XslZy0LnMn+84NEG9jSGR6eGqaZB3133L8xewQo3fQagbQuGt7a63gf+P1NGKZavEYEC3UXaWEAA/AqDkuN6xA==
eslint-plugin-react-hooks@experimental:
version "0.0.0-experimental-cb5084d1c-20220924"
resolved "https://registry.yarnpkg.com/eslint-plugin-react-hooks/-/eslint-plugin-react-hooks-0.0.0-experimental-cb5084d1c-20220924.tgz#66847d4c458198a1a38cbf437397dd461bfa7245"
integrity sha512-qk195a0V1Fz82DUESwAt8bSxwV3MBYGUh4cWezY21gaWderOcva8SdC6HNMAwk2Ad/HvaJbjp/qLYrYBQW7pGg==
eslint-plugin-react@7.x, eslint-plugin-react@^7.23.1:
version "7.28.0"
resolved "https://registry.yarnpkg.com/eslint-plugin-react/-/eslint-plugin-react-7.28.0.tgz#8f3ff450677571a659ce76efc6d80b6a525adbdf"