mirror of
https://github.com/amark/gun.git
synced 2025-06-07 22:56:42 +00:00
11 lines
334 B
JavaScript
11 lines
334 B
JavaScript
module.exports = function(context) {
|
|
return {
|
|
CallExpression: function(node) {
|
|
if (!context.getFilename().match(/^lib\/services\//)) return;
|
|
if (node.callee.name === 'require' && node.arguments[0].value !== '../core') {
|
|
context.report(node, 'require() is disallowed in service files');
|
|
}
|
|
}
|
|
};
|
|
};
|