For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt, and this page is available as Markdown at /guide/cli/check.md.
close
  • English
  • check

    The rs check command runs lint and formatting checks for the current project, with optional TypeScript type checking.

    Usage

    rs check [options] [files...]

    Pass files or directories to limit both linting and formatting to those paths:

    rs check src/index.ts packages/utils

    Checks

    By default, rs check runs rs lint followed by rs fmt --check. It reports issues without modifying files.

    Formatting is still checked if linting or type checking reports errors. The command exits successfully only when all enabled checks pass.

    Options

    --fix

    Automatically fix linting and formatting issues:

    rs check --fix

    This first runs rs lint --fix to apply available lint fixes. If linting and any enabled type checking pass, it then runs rs fmt --write to format the updated files.

    --type-check

    Add --type-check to enable TypeScript type checking alongside linting:

    rs check --type-check

    -h, --help

    Display usage and option information without running checks:

    rs check --help

    Configuration

    rs check uses the linting configuration from define.lint() and the formatting configuration from define.fmt().