Showing 424 of 2,693 total issues
File settings.js
has 9092 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
module.exports = () => ({
afaanoromoo: {
name: 'afaanoromoo',
font: undefined,
isWorldService: true,
File cwr.js
has 5146 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*! License information can be found in LICENSE and LICENSE-THIRD-PARTY */
!function() {
var e = {
914: function(e, t, n) {
"use strict";
File index.ts
has 2553 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
export const RelatedContentData = [
{
type: 'link',
model: {
locator: 'urn:bbc:cps:curie:asset:0f35c912-afc7-1a4b-9518-7853401c1149',
File index.stories.jsx
has 2288 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import { storiesOf } from '@storybook/react';
import { withKnobs } from '@storybook/addon-knobs';
import {
withServicesKnob,
File fixtureData.js
has 2217 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import {
blockContainingText,
bylineBlock,
singleTextBlock,
textBlock,
File index.test.jsx
has 1539 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import request from 'supertest';
import * as reactDomServer from 'react-dom/server';
import dotenv from 'dotenv';
import getRouteProps from '#app/routes/utils/fetchPageData/utils/getRouteProps';
File fixtureData.js
has 1328 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
export const threeLinks = [
{
id: '65244df2',
type: 'title',
model: {
Function r
has a Cognitive Complexity of 135 (exceeds 5 allowed). Consider refactoring. Open
Open
var r = (function () {
var r = 5,
n = 8 - r,
o = 1e3;
function e(t, n, o) {
- 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 buildParams.test.ts
has 1067 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { TOPIC_PAGE } from '#app/routes/utils/pageTypes';
import * as analyticsUtils from '#lib/analyticsUtils';
import { RequestContextProps } from '../../../../contexts/RequestContext';
import { ServiceConfig } from '../../../../models/types/serviceConfig';
import { buildPageATIParams, buildPageATIUrl } from './buildParams';
File fixtureData.jsx
has 989 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import { string, shape, arrayOf, object, bool, oneOfType } from 'prop-types';
import { BrowserRouter } from 'react-router-dom';
import { singleTextBlock } from '#models/blocks';
import { RequestContextProvider } from '#contexts/RequestContext';
File index.test.tsx
has 976 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* eslint-disable no-template-curly-in-string */
import React from 'react';
import { articleDataNews } from '#pages/ArticlePage/fixtureData';
import mapAssetData from '#pages/MediaAssetPage/fixtureData.json';
import pglAssetData from '#pages/PhotoGalleryPage/fixtureData.json';
File index.test.tsx
has 947 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import { Helmet } from 'react-helmet';
import {
ARTICLE_PAGE,
FRONT_PAGE,
File index.test.ts
has 916 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import Cookie from 'js-cookie';
import onClient from '../../../lib/utilities/onClient';
import {
ARTICLE_PAGE,
FRONT_PAGE,
Function pageLayout
has 422 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const pageLayout = () => {
return (
<>
<ATIAnalytics atiData={atiAnalytics} />
<ChartbeatAnalytics title={pageTitle} />
Function 655
has 416 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
655: function(e, t, n) {
"use strict";
n.r(t),
n.d(t, {
__extends: function() {
Function Je
has 390 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Je = function() {
function e(e) {
var t = e.applyChecksum,
n = e.credentials,
r = e.region,
File index.test.ts
has 728 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* eslint-disable no-console */
import * as analyticsUtils from '../../../lib/analyticsUtils';
import {
ARTICLE_PAGE,
FRONT_PAGE,
File index.test.js
has 728 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* eslint-disable no-template-curly-in-string */
import Cookie from 'js-cookie';
import {
setWindowValue,
resetWindowValue,
File index.js
has 700 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
export const topStoriesItem = {
headlines: {
headline: 'Covid antibodies in 1 in 10 people in December',
},
locators: {
File index.js
has 678 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
export const contentBlockWithByline = {
content: {
model: {
blocks: [
{