Showing 529 of 1,757 total issues
File icons.jsx
has 1783 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from "react";
export const AlertIcon = (
<svg
width="20"
File update-trades-in-progress.test.js
has 949 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import configureMockStore from "redux-mock-store";
import thunk from "redux-thunk";
import testState from "test/testState";
import { BUY, SELL, tradeTestState } from "test/tradeTestState";
import { loadUsershareBalances } from "modules/positions/actions/load-user-share-balances";
File create-market.test.ts
has 930 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
"use strict";
import "jest-environment-puppeteer";
import Flash from "./helpers/flash";
import { IFlash, IMarket, MarketCosts } from "./types/types";
Function setNotificationText
has 445 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function setNotificationText(notification, callback) {
return (dispatch, getState) => {
if (!notification || isEmpty(notification)) {
return dispatch(callback(notification));
}
Function assembleMarket
has a Cognitive Complexity of 108 (exceeds 5 allowed). Consider refactoring. Open
Open
export function assembleMarket(
marketId,
marketData,
marketLoading,
marketPriceHistory,
- 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 376 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
currentTimestamp,
isMobile,
linkType,
Function default
has 355 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export default function(market) {
// market can be undefined
if (!market.id) {
return;
}
Function assembleMarket
has 354 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
export function assembleMarket(
marketId,
marketData,
marketLoading,
marketPriceHistory,
Function render
has 354 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
currentTime,
forkEndTime,
forkingMarket,
File select-dispute-outcomes.test.js
has 732 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import sinon from "sinon";
import {
CATEGORICAL,
SCALAR,
YES_NO
File create-market-form-liquidity.jsx
has 704 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* eslint jsx-a11y/label-has-for: 0 */
/* eslint react/no-array-index-key: 0 */
import React, { Component } from "react";
import PropTypes from "prop-types";
Function marketId
has 322 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
(
marketId,
marketData,
marketLoading,
marketPriceHistory,
Function render
has 316 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
market,
currentTimestamp,
tentativeWinner,
Function render
has 316 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
newMarket,
validateField,
keyPressed,
File market-outcome-charts--candlestick.jsx
has 665 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from "react";
import PropTypes from "prop-types";
import CustomPropTypes from "utils/custom-prop-types";
import * as d3 from "d3";
import ReactFauxDOM from "react-faux-dom";
File app.jsx
has 640 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
// TODO -- this component needs to be broken up
// all logic related to sidebar(s) need to be housed w/in a separate component
import React, { Component } from "react";
import PropTypes from "prop-types";
File market-outcome-charts--depth.jsx
has 639 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { Component } from "react";
import PropTypes from "prop-types";
import * as d3 from "d3";
import ReactFauxDOM from "react-faux-dom";
File trading--form.jsx
has 624 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* eslint jsx-a11y/label-has-for: 0 */
import { augur } from "services/augurjs";
import React, { Component } from "react";
import PropTypes from "prop-types";
import classNames from "classnames";
File reporting-dispute-form.jsx
has 621 lines of code (exceeds 250 allowed). Consider refactoring. Open
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 268 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render() {
const {
isMobile,
market,
marketQuantity,