diff options
author | Gibson Fahnestock <gib@uk.ibm.com> | 2017-01-09 02:23:34 +0300 |
---|---|---|
committer | Italo A. Casas <me@italoacasas.com> | 2017-01-30 20:08:41 +0300 |
commit | c217b438f2793cbc9c85ae4bf9ba981fcb8f1f5a (patch) | |
tree | de343702f63bae3835329c582191cb2e05750663 /lib/assert.js | |
parent | 51f4c8bf5cd80d41071589ecafacbad7053f02d1 (diff) |
assert, tools: enforce strict (not)equal in eslint
Extend no-restricted-properties to catch use of assert.equal() and
assert.notEqual() and require assert.strictEqual() or
assert.notStrictEqual() instead.
Also update the eslint-ignore in lib/assert.js to avoid
assert.equal/notEqual linter errors in their definitions.
PR-URL: https://github.com/nodejs/node/pull/10698
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com>
Reviewed-By: Sakthipriyan Vairamani <thechargingvolcano@gmail.com>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Teddy Katz <teddy.katz@gmail.com>
Diffstat (limited to 'lib/assert.js')
-rw-r--r-- | lib/assert.js | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/assert.js b/lib/assert.js index 892df6d9a0f..7f69ba0c60e 100644 --- a/lib/assert.js +++ b/lib/assert.js @@ -109,7 +109,7 @@ assert.ok = ok; // The equality assertion tests shallow, coercive equality with // ==. // assert.equal(actual, expected, message_opt); - +/* eslint-disable no-restricted-properties */ assert.equal = function equal(actual, expected, message) { if (actual != expected) fail(actual, expected, message, '==', assert.equal); }; @@ -127,7 +127,6 @@ assert.notEqual = function notEqual(actual, expected, message) { // The equivalence assertion tests a deep equality relation. // assert.deepEqual(actual, expected, message_opt); -/* eslint-disable no-restricted-properties */ assert.deepEqual = function deepEqual(actual, expected, message) { if (!_deepEqual(actual, expected, false)) { fail(actual, expected, message, 'deepEqual', assert.deepEqual); |