alecxe/eslint-plugin-protractor

View on GitHub

Showing 57 of 74 total issues

Function create has a Cognitive Complexity of 35 (exceeds 5 allowed). Consider refactoring.
Open

create: function (context) {
return {
MemberExpression: function (node) {
if (node.property && node.object && node.property.name === 'length') {
// remember the variable name the ".length" was used on
Severity: Minor
Found in lib/rules/use-count-method.js - About 5 hrs to fix

Function create has a Cognitive Complexity of 21 (exceeds 5 allowed). Consider refactoring.
Open

create: function (context) {
return {
'CallExpression': function (node) {
if (node.arguments && node.arguments[0] && node.arguments[0].hasOwnProperty('value')) {
var object = node.callee.object
Severity: Minor
Found in lib/rules/use-simple-repeaters.js - About 2 hrs to fix

Function isElementArrayFinder has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

module.exports = function isElementArrayFinder (node) {
var callee = node.callee
 
if (callee) {
// handling $$ shortcut
Severity: Minor
Found in lib/is-element-array-finder.js - About 2 hrs to fix

Function create has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

create: function (context) {
return {
'CallExpression': function (node) {
var object = node.callee.object
var property = node.callee.property
Severity: Minor
Found in lib/rules/empty-script.js - About 2 hrs to fix

Function create has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

create: function (context) {
function getFirstArgumentValue (methodArguments) {
var firstArgument = methodArguments[0]
 
if (firstArgument) {
Severity: Minor
Found in lib/rules/use-first-last.js - About 2 hrs to fix

Function create has a Cognitive Complexity of 20 (exceeds 5 allowed). Consider refactoring.
Open

create: function (context) {
return {
'MemberExpression': function (node) {
var object = node.object
var property = node.property
Severity: Minor
Found in lib/rules/missing-perform.js - About 2 hrs to fix

Function create has a Cognitive Complexity of 19 (exceeds 5 allowed). Consider refactoring.
Open

create: function (context) {
// locators collects locators grouped by type, e.g.: {css: [".test", "div:first-of-type"], id: ["myid1", "myid2"]}
var locators = {}
 
function arrayEquals (a, b) {
Severity: Minor
Found in lib/rules/no-repetitive-locators.js - About 2 hrs to fix

Function create has a Cognitive Complexity of 18 (exceeds 5 allowed). Consider refactoring.
Open

create: function (context) {
function isThenCallBack (node) {
var property = node.callee.property
var isThen = property && property.name === 'then' && node.arguments
if (isThen) {
Severity: Minor
Found in lib/rules/use-promise-all.js - About 2 hrs to fix

Function create has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

create: function (context) {
// --------------------------------------------------------------------------
// Helpers
// --------------------------------------------------------------------------
 
 
Severity: Minor
Found in lib/rules/no-promise-in-if.js - About 2 hrs to fix

Function create has a Cognitive Complexity of 16 (exceeds 5 allowed). Consider refactoring.
Open

create: function (context) {
return {
CallExpression: function (node) {
// element finders
if (isElementFinder(node)) {
Severity: Minor
Found in lib/rules/valid-locator-type.js - About 2 hrs to fix

Function create has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

create: function (context) {
return {
'CallExpression': function (node) {
if (node.arguments && node.arguments.length && node.arguments[0].hasOwnProperty('value')) {
if (isCSSLocator(node)) {
Severity: Minor
Found in lib/rules/no-bootstrap-classes.js - About 1 hr to fix

Function create has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

create: function (context) {
return {
'CallExpression': function (node) {
var result = isBrowserGet(node)
 
 
Severity: Minor
Found in lib/rules/no-get-in-it.js - About 1 hr to fix

Function create has a Cognitive Complexity of 15 (exceeds 5 allowed). Consider refactoring.
Open

create: function (context) {
var prohibitedClasses = [
'ng-scope',
'ng-isolate-scope',
'ng-binding',
Severity: Minor
Found in lib/rules/no-angular-classes.js - About 1 hr to fix

Function create has 47 lines of code (exceeds 25 allowed). Consider refactoring.
Open

create: function (context) {
var funcInfo = {
upper: null,
codePath: null,
hasReturn: false,
Severity: Minor
Found in lib/rules/array-callback-return.js - About 1 hr to fix

Function create has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

create: function (context) {
return {
'CallExpression': function (node) {
var object = node.callee.object
var property = node.callee.property
Severity: Minor
Found in lib/rules/by-css-shortcut.js - About 1 hr to fix

Function exports has a Cognitive Complexity of 14 (exceeds 5 allowed). Consider refactoring.
Open

module.exports = function (node) {
var object = node.callee.object
var property = node.callee.property
 
if (object && property) {
Severity: Minor
Found in lib/is-browser-execute-script.js - About 1 hr to fix

Function create has 41 lines of code (exceeds 25 allowed). Consider refactoring.
Open

create: function (context) {
// --------------------------------------------------------------------------
// Helpers
// --------------------------------------------------------------------------
 
 
Severity: Minor
Found in lib/rules/no-promise-in-if.js - About 1 hr to fix

Function create has 39 lines of code (exceeds 25 allowed). Consider refactoring.
Open

create: function (context) {
return {
MemberExpression: function (node) {
if (node.property && node.object && node.property.name === 'length') {
// remember the variable name the ".length" was used on
Severity: Minor
Found in lib/rules/use-count-method.js - About 1 hr to fix

Function create has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

create: function (context) {
function getFirstArgumentValue (methodArguments) {
var firstArgument = methodArguments[0]
 
if (firstArgument) {
Severity: Minor
Found in lib/rules/use-first-last.js - About 1 hr to fix

Function create has 38 lines of code (exceeds 25 allowed). Consider refactoring.
Open

create: function (context) {
// locators collects locators grouped by type, e.g.: {css: [".test", "div:first-of-type"], id: ["myid1", "myid2"]}
var locators = {}
 
function arrayEquals (a, b) {
Severity: Minor
Found in lib/rules/no-repetitive-locators.js - About 1 hr to fix
Severity
Category
Status
Source
Language