Skip to content

Commit

Permalink
disable eslint that nags of @ts-ignore
Browse files Browse the repository at this point in the history
  • Loading branch information
sirtawast committed Aug 11, 2023
1 parent f81702b commit e3f9e0d
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 0 deletions.
5 changes: 5 additions & 0 deletions frontend/tet/admin/src/components/editor/DateInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,12 @@ import { Language } from 'shared/i18n/i18n';
import Id from 'shared/types/id';
import TetPosting from 'tet-shared/types/tetposting';

// Known issue with react-hook-form library, errors out with:
// Type of property 'prototype' circularly references itself in mapped type '{ [K in keyof Blob]-?: PathImpl<K & string, Blob[K]>; }'.
// More at: https://github.com/orgs/react-hook-form/discussions/7764
type Props = {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
id: Id<TetPosting>;
label: string;
registerOptions?: RegisterOptions;
Expand Down
1 change: 1 addition & 0 deletions frontend/tet/admin/src/components/editor/Editor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ export type EditorSectionProps = {
// Type of property 'prototype' circularly references itself in mapped type '{ [K in keyof Blob]-?: PathImpl<K & string, Blob[K]>; }'.
// More at: https://github.com/orgs/react-hook-form/discussions/7764

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
const RenderHiddenIdInput = (id: string, value: string): JSXElement => <HiddenIdInput id={id} initialValue={value} />;

Expand Down
1 change: 1 addition & 0 deletions frontend/tet/admin/src/components/editor/HiddenIdInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import TetPosting from 'tet-shared/types/tetposting';
// Type of property 'prototype' circularly references itself in mapped type '{ [K in keyof Blob]-?: PathImpl<K & string, Blob[K]>; }'.
// More at: https://github.com/orgs/react-hook-form/discussions/7764

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
const HiddenIdInput: React.FC<InputProps<TetPosting>> = ({ id, initialValue }) => {
const { register } = useFormContext<TetPosting>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ const SelectionGroup: React.FC<Props> = ({ fieldId, label, options, required, ru
// Type of property 'prototype' circularly references itself in mapped type '{ [K in keyof Blob]-?: PathImpl<K & string, Blob[K]>; }'.
// More at: https://github.com/orgs/react-hook-form/discussions/7764

// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
<Controller
name={fieldId}
Expand Down
5 changes: 5 additions & 0 deletions frontend/tet/admin/src/components/editor/TextArea.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ import { Controller, RegisterOptions, useFormContext } from 'react-hook-form';
import Id from 'shared/types/id';
import TetPosting from 'tet-shared/types/tetposting';

// Known issue with react-hook-form library, errors out with:
// Type of property 'prototype' circularly references itself in mapped type '{ [K in keyof Blob]-?: PathImpl<K & string, Blob[K]>; }'.
// More at: https://github.com/orgs/react-hook-form/discussions/7764
type Props = {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
id: Id<TetPosting>;
testId?: string;
label: string;
Expand Down
5 changes: 5 additions & 0 deletions frontend/tet/admin/src/components/editor/TextInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,12 @@ import { Controller, RegisterOptions, useFormContext } from 'react-hook-form';
import Id from 'shared/types/id';
import TetPosting from 'tet-shared/types/tetposting';

// Known issue with react-hook-form library, errors out with:
// Type of property 'prototype' circularly references itself in mapped type '{ [K in keyof Blob]-?: PathImpl<K & string, Blob[K]>; }'.
// More at: https://github.com/orgs/react-hook-form/discussions/7764
type Props = {
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
id: Id<TetPosting>;
label: string;
placeholder: string;
Expand Down

0 comments on commit e3f9e0d

Please sign in to comment.