CLI Reference
Usage
Options
File and Directory Arguments
You can pass file paths, directory paths, quoted glob patterns, or a mix of them. Rslint discovers the config file by walking upward from the target location.
When no arguments are given, rslint scopes linting to the current working directory.
Wrap glob patterns in quotes so rslint expands them. Relative paths and patterns start from the directory where you run the command. Absolute paths and patterns also work.
"src/*.ts" checks files directly in src, while "src/**/*.ts" also checks subdirectories. Patterns also support ? for a single character, [ab] for either character, {js,ts} for alternatives, and @(client|server) to match either name.
If a file or directory with the given name exists, rslint uses that exact path, even if its name contains glob characters. # is an ordinary filename character.
When you pass several inputs, each file is checked once, even when several inputs match it. Your config's files and ignores settings and .gitignore still apply. To exclude files, use ignores in your config. A !pattern input does not remove files selected by other inputs.
The JavaScript API's lintFiles() follows the same matching rules.
Config Discovery
For each target file or directory, rslint searches for rslint.config.{js,mjs,ts,mts} starting from that location and walking upward to the filesystem root. The nearest successfully loaded config is used. If a discovered config cannot be loaded, rslint warns and tries its next ancestor; the command fails when none of the discovered candidates can be loaded.
.cjs and .cts config files are not discovered automatically, but remain supported when passed explicitly with --config or -c.
In monorepo setups, rslint automatically discovers nested configs and applies the nearest one to each file:
Use --config or -c to override automatic config discovery:
Rule Overrides
Use --rule to override a rule's severity or options from the command line, without modifying your config file. This is useful for quick debugging, CI one-offs, or temporarily enabling/disabling rules.
--rule can appear anywhere in the argument list — before or after file paths and other flags:
Behavior:
- CLI rules have the highest precedence and override all config file entries, including per-file overrides.
- When the same rule is specified multiple times, the last one wins.
- Rules that don't exist in the registry are silently ignored.
Rule Timing
Use --timing to print a per-rule timing table after the run, sorted by total time. Pass a number to keep only the top N rules (all, the default, prints every rule):
- Source —
nativefor built-in Go rules,jsfor rules run through the ESLint plugin compatibility layer. - Time (ms) — total time spent in the rule across all files: building its listeners plus running them during AST traversal, including diagnostic and fix construction.
- Files — number of distinct files the rule executed on.
- Relative — the rule's share of the summed rule time.
The table is written to stderr, so machine-readable output formats such as jsonline stay parseable. Files are linted by parallel workers, so summed rule time can exceed the run's wall-clock time. With --fix, times accumulate across all re-lint passes. Rules executed through the ESLint plugin compatibility layer are included: their time is measured inside the Node.js worker (rule create plus listener invocations), excluding parse and IPC overhead.