> 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 runs lint and formatting checks for the current project, with optional TypeScript type checking.

## 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
```

## Checks

By default, `rs check` runs [`rs lint`](/guide/cli/lint.md) followed by [`rs fmt --check`](/guide/cli/fmt.md#--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:

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

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

### `-h, --help`

Display usage and option information without running checks:

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

## Configuration

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