blob: 885c38be8b238448739e542bc290e4b90c2172b8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
'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
};
};
|