Showing 529 of 1,757 total issues
Function render
has 110 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {
accountREP,
history,
isLogged,
Function render
has 110 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {
history,
isLogged,
location,
Function render
has 108 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {
availableFunds,
clearTradeInProgress,
closeModal,
Function updatePriceBounds
has a Cognitive Complexity of 29 (exceeds 5 allowed). Consider refactoring. Open
updatePriceBounds(
type,
selectedOutcome,
selectedSide,
orderBook,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
File reporting-report-form.jsx
has 339 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint jsx-a11y/label-has-for: 0 */
import React, { Component } from "react";
import PropTypes from "prop-types";
import classNames from "classnames";
Function render
has 103 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { eth, isMobileSmall, rep } = this.props;
const s = this.state;
return (
File liquidity-orders.test.js
has 337 lines of code (exceeds 250 allowed). Consider refactoring. Open
import {
UPDATE_LIQUIDITY_ORDER,
ADD_MARKET_LIQUIDITY_ORDERS,
REMOVE_LIQUIDITY_ORDER,
LOAD_PENDING_LIQUIDITY_ORDERS,
Function cancelOpenOrdersInClosedMarkets
has a Cognitive Complexity of 28 (exceeds 5 allowed). Consider refactoring. Open
export const cancelOpenOrdersInClosedMarkets = () => dispatch => {
const openOrders = getOpenOrders();
if (openOrders && openOrders.length) {
const numMarketsWithOpenOrders = openOrders.length;
for (let i = 0; i < numMarketsWithOpenOrders; ++i) {
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function loadNotifications
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
export function loadNotifications() {
return (dispatch, getState) => {
const { notifications, transactionsData } = store.getState();
for (let i = 0; i < notifications.length; i++) {
if (notifications[i].status.toLowerCase() === PENDING) {
Function render
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { closeModal, handleAction, market } = this.props;
const { didCheck } = this.state;
const showReadMore = market.details && market.details.length > 126;
Function setCurrentSegment
has 101 lines of code (exceeds 25 allowed). Consider refactoring. Open
setCurrentSegment(options) {
if (!options.itemsLength) return options.setSegment([]);
const currentPage = parseInt(
parseQuery(options.location.search)[options.pageParam] || 1,
Function render
has 100 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {
isExtendedDisplay,
isMobile,
outcomeName,
File format-number.js
has 331 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { BigNumber, createBigNumber } from "utils/create-big-number";
import {
encodeNumberAsBase10String,
encodeNumberAsJSNumber,
unfix
Function loadReporting
has 98 lines of code (exceeds 25 allowed). Consider refactoring. Open
export const loadReporting = (marketIdsParam, callback = logError) => (
dispatch,
getState
) => {
const { universe, loginAccount } = getState();
Function render
has a Cognitive Complexity of 27 (exceeds 5 allowed). Consider refactoring. Open
render() {
const {
currentTimestamp,
isMobile,
linkType,
- Read upRead up
Cognitive Complexity
Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.
A method's cognitive complexity is based on a few simple rules:
- Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
- Code is considered more complex for each "break in the linear flow of the code"
- Code is considered more complex when "flow breaking structures are nested"
Further reading
Function render
has 97 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const { address, openZeroExInstant, augurNodeNetworkId } = this.props;
const styleQR = {
height: "auto",
width: "100%"
File filter-dropdowns.jsx
has 328 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, { Component } from "react";
import PropTypes from "prop-types";
import {
MARKET_VOLUME,
MARKET_CREATION_TIME,
File input.jsx
has 328 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, { Component } from "react";
import PropTypes from "prop-types";
import classNames from "classnames";
import { BigNumber, createBigNumber } from "utils/create-big-number";
import { PulseLoader } from "react-spinners";
Function render
has 95 lines of code (exceeds 25 allowed). Consider refactoring. Open
render() {
const {
defaultFilter,
defaultSort,
defaultMaxFee,
File trading--wrapper.jsx
has 323 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, { Component } from "react";
import PropTypes from "prop-types";
import classNames from "classnames";
import { Link } from "react-router-dom";
import { BigNumber, createBigNumber } from "utils/create-big-number";