Skip to content

Latest commit

History

History
33 lines (26 loc) 路 4.59 KB

File metadata and controls

33 lines (26 loc) 路 4.59 KB

NPM Version GitHub Actions status NPM Downloads

eslint-plugin-node-assert

ESLint rules for Node.js assert module.

Rules

馃敡 Automatically fixable by the --fix CLI option.

Name聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽 Description 馃敡
consistent-import Enforce a consistent Node.js assert import style
no-async-function-in-sync-assertion Disallow passing async functions to synchronous Node.js assert methods
no-await-argument-in-rejects Disallow awaiting the argument passed to assert.rejects() and assert.doesNotReject() 馃敡
no-constant-actual Disallow passing a constant value as the first argument to Node.js assert methods 馃敡
no-expected-value-as-message Disallow passing an expected value where a message or error matcher belongs in Node.js assert calls
no-restricted-assertion Disallow configured Node.js assert methods
no-useless-assertion Disallow Node.js assertions whose outcome is fully determined by constant inputs
prefer-comparison-assertion Prefer dedicated equality assertion methods over asserting comparison results 馃敡
prefer-deep-equality Prefer deep equality assertions when comparing object or array literals 馃敡
prefer-match Prefer assert.match() or assert.doesNotMatch() for regular expression assertions 馃敡
prefer-partial-deep-strict-equal Prefer a single partialDeepStrictEqual over multiple consecutive equality assertions on properties of the same object
require-custom-message Require a custom failure message argument in Node.js assert calls
require-error-matcher Require assert.throws() and assert.rejects() to include an error matcher
require-strict Require strict assertion semantics for Node.js assert equality methods 馃敡
require-valid-error-validator-return Require custom Node.js assert error validators to return true when their checks pass