loadwise.config.json, sets the defaults for every checker. loadwise check looks for it in the checked directory and each checker command (loadwise perf, rel, maint, sec or a11y) in the project folder; --config <file> on check (--loadwise-config <file> on the checker commands) names another one. Add $schema for editor completion and validation.
Select a .jsonc file explicitly, here or as a --policy or maint --config policy file, to use // line comments or /* … */ block comments. Keep the rest of the file in strict JSON syntax. Syntax errors identify the file and include the line and column when available.
checkersis the default selection forloadwise check;--onlyand--skipoverride it.ignoreexcludes paths from scanning, reporting and project-wide checks such as duplicate detection. Globs are relative to the config file.*matches within a folder,**any depth,?one character and{a,b}alternatives. A folder pattern also covers its descendants. The last matching entry wins, so["generated", { "include": "generated/reviewed" }]keeps the reviewed subtree. A leading!in a string pattern matches a literal!. Git and built-in exclusions still apply.rulessets each rule to"off"(its findings are dropped),"warn"(reported, but never changes the exit code) or"error"(reported findings always count, even under--fail-on contract). A hidden contextual finding is not reported, so it never counts. The object form{ "level": "warn", "options": { ... } }sets thresholds for rules that take them, such asmaxDepthormaxComplexity; the config schema lists each rule’s options, and an unknown option exits with code 2.overridesapplyrulesto the files matchingfiles; a later override wins over an earlier one and overrules.- Standalone
perf polyglot,rel polyglot, andsec polyglotaccept their reported rule IDs inrulesandoverrides. - For JavaScript and TypeScript maintainability checks,
maxDepth,maxComplexity,maxParams,large-module.maxLines, andlarge-class.maxMethods/maxLinesare inclusive maxima. A value above the configured maximum triggers the rule. Module and class line limits count lines containing code. Matching file overrides take precedence over top-level rule options, then the legacymaintainability.limitssettings and built-in defaults apply. With no new options, deep control flow starts at four nested levels, high branch complexity at a weighted score of 15, and class length in lines is unrestricted. performanceholds the query policy (see Project-defined access policy), andmaintainabilityholds the maintainability policy (see Project rules).--policy file.jsonand--config file.jsonname a policy file for one run and beat the config sections.--ignore <rule-id>(repeatable, oncheckand every checker) adds a rule to"off"for one run and beats the config.--workspace <name|path>(repeatable) limits every checker to some workspace packages.
polyglot commands. rel contracts reads loadwise.config.json in the current directory, or the file named by --loadwise-config <file>, and applies ignore and the rule levels in rules and overrides. An ignored file can still supply inherited properties when an included NestJS DTO extends a class from that file. In that case, any finding points to the included DTO. rel migrations, perf db, perf traces and perf plan do not read the config.
Shared configuration
Set"extends": "../../config/shared.json" to load a local parent. Paths are relative to the config that declares them. Each parent’s ignore and overrides patterns match from that parent’s directory. Ignore lists are cumulative, and negations apply within their own list.
For rule levels, the child takes precedence over the parent, including matching parent overrides. Matching overrides in a given file take precedence over its base rules. Rule options merge by key. The nearest config that sets checkers, performance, maintainability, or security supplies that section. Rule packs load from their declaring files in parent-to-child order. Children can configure inherited rule IDs, and duplicate IDs are rejected.
Missing parents, cycles, absolute paths, and URLs report configuration errors. Editor scans read parents within the opened workspace or its enclosing Git repository. Saving a watched parent refreshes diagnostics. The editor still uses its default checkers unless you enable project checker selection. Cache keys account for the inherited policies.
Local declarative rule packs
Set"rulePacks": ["config/team.loadwise-rules.json"] in loadwise.config.json to include a local rule pack in maintainability and unified scans. Each path is relative to the config file and must resolve inside its directory. Pack files contain versioned JSON data.
Source checks validate declared packs while loading the shared configuration. The maintainability cache fingerprints the loaded pack rules before starting a scan and stores the report only when the checker used the same pack rules. An invalid configuration or a missing explicitly selected configuration bypasses the cache so the checker reports the current error.
project-shop--no-legacy-sdk. It appears in unified JSON, SARIF, editor diagnostics, and baselines. warn is the default level and error fails a scan. Rule packs can define this import matcher with literal strings. Duplicate IDs, unknown fields and unsupported rule kinds fail configuration validation.
Use the full ID in rules to change its level, and in overrides[].rules to set a level for matching files. Run loadwise check --ignore project-shop--no-legacy-sdk to hide it for a single scan.
Security review guidance
Register organization-specific imports undersecurity.trustedBindings. The security checker matches the exact module specifier and exported name in a value import, including aliases and namespace access. Use default for a default import.
auth-route-middlewarelooks for a directly imported middleware value in an argument before the final handler of a credential route. It supports inline placement in the route registration.redirect-target-predicatelooks for a direct call with the same stable target identifier used by the redirect. Reaching the redirect must require a truthy result from that predicate.
security.trustedBindings after upgrading every Loadwise CLI that reads the shared config, including CI and editor integrations. Older CLIs reject the top-level security section before running any checker. Before rolling back, restore a config without that section for the older CLI. For a one-off run, select a compatible file with loadwise check --config <file> or pass --loadwise-config <file> to a direct checker command.
Impact levels
Every finding carries an impact level, shown after the rule in text output, where the most severe finding comes first within each file. JSON findings carry it asimpactLevel (impact is the before/after estimate). --min-impact <low|medium|high|critical> reports only findings at that level or above, and the filtered ones do not count toward the exit code; an unknown level exits 2. The rule lists on each checker page give each rule’s default level, and dependency findings use the advisory severity.
critical: data loss or corruption, an outage or a lock risk in production.high: a per-request scaling problem such as an N+1 or query in a loop, a deep offset, a missing foreign-key or filter index, an HTTP call without a timeout, or a dependency cycle with load-time effects.medium: a measurable but local cost, or significant maintainability debt.low: a micro-optimization or a readability issue.