1 | 'use strict'
|
2 |
|
3 | const utils = require('./utils.js')
|
4 |
|
5 | module.exports = {
|
6 | meta: {
|
7 | docs: {},
|
8 | schema: []
|
9 | },
|
10 |
|
11 | create: function(context) {
|
12 | const forbidden = ['wrap', 'wrapAll', 'wrapInner', 'unwrap']
|
13 |
|
14 | return {
|
15 | CallExpression: function(node) {
|
16 | if (node.callee.type !== 'MemberExpression') return
|
17 | if (forbidden.indexOf(node.callee.property.name) === -1) return
|
18 |
|
19 | if (utils.isjQuery(node)) {
|
20 | context.report({
|
21 | node: node,
|
22 | message: '$.' + node.callee.property.name + ' is not allowed'
|
23 | })
|
24 | }
|
25 | }
|
26 | }
|
27 | }
|
28 | }
|