0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/tools/eslint-rules/number-isnan.js

15 lines
295 B
JavaScript
Raw Normal View History

'use strict';
const astSelector = "CallExpression[callee.name='isNaN']";
const msg = 'Please use Number.isNaN instead of the global isNaN function';
module.exports = function(context) {
function report(node) {
context.report(node, msg);
}
return {
[astSelector]: report
};
};