UNPKG

495 BJavaScriptView Raw
1'use strict'
2
3const utils = require('./utils.js')
4
5module.exports = {
6 meta: {
7 docs: {},
8 schema: []
9 },
10
11 create: function(context) {
12 return {
13 CallExpression: function(node) {
14 if (node.callee.type !== 'MemberExpression') return
15 if (node.callee.property.name !== 'html') return
16
17 if (utils.isjQuery(node)) {
18 context.report({
19 node: node,
20 message: 'Prefer innerHTML to $.html'
21 })
22 }
23 }
24 }
25 }
26}