tools: fix object name in prefer-assert-methods.js
PR-URL: https://github.com/nodejs/node/pull/37544 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
This commit is contained in:
parent
03942caf10
commit
54bb7e3bff
@ -12,7 +12,7 @@ function parseError(method, op) {
|
||||
return `'assert.${method}' should be used instead of '${op}'`;
|
||||
}
|
||||
|
||||
const preferedAssertMethod = {
|
||||
const preferredAssertMethod = {
|
||||
'===': 'strictEqual',
|
||||
'!==': 'notStrictEqual',
|
||||
'==': 'equal',
|
||||
@ -23,7 +23,7 @@ module.exports = function(context) {
|
||||
return {
|
||||
[astSelector]: function(node) {
|
||||
const arg = node.expression.arguments[0];
|
||||
const assertMethod = preferedAssertMethod[arg.operator];
|
||||
const assertMethod = preferredAssertMethod[arg.operator];
|
||||
if (assertMethod) {
|
||||
context.report({
|
||||
node,
|
||||
|
Loading…
x
Reference in New Issue
Block a user