mirror of
https://github.com/nodejs/node.git
synced 2024-12-01 16:10:02 +01:00
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
|
||
|
};
|
||
|
};
|