Patch eslint-plugin-react-hooks to properly handle class properties (#26493)
* Update package-lock.json for some reason * Patch eslint-plugin-react-hooks * Disable fixed ESLint rule temporarily
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
1cb936b0b7
Коммит
8c3ab07d49
@@ -353,6 +353,9 @@ class ThreadViewerVirtualized extends PureComponent<Props, State> {
|
||||
const isLastPost = itemId === this.props.lastPost.id;
|
||||
const isRootPost = itemId === this.props.selected.id;
|
||||
|
||||
/* eslint-disable react-hooks/rules-of-hooks */
|
||||
|
||||
// Temporarily allow these while MM-56831 is fixed
|
||||
const post = useSelector((state: GlobalState) => getPost(state, this.props.selected.id));
|
||||
const getThreadOrSynthetic = useMemo(makeGetThreadOrSynthetic, []);
|
||||
|
||||
@@ -361,6 +364,8 @@ class ThreadViewerVirtualized extends PureComponent<Props, State> {
|
||||
return thread.reply_count || 0;
|
||||
});
|
||||
|
||||
/* eslint-enable react-hooks/rules-of-hooks */
|
||||
|
||||
if (!isDateLine(itemId) && !isStartOfNewMessages(itemId) && !isCreateComment(itemId) && !isRootPost) {
|
||||
a11yIndex++;
|
||||
}
|
||||
|
||||
Ссылка в новой задаче
Block a user