Fix lints

This commit is contained in:
Mike Vitousek
2024-02-09 14:50:06 -08:00
parent 19476aa5f6
commit 48024b76bb
4 changed files with 25 additions and 22 deletions
@@ -199,7 +199,7 @@ export function compileProgram(
const suppressions = findProgramSuppressions(
pass.comments,
options.eslintSuppressionRules ?? DEFAULT_ESLINT_SUPPRESSIONS,
options.flowSuppressions,
options.flowSuppressions
);
const lintError = suppressionsToCompilerError(suppressions);
let hasCriticalError = lintError != null;
@@ -224,8 +224,10 @@ export function compileProgram(
* Program node itself. We need to figure out whether an eslint suppression range
* applies to this function first.
*/
const suppressionsInFunction =
filterSuppressionsThatAffectFunction(suppressions, fn);
const suppressionsInFunction = filterSuppressionsThatAffectFunction(
suppressions,
fn
);
if (suppressionsInFunction.length > 0) {
handleError(lintError, pass, fn.node.loc ?? null);
}