Showing 1,757 of 1,757 total issues
Function componentWillReceiveProps
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
componentWillReceiveProps(nextProps) {
const { market, selectedOutcome } = this.props;
if (
(!isEqual(selectedOutcome, nextProps.selectedOutcome) ||
!isEqual(market.outcomes, nextProps.market.outcomes)) &&
- 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 MarketLink
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const MarketLink = ({ linkType, className, id, children, newTab = false }) => {
let path;
switch (linkType) {
case TYPE_REPORT:
- 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 componentWillUpdate
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
componentWillUpdate(nextProps, nextState) {
if (this.props.isConnected !== nextProps.isConnected)
this.props.loadMarkets();
if (
this.state.lowerBound !== nextState.lowerBound ||
- 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 validateScalar
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
validateScalar(value, humanName, min, max, tickSize, isInvalid) {
const { updateState, validations } = this.props;
const updatedValidations = { ...validations };
const { inputRepAmount } = this.state;
- 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 a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
render() {
const {
isExtendedDisplay,
isMobile,
outcomeName,
- 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 disputeOnAllOutcomes
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
const disputeOnAllOutcomes = async (
marketId: string,
outcomes: Outcome[],
isScalar: boolean = false
) => {
- 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 TimeRemainingIndicatorWrapper
has a Cognitive Complexity of 6 (exceeds 5 allowed). Consider refactoring. Open
export default function TimeRemainingIndicatorWrapper(BaseCmp) {
const TimeRemainingIndicator = props => {
const { startDate, endTime, currentTimestamp, ...otherProps } = props;
const duration = endTime.getTime() - startDate.getTime();
- 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
TODO found Open
const payoutNumerators = reportedOutcomeId; // TODO convert reported outcome ID to payout numerators or just pass in payoutNumerators
- Exclude checks
TODO found Open
// TODO: verify that switching is the best way
- Exclude checks
TODO found Open
/* TODO */
- Exclude checks
TODO found Open
// TODO: Ideally, we should also be calculating depth and verifying it
- Exclude checks
TODO found Open
// TODO: Add check to verify that depth is correct
- Exclude checks
TODO found Open
// TODO -- unify all occurance of `box-shadow`
- Exclude checks
TODO found Open
// TODO -- Need to refactor z-index utilization with this
- Exclude checks
TODO found Open
// TODO: need to sort by datetime in render
- Exclude checks
TODO found Open
// TODO: check which categories are present
- Exclude checks
TODO found Open
// TODO: this should be dynamic by user control
- Exclude checks
TODO found Open
// Market (TODO -- These should be params, not routes)
- Exclude checks
TODO found Open
// TODO -- clean up doc here
- Exclude checks
TODO found Open
case UPDATE_MARKETS_DATA: // TODO -- allow for the consumption of partial market objects
- Exclude checks