Showing 390 of 2,206 total issues
File languages.page.tsx
has 488 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import Head from 'next/head';
import * as React from 'react';
import { GetServerSideProps } from 'next';
import { STATIC_PAGE } from '#app/routes/utils/pageTypes';
import ChartbeatAnalytics from '#app/components/ChartbeatAnalytics';
File fixture.ts
has 487 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
export const aresMediaCaptionBlock = {
id: '31318aec',
type: 'caption',
model: {
blocks: [
File launchDates.js
has 482 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
const launchDates = {
afaanoromoo: {
articles: 'Sept 2019',
frontPage: '5th Feb 2020',
liveRadio: '30th Sept 2019',
File theming.ts
has 482 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
export interface BrandPalette {
BRAND_BACKGROUND: string;
BRAND_LOGO: string;
BRAND_FOREGROUND: string;
BRAND_HIGHLIGHT: string;
File text-variants.ts
has 481 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { Services, Variants } from '#app/models/types/global';
type TextVariant = {
text: string;
longText: string;
Function constructPageFetchUrl
has a Cognitive Complexity of 48 (exceeds 5 allowed). Consider refactoring. Open
Open
const constructPageFetchUrl = ({
pathname,
pageType,
service,
variant,
- 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.jsx
has 471 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import { render, cleanup } from '@testing-library/react';
import deepClone from 'ramda/src/clone';
import loggerMock from '#testHelpers/loggerMock';
import { MEDIA_MISSING } from '#lib/logger.const';
File ar.test.js
has 463 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import moment from 'moment';
import './ar';
moment.locale('ar');
File uk.test.js
has 456 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import moment from 'moment';
import './uk';
moment.locale('uk');
File mr.test.js
has 451 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import moment from 'moment';
import './mr';
moment.locale('mr');
File index.test.jsx
has 449 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import { renderRoutes, matchRoutes } from 'react-router-config';
import { MemoryRouter } from 'react-router-dom';
// test helpers
File index.test.jsx
has 441 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* eslint-disable jsx-a11y/click-events-have-key-events */
/* eslint-disable jsx-a11y/no-static-element-interactions */
import React from 'react';
import userEvent from '@testing-library/user-event';
import { waitFor } from '@testing-library/dom';
File fixtureData.js
has 438 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import { MEDIA_ASSET_PAGE, STORY_PAGE } from '#app/routes/utils/pageTypes';
import relItems from '../IndexAlsos/relatedItems';
export const completeItem = {
headlines: {
File hi.test.js
has 432 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* eslint-disable */
import moment from 'moment';
import './hi';
moment.locale('hi');
File sr.test.js
has 432 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import moment from 'moment';
import './sr';
moment.locale('sr');
File sr-cyrl.test.js
has 432 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import moment from 'moment';
import './sr-cyrl';
moment.locale('sr-cyrl');
File ne.test.js
has 430 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import moment from 'moment';
import './ne';
moment.locale('ne');
File colorthief.js
has 427 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
The colorthief module does not seem to be compatible with
yarn v3 due to how it references github sub dependencies
This file is from:
File gu.test.js
has 426 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import moment from 'moment';
import './gu';
moment.locale('gu');
File pt-br.test.js
has 425 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import moment from 'moment';
import './pt-br';
moment.locale('pt-br');