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) => {