🚨(react) fix linter warning & errors
With upgrade new linter warning and erros are popped up. So we fix it.
This commit is contained in:
committed by
Jean-Baptiste PENRATH
parent
151382dec2
commit
c89d9dc6df
@@ -166,9 +166,8 @@ describe("<DatePicker/>", () => {
|
||||
);
|
||||
// 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("<DatePicker/>", () => {
|
||||
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("<DatePicker/>", () => {
|
||||
/>
|
||||
</CunninghamProvider>,
|
||||
);
|
||||
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("<DatePicker/>", () => {
|
||||
/>
|
||||
</CunninghamProvider>,
|
||||
);
|
||||
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();
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user