1 |
|
2 |
|
3 | module.exports = {
|
4 | meta: {
|
5 | docs: {},
|
6 | schema: []
|
7 | },
|
8 |
|
9 | create: function(context) {
|
10 | return {
|
11 | CallExpression: function(node) {
|
12 | if (node.callee.type !== 'MemberExpression') return
|
13 | if (node.callee.object.name !== '$') return
|
14 | if (node.callee.property.name !== 'globalEval') return
|
15 |
|
16 | context.report({
|
17 | node: node,
|
18 | message: '$.globalEval is not allowed'
|
19 | })
|
20 | }
|
21 | }
|
22 | }
|
23 | }
|