useNodeAssertStrict
Diagnostic Category: lint/style/useNodeAssertStrict
Since: v1.6.0
Promotes the usage of node:assert/strict
over node:assert
.
If you prefer stricter assertions when using the Node.js assertion module, the package node:assert/strict
exposes a set of alias for stricter assertions.
Examples
Section titled ExamplesInvalid
Section titled Invalidcode-block.js:1:25 lint/style/useNodeAssertStrict FIXABLE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
⚠ Use node:assert
/strict instead.
> 1 │ import * as assert from “node:assert
”
│ ^^^^^^^^^^^^^
2 │
ℹ The use of stricter assertion is preferred.
ℹ Safe fix: Replace with node:assert
/strict.
1 │ import·*·as·assert·from·“node:assert
/strict”
│ +++++++