🚨(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.
|
// Get elements that should receive focus when no date is picked.
|
||||||
const [input, toggleButton] = await screen.findAllByRole("button")!;
|
const [input, toggleButton] = await screen.findAllByRole("button")!;
|
||||||
const [monthSegment, daySegment, yearSegment] = await screen.findAllByRole(
|
const [monthSegment, daySegment, yearSegment] =
|
||||||
"spinbutton",
|
await screen.findAllByRole("spinbutton");
|
||||||
)!;
|
|
||||||
|
|
||||||
await user.keyboard("{Tab}");
|
await user.keyboard("{Tab}");
|
||||||
expect(input).toHaveFocus();
|
expect(input).toHaveFocus();
|
||||||
@@ -203,9 +202,8 @@ describe("<DatePicker/>", () => {
|
|||||||
const clearButton = screen.getByRole("button", {
|
const clearButton = screen.getByRole("button", {
|
||||||
name: "Clear date",
|
name: "Clear date",
|
||||||
});
|
});
|
||||||
const [monthSegment, daySegment, yearSegment] = await screen.findAllByRole(
|
const [monthSegment, daySegment, yearSegment] =
|
||||||
"spinbutton",
|
await screen.findAllByRole("spinbutton")!;
|
||||||
)!;
|
|
||||||
|
|
||||||
// Navigate through elements using Tab.
|
// Navigate through elements using Tab.
|
||||||
await user.keyboard("{Tab}");
|
await user.keyboard("{Tab}");
|
||||||
@@ -286,9 +284,8 @@ describe("<DatePicker/>", () => {
|
|||||||
/>
|
/>
|
||||||
</CunninghamProvider>,
|
</CunninghamProvider>,
|
||||||
);
|
);
|
||||||
const [monthSegment, daySegment, yearSegment] = await screen.findAllByRole(
|
const [monthSegment, daySegment, yearSegment] =
|
||||||
"spinbutton",
|
await screen.findAllByRole("spinbutton")!;
|
||||||
)!;
|
|
||||||
// Select the first segment, month one.
|
// Select the first segment, month one.
|
||||||
await user.click(monthSegment);
|
await user.click(monthSegment);
|
||||||
expect(monthSegment).toHaveFocus();
|
expect(monthSegment).toHaveFocus();
|
||||||
@@ -322,9 +319,8 @@ describe("<DatePicker/>", () => {
|
|||||||
/>
|
/>
|
||||||
</CunninghamProvider>,
|
</CunninghamProvider>,
|
||||||
);
|
);
|
||||||
const [monthSegment, daySegment, yearSegment] = await screen.findAllByRole(
|
const [monthSegment, daySegment, yearSegment] =
|
||||||
"spinbutton",
|
await screen.findAllByRole("spinbutton")!;
|
||||||
)!;
|
|
||||||
// Select the first segment, month one.
|
// Select the first segment, month one.
|
||||||
await user.click(monthSegment);
|
await user.click(monthSegment);
|
||||||
expect(monthSegment).toHaveFocus();
|
expect(monthSegment).toHaveFocus();
|
||||||
|
|||||||
@@ -23,8 +23,11 @@ import {
|
|||||||
import { convertDateValueToString } from ":/components/Forms/DatePicker/utils";
|
import { convertDateValueToString } from ":/components/Forms/DatePicker/utils";
|
||||||
|
|
||||||
export type DatePickerAuxSubProps = FieldProps & {
|
export type DatePickerAuxSubProps = FieldProps & {
|
||||||
|
// eslint-disable-next-line react/no-unused-prop-types
|
||||||
label?: string;
|
label?: string;
|
||||||
|
// eslint-disable-next-line react/no-unused-prop-types
|
||||||
minValue?: string;
|
minValue?: string;
|
||||||
|
// eslint-disable-next-line react/no-unused-prop-types
|
||||||
maxValue?: string;
|
maxValue?: string;
|
||||||
disabled?: boolean;
|
disabled?: boolean;
|
||||||
name?: string;
|
name?: string;
|
||||||
|
|||||||
Reference in New Issue
Block a user