From 4e7691139feec02654297eb16aea22b6fb306f1f Mon Sep 17 00:00:00 2001 From: Houssein Djirdeh Date: Thu, 19 Aug 2021 13:16:59 -0400 Subject: [PATCH] [ESLint] Adds `process.exit` to `next lint` success output (#28299) This PR ensures that `next lint` always exits after the process is complete. This fixes #28194. --- packages/next/cli/next-lint.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/next/cli/next-lint.ts b/packages/next/cli/next-lint.ts index 987ba5773ba120c..da80f1b614ffc11 100755 --- a/packages/next/cli/next-lint.ts +++ b/packages/next/cli/next-lint.ts @@ -198,9 +198,9 @@ const nextLint: cliCommand = async (argv) => { } if (lintOutput) { - console.log(lintOutput) + printAndExit(lintOutput, 0) } else if (lintResults && !lintOutput) { - console.log(chalk.green('✔ No ESLint warnings or errors')) + printAndExit(chalk.green('✔ No ESLint warnings or errors'), 0) } }) .catch((err) => {