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 combines linting, formatting, and optional TypeScript type checking for the current project. By default, it runs rs lint followed by rs fmt --check.

    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

    The same file arguments are passed to both commands, so the example above is equivalent to:

    rs lint src/index.ts packages/utils && rs fmt --check src/index.ts packages/utils

    Checks

    Running rs check is equivalent to:

    rs lint && rs fmt --check

    Checks run sequentially. If linting fails, rs check stops without running the formatting check. The command exits successfully only when every enabled check passes.

    Options

    --fix

    Automatically fix linting and formatting issues:

    rs check --fix

    This is equivalent to:

    rs lint --fix && rs fmt --write

    If linting still fails after applying available fixes, rs check stops without running the formatter.

    --type-check

    Enable TypeScript type checking as part of linting:

    rs check --type-check

    This is equivalent to:

    rs lint --type-check && rs fmt --check

    Type checking is disabled when this option is omitted.

    -h, --help

    Display usage and option information without running checks:

    rs check --help

    Configuration

    rs check has no separate define.check() configuration. It uses the linting configuration from define.lint() and the formatting configuration from define.fmt().