From c89d9dc6dfa37330148d3d694e1a8b01e96baa74 Mon Sep 17 00:00:00 2001 From: jbpenrath Date: Mon, 21 Aug 2023 14:44:11 +0200 Subject: [PATCH] =?UTF-8?q?=F0=9F=9A=A8(react)=20fix=20linter=20warning=20?= =?UTF-8?q?&=20errors?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With upgrade new linter warning and erros are popped up. So we fix it. --- .../Forms/DatePicker/DatePicker.spec.tsx | 20 ++++++++----------- .../Forms/DatePicker/DatePickerAux.tsx | 3 +++ 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/packages/react/src/components/Forms/DatePicker/DatePicker.spec.tsx b/packages/react/src/components/Forms/DatePicker/DatePicker.spec.tsx index cc1ce3e..86f2787 100644 --- a/packages/react/src/components/Forms/DatePicker/DatePicker.spec.tsx +++ b/packages/react/src/components/Forms/DatePicker/DatePicker.spec.tsx @@ -166,9 +166,8 @@ describe("", () => { ); // Get elements that should receive focus when no date is picked. const [input, toggleButton] = await screen.findAllByRole("button")!; - const [monthSegment, daySegment, yearSegment] = await screen.findAllByRole( - "spinbutton", - )!; + const [monthSegment, daySegment, yearSegment] = + await screen.findAllByRole("spinbutton"); await user.keyboard("{Tab}"); expect(input).toHaveFocus(); @@ -203,9 +202,8 @@ describe("", () => { const clearButton = screen.getByRole("button", { name: "Clear date", }); - const [monthSegment, daySegment, yearSegment] = await screen.findAllByRole( - "spinbutton", - )!; + const [monthSegment, daySegment, yearSegment] = + await screen.findAllByRole("spinbutton")!; // Navigate through elements using Tab. await user.keyboard("{Tab}"); @@ -286,9 +284,8 @@ describe("", () => { /> , ); - const [monthSegment, daySegment, yearSegment] = await screen.findAllByRole( - "spinbutton", - )!; + const [monthSegment, daySegment, yearSegment] = + await screen.findAllByRole("spinbutton")!; // Select the first segment, month one. await user.click(monthSegment); expect(monthSegment).toHaveFocus(); @@ -322,9 +319,8 @@ describe("", () => { /> , ); - const [monthSegment, daySegment, yearSegment] = await screen.findAllByRole( - "spinbutton", - )!; + const [monthSegment, daySegment, yearSegment] = + await screen.findAllByRole("spinbutton")!; // Select the first segment, month one. await user.click(monthSegment); expect(monthSegment).toHaveFocus(); diff --git a/packages/react/src/components/Forms/DatePicker/DatePickerAux.tsx b/packages/react/src/components/Forms/DatePicker/DatePickerAux.tsx index b06f291..4450ae4 100644 --- a/packages/react/src/components/Forms/DatePicker/DatePickerAux.tsx +++ b/packages/react/src/components/Forms/DatePicker/DatePickerAux.tsx @@ -23,8 +23,11 @@ import { import { convertDateValueToString } from ":/components/Forms/DatePicker/utils"; export type DatePickerAuxSubProps = FieldProps & { + // eslint-disable-next-line react/no-unused-prop-types label?: string; + // eslint-disable-next-line react/no-unused-prop-types minValue?: string; + // eslint-disable-next-line react/no-unused-prop-types maxValue?: string; disabled?: boolean; name?: string;