lib/rules/no-browser-sleep.js
'use strict' /** * @fileoverview Warn if browser.sleep() is used (no-browser-sleep) * @author Alexander Afanasyev */ Similar blocks of code found in 4 locations. Consider refactoring.module.exports = { meta: { schema: [] }, create: function (context) { return { 'CallExpression': function (node) { var object = node.callee.object var property = node.callee.property if (object && property && object.name === 'browser' && property.name === 'sleep') { context.report({ node: property, message: 'Unexpected browser.sleep()' }) } } } }}