Tweak oxlint config & delint our code (#34301)
* Remove stale max-len disablements * Remove stale camelCase & naming-convention disablements * Remove stale ban-ts-comment disablements * Remove stale no-var disablements * Remove stale no-empty-property disablements * Remove stale react rule disablements * Remove stale no-constant-condition disablements * Remove stale no-unused-vars disablements * Remove stale disablements for disabled rules * fixup camelcase * Remove dead code * Tidy code * Tweak oxlint config
This commit is contained in:
@@ -84,7 +84,6 @@ describe("PictureInPictureDragger", () => {
|
||||
<PictureInPictureDragger>
|
||||
{[
|
||||
({ onStartMoving }) => (
|
||||
// eslint-disable-next-line jsx-a11y/click-events-have-key-events
|
||||
<div onMouseDown={onStartMoving} onClick={clickSpy}>
|
||||
Hello
|
||||
</div>
|
||||
|
||||
@@ -62,7 +62,6 @@ describe("<Pill>", () => {
|
||||
} as PillProps;
|
||||
// wrap Pill with a div to allow testing of event bubbling
|
||||
renderResult = render(
|
||||
// eslint-disable-next-line jsx-a11y/click-events-have-key-events
|
||||
<SDKContext.Provider value={mockSdkContext}>
|
||||
<div onClick={pillParentClickHandler}>
|
||||
<Pill {...withDefault} />
|
||||
|
||||
@@ -214,10 +214,8 @@ describe("MessageComposer", () => {
|
||||
|
||||
it(`should${value ? "" : " not"} display the button`, () => {
|
||||
if (value) {
|
||||
// eslint-disable-next-line jest/no-conditional-expect
|
||||
expect(screen.getByLabelText(buttonLabel)).toBeInTheDocument();
|
||||
} else {
|
||||
// eslint-disable-next-line jest/no-conditional-expect
|
||||
expect(screen.queryByLabelText(buttonLabel)).not.toBeInTheDocument();
|
||||
}
|
||||
});
|
||||
@@ -240,10 +238,8 @@ describe("MessageComposer", () => {
|
||||
|
||||
it(`should${!value || "not"} display the button`, () => {
|
||||
if (!value) {
|
||||
// eslint-disable-next-line jest/no-conditional-expect
|
||||
expect(screen.getByLabelText(buttonLabel)).toBeInTheDocument();
|
||||
} else {
|
||||
// eslint-disable-next-line jest/no-conditional-expect
|
||||
expect(screen.queryByLabelText(buttonLabel)).not.toBeInTheDocument();
|
||||
}
|
||||
});
|
||||
|
||||
-2
@@ -347,10 +347,8 @@ describe("SendWysiwygComposer", () => {
|
||||
expect(leftIcon).toBeInTheDocument();
|
||||
expect(leftIcon).toHaveClass("mx_E2EIcon");
|
||||
if (expectedLabel) {
|
||||
// eslint-disable-next-line jest/no-conditional-expect
|
||||
expect(leftIcon).toHaveAccessibleName(expectedLabel);
|
||||
} else {
|
||||
// eslint-disable-next-line jest/no-conditional-expect
|
||||
expect(leftIcon.querySelector("svg")).not.toBeInTheDocument();
|
||||
}
|
||||
});
|
||||
|
||||
-1
@@ -536,7 +536,6 @@ describe("WysiwygComposer", () => {
|
||||
await waitFor(() => {
|
||||
const selection = document.getSelection();
|
||||
if (selection) {
|
||||
// eslint-disable-next-line jest/no-conditional-expect
|
||||
expect(selection.focusNode?.textContent).toEqual("other");
|
||||
}
|
||||
});
|
||||
|
||||
@@ -53,7 +53,6 @@ const createTransitionEndEvent = (): Event => {
|
||||
// TransitionEvent constructor does not exist.
|
||||
// This is needed because of the following check
|
||||
// https://github.com/atlassian/react-beautiful-dnd/blob/master/src/view/draggable/draggable.jsx#L130
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
(event as any).propertyName = "transform";
|
||||
|
||||
return event;
|
||||
|
||||
Reference in New Issue
Block a user