lpm lint
Find JavaScript and TypeScript code errors with managed Oxlint.
lpm lint runs Oxlint in the current directory or selected workspace members.
lpm lint [OPTIONS] [ARGS]...Quickstart
lpm lint
lpm lint src/
lpm lint -- --fixLPM CLI downloads and checks the managed Oxlint binary on first use. Later runs reuse that installation.
The command uses Oxlint rules and configuration. To run a package.json script named lint, use lpm run lint.
Configuration
Put rules in .oxlintrc.json or .oxlintrc.jsonc. Pass a different file with Oxlint's --config option:
lpm lint -- --config .oxlintrc.jsonc src/
lpm lint -- --initThe managed native binary supports JSON and JSONC configuration. JavaScript and TypeScript configuration files require Oxlint's Node.js entry point.
Pin the managed binary in lpm.json:
{
"tools": {
"oxlint": "1.89.0"
}
}The pin selects an exact version. Runs from a subdirectory still use the project pin. A workspace member inherits the root pin unless its own lpm.json overrides it.
Without a pin, LPM CLI selects its bundled version or a newer version previously installed by lpm plugin update oxlint. Normal lint runs do not check for newer releases.
An update does not change a project pin. Edit or remove tools.oxlint to change that selection. There is no command-line version override.
Invalid configuration stops a single-package run. In a workspace, invalid root configuration stops all members. Invalid member configuration fails that member while others continue.
The command does not use tasks.lint or env.lint from lpm.json.
Examples
Fix supported errors
lpm lint -- --fix src/Oxlint controls which fixes it applies. Review the changed files before committing them.
Fail CI on warnings
lpm lint -- --deny-warnings
lpm lint --filter web --fail-if-no-match -- --deny-warningsThese commands need no prompt. A missing managed binary still requires a network download.
Select rules or inspect options
lpm lint -- -D correctness src/
lpm lint -- --rules
lpm lint -- --helpPut LPM CLI flags before the forwarded arguments. Use -- to pass flags that must reach Oxlint unchanged.
Type-aware linting requires Oxlint's separate tsgolint helper. LPM CLI's managed Oxlint installation does not include that helper.
Workspaces
lpm lint --all
lpm lint --filter web --filter api
lpm lint --filter './apps/*'
lpm lint --filter-prod '...shared'
lpm lint --affected --base origin/mainSelected dependencies run before their dependents. Independent members can run concurrently, up to the host CPU count. Each process uses its member directory.
LPM CLI prepares requested tool versions before starting member processes. Members with the same requested pin share a prepared binary.
Members can override the root version without changing other members.
--all conflicts with --filter, --filter-prod, and --affected. Filters and --affected combine their selections.
An empty selection succeeds without running Oxlint. Add --fail-if-no-match when a selected member must exist. With --affected, this flag also fails when nothing changed.
See workspace filters for dependency closures, exclusions, path patterns, and Git references.
JSON and exit codes
lpm lint --json -- --deny-warnings
lpm lint --all --jsonBoth modes emit one JSON object. Each member has a name, result, exit code, and duration. Failed members also include captured diagnostics.
{
"success": false,
"packages": 1,
"succeeded": 0,
"failed": 1,
"duration_ms": 18,
"members": [
{
"name": "web",
"success": false,
"exit_code": 1,
"duration_ms": 17,
"stdout": "lint diagnostics"
}
]
}A launch failure has exit_code: null and an error message. Errors before member execution can use the standard error object.
LPM CLI retains at most 10 MiB per output stream, with a truncation marker for longer diagnostics. Successful members omit captured output.
Single-package runs preserve Oxlint's exit code. Workspace runs exit 1 if any member fails. On Unix, interruption stops active tool descendants and exits 130 for SIGINT or 143 for SIGTERM.
Cache and recovery
Managed binaries normally live under ~/.lpm/plugins/oxlint/<version>/<platform>/. LPM_HOME changes the base directory.
If a cached binary fails its integrity check, LPM CLI downloads and checks it again. To force a fresh installation:
LPM_FORCE_TOOL_INSTALL=1 lpm lintIf configuration parsing fails, correct lpm.json before retrying. If a download fails, check network access and the requested version.
Flags
| Flag | Effect |
|---|---|
--all | Run in every workspace member. Conflicts with filters and --affected. |
--filter <FILTER> | Select members with a repeatable workspace filter. |
--filter-prod <FILTER_PROD> | Select members with production-only dependency closures. |
--affected | Select changed members and their affected dependents. |
--base <BASE> | Git base for --affected. Default: main. |
--changed-files-ignore-pattern <PATTERN> | Ignore matching changed paths. Repeatable. |
--test-pattern <PATTERN> | Treat matching changes as tests when calculating dependent selection. Repeatable. |
--fail-if-no-match | Fail when the workspace selection is empty. |
[ARGS]... | Arguments forwarded to Oxlint. Use -- to separate them from LPM CLI flags. |
See global flags for --json and other shared options.
See also
lpm fmt— format source files.lpm check— check TypeScript types.lpm plugin— inspect and update managed tools.- Built-in tools — tool selection and installation.