medusajs/medusa · warning

Lint produced ${result.warningCount} warning(s).

Error message

Lint produced ${result.warningCount} warning(s).

What it means

The medusa CLI's lint command runs ESLint over the project and reports: errors cause process.exit(1) with a 'Lint failed' error, while warnings only produce this summary warning and a normal (0) exit. So lint 'passes' with warnings — this message just surfaces the count.

Source

Thrown at packages/medusa/src/commands/lint.ts:56

    logger.error(
      "No eslint.config.js found. Add one that extends `@medusajs/eslint-plugin` to lint this project."
    )
    process.exit(1)
  }

  const result = outcome.result

  if (result.errorCount > 0 || result.warningCount > 0) {
    process.stdout.write(result.formatted)
  }

  if (result.errorCount > 0) {
    logger.error(`Lint failed with ${result.errorCount} error(s).`)
    process.exit(1)
  }

  if (result.warningCount > 0) {
    logger.warn(`Lint produced ${result.warningCount} warning(s).`)
    return
  }

  logger.info("No lint issues found.")
}

View on GitHub (pinned to 5e06e544a2)

Solutions

  1. Run the underlying eslint command directly (e.g. npx eslint .) to list and fix the specific warnings
  2. Fix warnings incrementally — many are auto-fixable with eslint --fix
  3. If certain warnings are intentional, disable them via .eslintrc rules configuration rather than ignoring the count
  4. Treat warnings as errors in CI (--max-warnings 0) to keep them from accumulating
Defensive patterns

Strategy: validation

Validate before calling

const result = await lintFiles(files)
if (result.warningCount > 0) {
  // treat as failure or auto-fix before shipping
  console.warn(`Lint produced ${result.warningCount} warning(s).`)
}

Prevention

When it happens

Trigger: Running `medusa lint` (packages/medusa/src/commands/lint.ts) on a codebase whose ESLint run has 0 errors and >=1 warnings.

Common situations: Deprecation warnings after upgrading Medusa or ESLint plugins; new lint rules introduced in a version bump flagging existing code as warnings; teams treating warnings as acceptable until they accumulate.

Related errors


AI-assisted analysis of medusajs/medusa@5e06e544a2 (2026-08-27). Data as JSON: /api/errors/c44dfc04c98f6cc6. Report an issue: GitHub.