Showing 390 of 2,206 total issues
File index.ts
has 313 lines of code (exceeds 250 allowed). Consider refactoring. Open
import { getEnvConfig } from '#app/lib/utilities/getEnvConfig';
import {
getDestination,
getAppType,
getScreenInfo,
Function Et
has 87 lines of code (exceeds 25 allowed). Consider refactoring. Open
}, St = "CWR: Cannot dispatch; no AWS credentials.", Et = function() {
function e(e, t, n, r) {
var o = this;
this.dispatchFetch = function() {
return wt(o, void 0, void 0, (function() {
Function le
has 86 lines of code (exceeds 25 allowed). Consider refactoring. Open
}, ae = n(238), ce = "00000000-0000-0000-0000-000000000000", ue = "unknown", le = function() {
function e(e, t, n, r) {
this.appMonitorDetails = e,
this.config = t,
this.record = n,
File index.test.jsx
has 310 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React from 'react';
import { BrowserRouter } from 'react-router-dom';
import { suppressPropWarnings } from '#psammead/psammead-test-helpers/src';
import { data as mundoBannerVariations } from '#data/mundo/topics/cw90edn9kw4t.json';
import {
Function buildSections
has a Cognitive Complexity of 24 (exceeds 5 allowed). Consider refactoring. Open
export const buildSections = ({
service,
pageType,
sectionName,
categoryName,
- 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 index.jsx
has 309 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React from 'react';
import styled from '@emotion/styled';
import {
GEL_MARGIN_BELOW_400PX,
GEL_GUTTER_BELOW_600PX,
Function load
has 84 lines of code (exceeds 25 allowed). Consider refactoring. Open
return e.prototype.load = function(e) {
var t = this;
this.recordEvent = e.record,
function(e, t) {
var n,
File withThemeProvider.tsx
has 306 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React, { useContext } from 'react';
import {
Global,
ThemeProvider as EmotionThemeProvider,
Theme,
Function getTranslations
has 83 lines of code (exceeds 25 allowed). Consider refactoring. Open
const getTranslations = (
provider: ConsentBannerProviders,
translations: Translations,
externalLinkText: string,
) => {
Function 914
has 82 lines of code (exceeds 25 allowed). Consider refactoring. Open
914: function(e, t, n) {
"use strict";
Object.defineProperty(t, "__esModule", {
value: !0
}),
Function ArticlePage
has a Cognitive Complexity of 23 (exceeds 5 allowed). Consider refactoring. Open
const ArticlePage = ({ pageData }: { pageData: Article }) => {
const { isApp, pageType, service, isAmp, id } = useContext(RequestContext);
const {
articleAuthor,
- 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 index.jsx
has 302 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable camelcase */
import express from 'express';
import compression from 'compression';
import ramdaPath from 'ramda/src/path';
import omit from 'ramda/src/omit';
Function P
has 81 lines of code (exceeds 25 allowed). Consider refactoring. Open
P = function() {
function e(e) {
var t = this;
this.ChainAnonymousCredentialsProvider = function() {
return _(t, void 0, void 0, (function() {
Function p
has 79 lines of code (exceeds 25 allowed). Consider refactoring. Open
for (var p = function() {
function t(e) {
var t = (void 0 === e ? {} : e).requestTimeout;
this.requestTimeout = t
}
File index.test.tsx
has 298 lines of code (exceeds 250 allowed). Consider refactoring. Open
import React from 'react';
import {
act,
render,
} from '#app/components/react-testing-library-with-providers';
Function presign
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
return e.prototype.presign = function(e, t) {
return void 0 === t && (t = {}), be(this, void 0, void 0, (function() {
var n,
r,
o,
Function setupNodeEvents
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
setupNodeEvents(on, config) {
if (!config.env.APP_ENV) {
config.env.APP_ENV = 'local';
}
Function snapshotTests
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
const snapshotTests = (Component, additionalProps) => {
shouldMatchSnapshot(
'should render landscape image correctly',
<Component
alt={landscape.alt}
Function generateLaunchDates
has a Cognitive Complexity of 22 (exceeds 5 allowed). Consider refactoring. Open
const generateLaunchDates = service => {
const output = [];
const serviceLaunch = launchDates[service];
if (serviceLaunch) {
- 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 index.test.js
has 294 lines of code (exceeds 250 allowed). Consider refactoring. Open
/* eslint-disable global-require */
import {
renderHook,
act,
} from '#app/components/react-testing-library-with-providers';