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
- Run the underlying eslint command directly (e.g. npx eslint .) to list and fix the specific warnings
- Fix warnings incrementally — many are auto-fixable with eslint --fix
- If certain warnings are intentional, disable them via .eslintrc rules configuration rather than ignoring the count
- 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
- Run eslint --fix regularly and in CI
- Set --max-warnings 0 in CI to prevent accumulation
- Upgrade lint plugins together with Medusa versions and fix new warnings immediately
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
- Warning: could not parse ${candidate}, using default config
- Warning: could not read ${tsconfigBasePath}, using default c
- ts-node cannot be loaded and used, if you are running in pro
- Failed to setup database; install PostgresQL or make sure to
AI-assisted analysis of medusajs/medusa@5e06e544a2 (2026-08-27).
Data as JSON: /api/errors/c44dfc04c98f6cc6.
Report an issue: GitHub.