From d0bf34a4bb6283cb63f2ab286a9d6c2f2ad75fdb Mon Sep 17 00:00:00 2001 From: Siddharth Thevaril Date: Sun, 14 Jul 2024 21:21:45 +0530 Subject: [PATCH] fix documentation --- assets/js/gutenberg-plugin.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/assets/js/gutenberg-plugin.js b/assets/js/gutenberg-plugin.js index e8adfac90..8b1448222 100644 --- a/assets/js/gutenberg-plugin.js +++ b/assets/js/gutenberg-plugin.js @@ -153,12 +153,12 @@ const DistributorIcon = () => ( * Add the Distributor panel to Gutenberg */ const DistributorPlugin = () => { - // eslint-disable-next-line no-shadow, react-hooks/rules-of-hooks -- permission checks are needed. + // eslint-disable-next-line no-shadow const postType = useSelect( ( select ) => select( 'core/editor' ).getCurrentPostType() ); - // eslint-disable-next-line no-shadow -- permission checks are needed. + // eslint-disable-next-line no-shadow const postStatus = useSelect( ( select ) => select( 'core/editor' ).getCurrentPostAttribute( 'status' ) ); @@ -168,12 +168,12 @@ const DistributorPlugin = () => { '#wp-admin-bar-distributor' ); - // eslint-disable-next-line no-shadow -- permission checks are needed. + // eslint-disable-next-line no-shadow const post = useSelect( ( select ) => select( 'core/editor' ).getCurrentPost() ); - // Ensure the user has proper permissions + // Ensure the user has proper permissions. if ( dtGutenberg.noPermissions && 1 === parseInt( dtGutenberg.noPermissions ) @@ -181,7 +181,7 @@ const DistributorPlugin = () => { return null; } - // Ensure we are on a supported post type + // Ensure we are on a supported post type. if ( dtGutenberg.supportedPostTypes && dtGutenberg.supportedPostTypes[ postType ] === undefined @@ -193,7 +193,7 @@ const DistributorPlugin = () => { dt.postTitle = post.title; dt.postStatus = post.status; - // If we are on a non-supported post status, change what we show + // If we are on a non-supported post status, change what we show. if ( dtGutenberg.supportedPostStati && ! dtGutenberg.supportedPostStati.includes( postStatus )