Enable more oxlint rules (#34189)
* Fix type imports * Fix jsdoc * Fixup types * Fix stray awaits on non-thenables * Fixup imports * Fix splats * Fix this-context on callbacks * Memoise react contexts * Prefer find/flatMap * Make oxlint happier about our React keys * Avoid unsafe default function params * Fixup jsdoc * Fixup contexts * Switch from eslint to oxlint * Some oxlint-related tweaks * Iterate * Partial revert to defer some changes and shrink diff * Iterate * Add eslint-plugin-element-call and enable the copyright rule * Set strictStorePkgContentCheck * Iterate * Enable forwardRef oxlint rule * Enable no-unused-vars oxlint rule * Enable no-implied-eval oxlint rule * Enable no-duplicate-type-constituents oxlint rule * Enable explicit-length-check oxlint rule * Enable prefer-number-properties oxlint rule * Enable no-callback-in-promise oxlint rule * Enable no-require-imports oxlint rule * Remove disablement of most unicorn oxlint rules * Enable no-conditional-tests oxlint rule * Enable promise-valid-params oxlint rule * Enable require-unicode-regexp oxlint rule * Remove max-len comments as we use oxfmt for formatting * Enable majority of oxlint `suspicious` rules * Iterate * Fix oxlint type-aware lint running without dependencies built
This commit is contained in:
@@ -57,7 +57,7 @@ const TEST_VECTORS = [
|
||||
"bWnSXS9oymiqwUIGs08sXI33ZA==\n" +
|
||||
"-----END MEGOLM SESSION DATA-----",
|
||||
],
|
||||
];
|
||||
] as const;
|
||||
|
||||
function stringToArray(s: string): ArrayBuffer {
|
||||
return new TextEncoder().encode(s).buffer as ArrayBuffer;
|
||||
@@ -120,20 +120,9 @@ cissyYBxjsfsAn
|
||||
);
|
||||
});
|
||||
|
||||
// TODO find a subtlecrypto shim which doesn't break this test
|
||||
it.skip("should decrypt a range of inputs", function () {
|
||||
function next(i: number): Promise<string | undefined> | undefined {
|
||||
if (i >= TEST_VECTORS.length) {
|
||||
return;
|
||||
}
|
||||
|
||||
const [plain, password, input] = TEST_VECTORS[i];
|
||||
return MegolmExportEncryption.decryptMegolmKeyFile(stringToArray(input), password).then((decrypted) => {
|
||||
expect(decrypted).toEqual(plain);
|
||||
return next(i + 1);
|
||||
});
|
||||
}
|
||||
next(0);
|
||||
it.skip.each(TEST_VECTORS)("should decrypt a range of inputs", async (plain, password, input) => {
|
||||
const decrypted = await MegolmExportEncryption.decryptMegolmKeyFile(stringToArray(input), password);
|
||||
expect(decrypted).toEqual(plain);
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
@@ -647,9 +647,9 @@ describe("HTMLExport", () => {
|
||||
await exporter.export();
|
||||
const html = await getMessageFile(exporter).text();
|
||||
|
||||
expect(html).not.toContain(`${name}`);
|
||||
expect(html).toContain(`${escapeHtml(name)}`);
|
||||
expect(html).not.toContain(`${topic}`);
|
||||
expect(html).not.toContain(name);
|
||||
expect(html).toContain(escapeHtml(name));
|
||||
expect(html).not.toContain(topic);
|
||||
expect(html).toContain(`Topic: ${escapeHtml(topic)}`);
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user