www/apps/resources/app/medusa-cli/commands/lint/page.mdx
import { Table } from "docs-ui"
export const metadata = {
title: lint Command - Medusa CLI Reference,
}
This command is available since Medusa v2.16.0.
</Note>Lint your project using its ESLint configuration.
npx medusa lint
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.
`[paths...]`
</Table.Cell>
<Table.Cell>
Files or directories to lint. Defaults to the whole project.
</Table.Cell>
</Table.Row>
</Table.Body>
</Table> `--fix`
</Table.Cell>
<Table.Cell>
Auto-fix lint issues where possible.
</Table.Cell>
<Table.Cell>
`false`
</Table.Cell>
</Table.Row>
<Table.Row>
<Table.Cell>
`--quiet`
</Table.Cell>
<Table.Cell>
Report lint errors only, suppressing warnings.
</Table.Cell>
<Table.Cell>
`false`
</Table.Cell>
</Table.Row>
</Table.Body>
</Table>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.