mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
e554bc8f3f
PR-URL: https://github.com/nodejs/node/pull/17556 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
15 lines
295 B
JavaScript
15 lines
295 B
JavaScript
'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
|
|
};
|
|
};
|