Skip to content

Commit

Permalink
ci(lint): fix react/no-children-prop eslint violations
Browse files Browse the repository at this point in the history
  • Loading branch information
erikgb committed Jan 19, 2025
1 parent 714e125 commit 320c0a0
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 16 deletions.
1 change: 0 additions & 1 deletion eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ export default tseslint.config([
"import/no-unresolved": 0,

"react/display-name": 0,
"react/no-children-prop": 0,
"react/prop-types": 0,
"react-hooks/exhaustive-deps": 0,
"react-hooks/rules-of-hooks": 0,
Expand Down
5 changes: 3 additions & 2 deletions ui/components/InfoModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,9 @@ function InfoModal({ searchedNamespaces, onCloseModal, open }: Props) {
onClose={onClose}
title="Searched namespaces"
description="These are the namespaces that we've searched per cluster to retrieve the objects that you are seeing on this page."
children={content}
/>
>
{content}
</Modal>
);
}

Expand Down
9 changes: 4 additions & 5 deletions ui/components/Policies/PolicyDetails/PolicyDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -103,13 +103,12 @@ const PolicyDetails = ({ policy }: Props) => {
<Flex wide tall column gap="32">
<HeaderRows items={items} />
<SectionWrapper title="Description:">
<MarkdownEditor children={description || ""} />
<MarkdownEditor>{description || ""}</MarkdownEditor>
</SectionWrapper>
<SectionWrapper title="How to solve:">
<MarkdownEditor
children={howToSolve || ""}
remarkPlugins={[remarkGfm]}
/>
<MarkdownEditor remarkPlugins={[remarkGfm]}>
{howToSolve || ""}
</MarkdownEditor>
</SectionWrapper>
<SectionWrapper title="Policy Code:">
<YamlView type="rego" yaml={code} />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,12 @@ export const ViolationDetails = ({
</ul>
</SectionWrapper>
<SectionWrapper title="Description:">
<MarkdownEditor children={description || ""} />
<MarkdownEditor>{description || ""}</MarkdownEditor>
</SectionWrapper>
<SectionWrapper title="How to solve:">
<MarkdownEditor
children={howToSolve || ""}
remarkPlugins={[remarkGfm]}
/>
<MarkdownEditor remarkPlugins={[remarkGfm]}>
{howToSolve || ""}
</MarkdownEditor>
</SectionWrapper>
<SectionWrapper title=" Parameters Values:">
<Parameters parameters={parameters} />
Expand Down
5 changes: 3 additions & 2 deletions ui/components/Sync/SuspendMessageModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,10 @@ function SuspendMessageModal({
onClose={onClose}
title="Suspend Reason"
description="Add reason for suspending"
children={content}
className={className}
/>
>
{content}
</Modal>
);
}

Expand Down
6 changes: 5 additions & 1 deletion ui/contexts/GithubAuthContext.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -26,5 +26,9 @@ export default function GithubAuthContextProvider({ children }: Props) {
setDialogState({ ...dialogState, open, repoName }),
setSuccess: () => setDialogState({ ...dialogState, success: true }),
};
return <GithubAuthContext.Provider value={value} children={children} />;
return (
<GithubAuthContext.Provider value={value}>
{children}
</GithubAuthContext.Provider>
);
}

0 comments on commit 320c0a0

Please sign in to comment.