Closed as not planned
Description
Description
The built-in Node.js node:assert
module is considered "legacy" and node:assert/strict
is the non-legacy module. See the docs here: https://nodejs.org/api/assert.html#legacy-assertion-mode.
In particular, those docs note that the legacy node:assert
module may produce unexpected, rather absurd, results.
Fail
import assert from 'node:assert'
import assert from 'assert'
Pass
import assert from 'node:assert/strict'
import assert from 'assert/strict'
Proposed rule name
prefer-node-assert-strict, prefer-strict-node-assert, prefer-strict-node-assert-module, prefer-strict-node-import
Additional Info
No response