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:
@@ -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");
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user