Skip to content

Commit 7312da4

Browse files
Fix ESLint unnecessary disable comments
1 parent b7719fe commit 7312da4

File tree

9 files changed

+0
-10
lines changed

9 files changed

+0
-10
lines changed

src/components/content-presentation/table/TableContext.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ export interface ITableContext {
88
}
99

1010
export const TableContext = createContext<ITableContext>({
11-
/* eslint-disable @typescript-eslint/no-empty-function */
1211
firstCellIsHeader: false,
1312
headings: [],
1413
responsive: false,

src/components/content-presentation/table/components/__tests__/TableCell.test.tsx

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,7 @@ describe('Table.Cell', () => {
2929
</table>,
3030
);
3131

32-
// eslint-disable-next-line no-console
3332
expect(console.warn).toHaveBeenCalledTimes(1);
34-
// eslint-disable-next-line no-console
3533
expect(console.warn).toHaveBeenLastCalledWith(
3634
'Table.Cell used outside of a Table.Head or Table.Body component. Unable to determine section type from context.',
3735
);

src/components/form-elements/checkboxes/CheckboxesContext.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ export interface ICheckboxesContext {
88
}
99

1010
export const CheckboxesContext = createContext<ICheckboxesContext>({
11-
/* eslint-disable @typescript-eslint/no-empty-function */
1211
name: '',
1312
getBoxId: () => undefined,
1413
leaseReference: () => '',

src/components/form-elements/date-input/DateInput.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ const DateInputComponent = forwardRef<HTMLDivElement, DateInputProps>(
7474
inputType="dateinput"
7575
{...rest}
7676
>
77-
{/* eslint-disable-next-line @typescript-eslint/no-unused-vars */}
7877
{({ className, name, id, error, ...restRenderProps }) => {
7978
const contextValue: IDateInputContext = {
8079
id,

src/components/form-elements/date-input/DateInputContext.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ export type IDateInputContext = {
1010
};
1111

1212
export const DateInputContext = createContext<IDateInputContext>({
13-
/* eslint-disable @typescript-eslint/no-empty-function */
1413
id: '',
1514
name: '',
1615
handleChange: () => {},

src/components/form-elements/radios/RadiosContext.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ export type IRadiosContext = {
1010
};
1111

1212
export const RadiosContext = createContext<IRadiosContext>({
13-
/* eslint-disable @typescript-eslint/no-empty-function */
1413
name: '',
1514
selectedRadio: '',
1615
getRadioId: () => '',

src/components/navigation/header/HeaderContext.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ export interface IHeaderContext {
2424
}
2525

2626
export const HeaderContext = createContext<IHeaderContext>({
27-
/* eslint-disable @typescript-eslint/no-empty-function */
2827
logoProps: undefined,
2928
serviceProps: undefined,
3029
organisationProps: undefined,

src/components/utils/__tests__/HeadingLevel.test.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ describe('HeadingLevel', () => {
1818
});
1919

2020
it('console.warn when headingLevel is invalid', () => {
21-
// eslint-disable-next-line @typescript-eslint/no-empty-function
2221
const consoleSpy = jest.spyOn(console, 'error').mockImplementation(() => {});
2322
// @ts-expect-error - testing invalid prop
2423
render(<HeadingLevel headingLevel="h7" />);

src/util/hooks/UseDevWarning.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ type ConditionFn = () => boolean;
66
export const useDevWarning = (warning: string, condition: ConditionFn = () => true): void => {
77
useEffect(() => {
88
if (isDev() && condition()) {
9-
// eslint-disable-next-line no-console
109
console.warn(warning);
1110
}
1211
}, [warning, condition]);

0 commit comments

Comments
 (0)