Add lint rules from eslint-plugin-unicorn.

This commit is contained in:
David Anson 2020-09-06 20:34:10 -07:00
parent 0f4745efe3
commit 5ab938a6ab
11 changed files with 96 additions and 31 deletions

View file

@ -196,7 +196,8 @@
if (hashPrefix === decodedHash.substring(0, hashPrefix.length)) {
markdown.value = decodedHash.substring(hashPrefix.length);
}
} catch (ex) {
/* eslint-disable-next-line unicorn/prefer-optional-catch-binding */
} catch (error) {
// Invalid
}
}
@ -205,7 +206,8 @@
try {
/* eslint-disable-next-line no-new */
new URL(rulesMd);
} catch (ex) {
/* eslint-disable-next-line unicorn/prefer-optional-catch-binding */
} catch (error) {
markdown.value = [
"# Sorry",
"",