> For AI agents: the complete documentation index is available at /llms.txt, the full documentation bundle is available at /llms-full.txt.

# check

The `rs check` command combines linting, formatting, and optional TypeScript type checking for the current project. By default, it runs [`rs lint`](/guide/cli/lint.md) followed by [`rs fmt --check`](/guide/cli/fmt.md#--check).

## Usage

```bash
rs check [options] [files...]
```

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

```bash
rs check src/index.ts packages/utils
```

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

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

## Checks

Running `rs check` is equivalent to:

```bash
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:

```bash
rs check --fix
```

This is equivalent to:

```bash
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:

```bash
rs check --type-check
```

This is equivalent to:

```bash
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:

```bash
rs check --help
```

## Configuration

`rs check` has no separate `define.check()` configuration. It uses the linting configuration from [`define.lint()`](/guide/configuration.md#define-lint) and the formatting configuration from [`define.fmt()`](/guide/configuration.md#define-fmt).
