Skip to content

Latest commit

聽

History

History
29 lines (18 loc) 路 669 Bytes

File metadata and controls

29 lines (18 loc) 路 669 Bytes

@enormora/node-assert/consistent-import

馃摑 Enforce a consistent Node.js assert import style.

Rule Details

This rule enforces a single import style for the Node.js assert module.

Options

  • style: "strict-module" (default): require node:assert/strict (or assert/strict)
  • style: "base": require node:assert (or assert) and disallow importing { strict }
  • style: "strict-export": require importing { strict } from node:assert (or assert)

Examples for style: "strict-module":

Invalid:

import assert from 'node:assert';

Valid:

import assert from 'node:assert/strict';