Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,9 @@ export default function LinkPickerResults( {
return {
fetchMoreSuggestions: debounce( fetchMore, REQUEST_DEBOUNCE_DELAY ),
};
// Disable eslint rule for now, to avoid introducing a regression
// (see https://github.com/WordPress/gutenberg/pull/23922#discussion_r1170634879).
// eslint-disable-next-line react-hooks/exhaustive-deps
Comment on lines +77 to +79
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As per #23922 (comment), I have temporarily disabled eslint rule for this line to suppress eslint error for now.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Disabling the linter error on mobile-specific violations has been done in the past. I think this makes sense in this case to unblock this PR. Thanks for the ping!

}, [] );

// Prevent setting state when unmounted.
Expand Down
7 changes: 6 additions & 1 deletion packages/eslint-plugin/configs/react.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,12 @@ module.exports = {
'react/no-children-prop': 'off',
'react/prop-types': 'off',
'react/react-in-jsx-scope': 'off',
'react-hooks/exhaustive-deps': 'warn',
'react-hooks/exhaustive-deps': [
'warn',
{
additionalHooks: '(useSelect|useSuspenseSelect)',
},
],
'react-hooks/rules-of-hooks': 'error',
},
};