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/lint.md.
close
  • English
  • lint

    The rs lint command uses Rslint to lint source code.

    Usage

    rs lint [options] [files...]

    The command loads the lint configuration registered with define.lint().

    Options

    rs lint supports the same command-line options as Rslint. See the Rslint CLI documentation for details.

    Examples:

    # Lint a specific directory
    rs lint src
    
    # Automatically fix problems
    rs lint --fix
    
    # Lint and run TypeScript type checking
    rs lint --type-check

    Configuration

    Configure linting through define.lint() in the Rstack configuration file. It accepts the standard Rslint configuration. A configuration function receives all exports from rstack/lint, so presets and plugins do not need to be imported manually:

    rstack.config.ts
    import { define } from 'rstack';
    
    define.lint(({ js, ts }) => [js.configs.recommended, ts.configs.recommendedTypeChecked]);