mirror of https://github.com/nodejs/node.git
17 lines
392 B
JavaScript
17 lines
392 B
JavaScript
'use strict';
|
|
|
|
const msg = 'Use const Buffer = require(\'buffer\').Buffer; ' +
|
|
'at the beginning of this file';
|
|
|
|
module.exports = function(context) {
|
|
return {
|
|
'Program:exit': function() {
|
|
context.getScope().through.forEach(function(ref) {
|
|
if (ref.identifier.name === 'Buffer') {
|
|
context.report(ref.identifier, msg);
|
|
}
|
|
});
|
|
}
|
|
}
|
|
}
|