{"record":{"id":"c44dfc04c98f6cc6","repo":"medusajs/medusa","slug":"lint-produced-result-warningcount-warning-s","errorCode":null,"errorMessage":"Lint produced ${result.warningCount} warning(s).","messagePattern":"Lint produced (.+?) warning\\(s\\)\\.","errorType":"console","errorClass":null,"httpStatus":null,"severity":"warning","filePath":"packages/medusa/src/commands/lint.ts","lineNumber":56,"sourceCode":"    logger.error(\n      \"No eslint.config.js found. Add one that extends `@medusajs/eslint-plugin` to lint this project.\"\n    )\n    process.exit(1)\n  }\n\n  const result = outcome.result\n\n  if (result.errorCount > 0 || result.warningCount > 0) {\n    process.stdout.write(result.formatted)\n  }\n\n  if (result.errorCount > 0) {\n    logger.error(`Lint failed with ${result.errorCount} error(s).`)\n    process.exit(1)\n  }\n\n  if (result.warningCount > 0) {\n    logger.warn(`Lint produced ${result.warningCount} warning(s).`)\n    return\n  }\n\n  logger.info(\"No lint issues found.\")\n}\n","sourceCodeStart":38,"sourceCodeEnd":62,"githubUrl":"https://github.com/medusajs/medusa/blob/5e06e544a296b9033f20f71f11c559f81a0e5739/packages/medusa/src/commands/lint.ts#L38-L62","documentation":"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.","triggerScenarios":"Running `medusa lint` (packages/medusa/src/commands/lint.ts) on a codebase whose ESLint run has 0 errors and >=1 warnings.","commonSituations":"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.","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"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"const result = await lintFiles(files)\nif (result.warningCount > 0) {\n  // treat as failure or auto-fix before shipping\n  console.warn(`Lint produced ${result.warningCount} warning(s).`)\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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"],"tags":["cli","eslint","lint","developer-experience"],"backgroundTag":"lint-warnings-present","analyzedSha":"5e06e544a296b9033f20f71f11c559f81a0e5739","analyzedAt":"2026-08-27T07:24:39.599Z","schemaVersion":2},"datasetVersion":"2026-08-27T08:17:20.692Z"}