CLI Reference
Usage
Options
File and Directory Arguments
You can pass file paths, directory paths, or a mix of both. 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.
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.