Showing 390 of 2,206 total issues
File settings.js
has 9119 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.ts
has 2281 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import {
Article,
OptimoBylineContributorBlock,
} from '#app/models/types/optimo';
import {
File index.test.jsx
has 1537 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 index.test.tsx
has 1043 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.tsx
has 978 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 { data as fixData } from '#data/afrique/cpsAssets/48465371.json';
import styUkrainianAssetData from '#data/ukrainian/cpsAssets/news-53561143.json';
File index.test.ts
has 881 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 423 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.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.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.ts
has 701 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { TopStoryItem } from '../types';
export const topStoriesItem = {
headlines: {
headline: 'Covid antibodies in 1 in 10 people in December',
File index.js
has 678 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
export const contentBlockWithByline = {
content: {
model: {
blocks: [
{
Function r
has 303 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
var r = (function () {
var r = 5,
n = 8 - r,
o = 1e3;
function e(t, n, o) {