lint Command - Medusa CLI Reference

Note: This command is available since Medusa v2.16.0.

Lint your project using its ESLint configuration.

The command requires a flat ESLint config file (eslint.config.js, eslint.config.mjs, or similar). Config detection uses ESLint's own resolution, which walks ancestor directories, so a config at a monorepo root applies to nested projects. If no config file is found, the command exits with an error.

The eslint package must be installed in your project. It is a peer dependency of @medusajs/eslint-plugin.

Arguments#

Argument

Description

[paths...]

Files or directories to lint. Defaults to the whole project.

Options#

Option

Description

Default

--fix

Auto-fix lint issues where possible.

false

--quiet

Report lint errors only, suppressing warnings.

false

Exit Codes#

The command exits with code 1 when lint errors are found. It exits with code 0 when only warnings are produced or no issues are found.

Was this page helpful?
Ask Bloom
For assistance in your development, use Claude Code Plugins or Docs MCP server in Cursor, VSCode, etc...FAQ
What is Medusa?
How can I create a module?
How can I create a data model?
How do I create a workflow?
How can I extend a data model in the Product Module?
Recipes
How do I build a marketplace with Medusa?
How do I build digital products with Medusa?
How do I build subscription-based purchases with Medusa?
What other recipes are available in the Medusa documentation?
Chat is cleared on refresh
Line break
⇧↵