Skip to content

Commit

Permalink
[AXON-38] chore: silence old linter warnings from React
Browse files Browse the repository at this point in the history
  • Loading branch information
sdzh-atlassian committed Dec 16, 2024
1 parent 7a1dcb5 commit 09fb5d6
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/react/atlascode/common/editor/MarkdownEditor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -177,7 +177,7 @@ export const MarkdownEditor: React.FC<PropsType> = (props: PropsType) => {
setContent('');
}
props.onCancel?.();
}, [enableRichTextEditor, props.onCancel]);
}, [enableRichTextEditor, props.onCancel]); // eslint-disable-line react-hooks/exhaustive-deps

const handleSave = useCallback(async () => {
const mdContent: string = enableRichTextEditor ? mdSerializer.serialize(view.current!.state.doc) : content;
Expand Down
2 changes: 1 addition & 1 deletion src/react/atlascode/common/form/useFormValidation.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ export function useFormValidation<FieldTypes>(watch?: Partial<FieldTypes>): Form
}

return {
register: useCallback(register, []),
register: useCallback(register, []), // eslint-disable-line react-hooks/exhaustive-deps
watches: watches.current,
errors: errors.current,
handleSubmit,
Expand Down
4 changes: 2 additions & 2 deletions src/react/atlascode/config/auth/AuthDialog.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -203,8 +203,8 @@ export const AuthDialog: React.FunctionComponent<AuthDialogProps> = memo(
[],
);

const registerUrl = useCallback(register(validateStartsWithProtocol), []);
const registerRequiredString = useCallback(register(validateRequiredString), []);
const registerUrl = useCallback(register(validateStartsWithProtocol), []); // eslint-disable-line react-hooks/exhaustive-deps
const registerRequiredString = useCallback(register(validateRequiredString), []); // eslint-disable-line react-hooks/exhaustive-deps
return (
<Dialog fullWidth maxWidth="md" open={open} onExited={onExited}>
<DialogTitle>
Expand Down
2 changes: 1 addition & 1 deletion src/react/atlascode/pipelines/PipelineSummaryPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,7 @@ const PipelineSummaryPage: React.FunctionComponent = () => {
</div>
);
},
[classes.loglessStepHeader, classes.stepHeader, controller.fetchLogs, stepHeader],
[classes.loglessStepHeader, classes.stepHeader, controller.fetchLogs, stepHeader], // eslint-disable-line react-hooks/exhaustive-deps
);

const renderPipelineStep = useCallback(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const InlineRenderedTextEditor: React.FC<InlineTextEditorProps> = (props: Inline
await props.onSave?.(value);
exitEditMode();
},
[exitEditMode, props.onSave],
[exitEditMode, props.onSave], // eslint-disable-line react-hooks/exhaustive-deps
);

return editMode ? (
Expand Down
2 changes: 1 addition & 1 deletion src/webviews/components/RenderedContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ export const RenderedContent: React.FC<Props> = (props: Props) => {
},
{ capture: true },
);
}, [props.fetchImage, ref]);
}, [props.fetchImage, ref]); // eslint-disable-line react-hooks/exhaustive-deps

return <p ref={ref} dangerouslySetInnerHTML={{ __html: props.html }} />;
};

0 comments on commit 09fb5d6

Please sign in to comment.