Disable ESLint rule func-style.

This commit is contained in:
David Anson 2021-12-11 21:48:00 -08:00
parent 2056d81682
commit 13e375b281
5 changed files with 1 additions and 12 deletions

View file

@ -586,12 +586,10 @@ function lintContent(
});
}
// Call (possibly external) rule function to report errors
// eslint-disable-next-line func-style
const catchCallsOnError = (error) => onError({
"lineNumber": 1,
"detail": `This rule threw an exception: ${error.message || error}`
});
// eslint-disable-next-line func-style
const invokeRuleFunction = () => rule.function(params, onError);
if (rule.asynchronous) {
// Asynchronous rule, ensure it returns a Promise
@ -666,9 +664,7 @@ function lintContent(
...ruleListAsync,
...ruleListSync
];
// eslint-disable-next-line func-style
const callbackSuccess = () => callback(null, formatResults());
// eslint-disable-next-line func-style
const callbackError =
(error) => callback(error instanceof Error ? error : new Error(error));
try {