🚨(lint) update file for prettier 3.0.0

Prettier 3.0.0 comes with new standards so we need to upgrade our files
to comply with it.
This commit is contained in:
Nathan Vasse
2023-07-18 15:43:56 +02:00
committed by NathanVss
parent 5f63c2a606
commit d85f9edac8
61 changed files with 421 additions and 419 deletions

View File

@@ -35,7 +35,7 @@ describe("<Input/>", () => {
<div>
<Input label="First name" />
<Input label="Second name" />
</div>
</div>,
);
const input: HTMLInputElement = screen.getByRole("textbox", {
@@ -67,14 +67,14 @@ describe("<Input/>", () => {
render(<Input label="First name" state="success" />);
expect(document.querySelector(".c__field--success")).toBeInTheDocument();
expect(
document.querySelector(".c__input__wrapper--success")
document.querySelector(".c__input__wrapper--success"),
).toBeInTheDocument();
});
it("renders with state=error", async () => {
render(<Input label="First name" state="error" />);
expect(document.querySelector(".c__field--error")).toBeInTheDocument();
expect(
document.querySelector(".c__input__wrapper--error")
document.querySelector(".c__input__wrapper--error"),
).toBeInTheDocument();
});
it("renders disabled", async () => {
@@ -84,7 +84,7 @@ describe("<Input/>", () => {
name: "First name",
});
expect(
document.querySelector(".c__input__wrapper--disabled")
document.querySelector(".c__input__wrapper--disabled"),
).toBeInTheDocument();
expect(input.value).toEqual("");
// Disabled inputs should not be able to type.
@@ -96,7 +96,7 @@ describe("<Input/>", () => {
<Input
label="First name"
icon={<span className="material-icons">apartment</span>}
/>
/>,
);
expect(document.querySelector(".material-icons")).toBeInTheDocument();
});
@@ -105,7 +105,7 @@ describe("<Input/>", () => {
<Input
label="First name"
rightIcon={<span className="material-icons">apartment</span>}
/>
/>,
);
expect(document.querySelector(".material-icons")).toBeInTheDocument();
});
@@ -115,7 +115,7 @@ describe("<Input/>", () => {
label="First name"
rightIcon={<span className="material-icons">apartment</span>}
text="Some text"
/>
/>,
);
screen.getByText("Some text");
});
@@ -125,7 +125,7 @@ describe("<Input/>", () => {
label="First name"
rightIcon={<span className="material-icons">apartment</span>}
rightText="Some text right"
/>
/>,
);
screen.getByText("Some text right");
});

View File

@@ -42,7 +42,7 @@ export const Input = forwardRef<InputRefType, Props>(
charCounterMax,
...props
}: Props,
ref
ref,
) => {
const classes = ["c__input"];
if (className) {
@@ -100,7 +100,7 @@ export const Input = forwardRef<InputRefType, Props>(
"c__input__wrapper--" + state,
{
"c__input__wrapper--disabled": props.disabled,
}
},
)}
onClick={() => {
inputRef.current?.focus();
@@ -139,5 +139,5 @@ export const Input = forwardRef<InputRefType, Props>(
</div>
</Field>
);
}
},
);