Pular para o conteúdo

useNodeAssertStrict

Este conteúdo não está disponível em sua língua ainda.

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.

import * as assert from "node:assert"
code-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
+++++++
import * as assert from "node:assert/strict"