lint Command - Medusa CLI Reference
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 |
|---|---|
| Files or directories to lint. Defaults to the whole project. |
Options#
Option | Description | Default |
|---|---|---|
| Auto-fix lint issues where possible. |
|
| Report lint errors only, suppressing warnings. |
|
Exit Codes#
The command exits with code when lint errors are found. It exits with code when only warnings are produced or no issues are found.