Update to ESLint 9's "flat" configuration file format.

This commit is contained in:
David Anson 2024-04-20 21:23:06 -07:00
parent 36844eefef
commit c6716f9bac
9 changed files with 155 additions and 191 deletions

View file

@ -267,8 +267,7 @@
if (hashPrefix === decodedHash.substring(0, hashPrefix.length)) {
markdown.value = decodedHash.substring(hashPrefix.length);
}
/* eslint-disable-next-line unicorn/prefer-optional-catch-binding */
} catch (error) {
} catch {
// Invalid
}
}
@ -277,8 +276,7 @@
try {
/* eslint-disable-next-line no-new */
new URL("https://example.com/");
/* eslint-disable-next-line unicorn/prefer-optional-catch-binding */
} catch (error) {
} catch {
markdown.value = [
"# Sorry",
"",

View file

@ -1723,7 +1723,7 @@ function validateRuleList(ruleList, synchronous) {
const allIds = {};
for (const [ index, rule ] of ruleList.entries()) {
const customIndex = index - rules.length;
// eslint-disable-next-line no-inner-declarations, jsdoc/require-jsdoc
// eslint-disable-next-line jsdoc/require-jsdoc
function newError(property, value) {
return new Error(
`Property '${property}' of custom rule at index ${customIndex} is incorrect: '${value}'.`);