consistent-assert
UnreleasedConfiguration
rslint.config.ts
Rule Details
Enforce the explicit node:assert assertion style by preferring assert.ok(value) over calling an imported assert function directly.
Examples of incorrect code:
Examples of correct code:
The rule recognizes default imports from assert, node:assert, assert/strict, and node:assert/strict. It also recognizes default named imports and strict imported from assert or node:assert.
Only direct calls to the imported binding are changed. Other references, namespace imports, type-only imports, and shadowed bindings are left alone.