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
1 change: 0 additions & 1 deletion configs/eslint-config-compass/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ const tempNewEslintRulesDisabled = {
'react-hooks/refs': 'off',
'react-hooks/set-state-in-effect': 'off',
'react-hooks/preserve-manual-memoization': 'off',
'react-hooks/static-components': 'off',
'@typescript-eslint/no-unsafe-enum-comparison': 'off',
};

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ const TestComponent: React.FunctionComponent<{

return (
<DrawerContentProvider>
{/* Breaking this rule is fine while none of the tests try to re-render the content */}
{/* eslint-disable-next-line react-hooks/static-components */}
<MockedProvider
originForPrompt="mongodb-compass"
appNameForPrompt="MongoDB Compass"
Expand All @@ -113,6 +115,8 @@ describe('useAssistantActions', function () {

return (
<DrawerContentProvider>
{/* Breaking this rule is fine while none of the tests try to re-render the content */}
{/* eslint-disable-next-line react-hooks/static-components */}
<MockedProvider
originForPrompt="mongodb-compass"
appNameForPrompt="MongoDB Compass"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,8 @@ const CollectionTab = ({
};

return (
// This component is not created in render, just accessed from context
// eslint-disable-next-line react-hooks/static-components
<QueryBarPlugin {...pluginProps}>
<CollectionTabWithMetadata
collectionMetadata={collectionMetadata}
Expand Down
2 changes: 2 additions & 0 deletions packages/compass-query-bar/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,8 @@ export const QueryBar: React.FunctionComponent<
React.ComponentProps<typeof QueryBarComponent>
> = (props) => {
const Component = useQueryBarComponent();
// Component is not created, just accessed via context
// eslint-disable-next-line react-hooks/static-components
return <Component {...props}></Component>;
};

Expand Down
Loading