Skip to content

Commit 3e256e0

Browse files
committed
Use context.getFilename() instead (eslint API change)
1 parent 21e36ce commit 3e256e0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

eslint-rules/no-require-in-service.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
module.exports = function(context) {
22
return {
33
CallExpression: function(node) {
4-
if (!context.filename.match(/^lib\/services\//)) return;
4+
if (!context.getFilename().match(/^lib\/services\//)) return;
55
if (node.callee.name === 'require' && node.arguments[0].value !== '../core') {
66
context.report(node, 'require() is disallowed in service files');
77
}

0 commit comments

Comments
 (0)