Showing 33 of 201 total issues
File index.stories.jsx
has 2284 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 text-variants.js
has 681 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
const DEFAULT_BRAND_BACKGROUND_COLOUR = '#B80000';
const DEFAULT_BRAND_FOREGROUND_COLOUR = '#FDFDFD';
const DEFAULT_BRAND_BORDER_COLOUR = '#EAB3B3';
const DEFAULT_BRAND_HIGHLIGHT_COLOUR = '#FFFFFF';
File candy-xml.test.js
has 562 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
const { candyXmlToRichText } = require('../src/index');
const createBody = inner =>
`<body xmlns="http://www.bbc.co.uk/asset" xml:space="preserve" xml:base="http://www.bbc.co.uk/article/abc123">${inner}</body>`;
File index.stories.jsx
has 474 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import { storiesOf } from '@storybook/react';
import styled from '@emotion/styled';
import {
color,
File fonts.js
has 461 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
const baseFontUrl = 'https://gel.files.bbci.co.uk/r2.511/';
const baseUrlNotoSerifSinhala =
'https://ws-downloads.files.bbci.co.uk/fonts/NotoSerifSinhala/v1.00/';
File index.jsx
has 342 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import { bool, node, number, shape, oneOf } from 'prop-types';
import styled from '@emotion/styled';
import {
GEL_MARGIN_BELOW_400PX,
File index.test.jsx
has 330 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* eslint-disable no-underscore-dangle */
import React from 'react';
import { render, act } from '@testing-library/react';
import styled from '@emotion/styled';
File font-families.js
has 313 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/*
* BBC REITH
*/
const reithFallback = `Helvetica, Arial, sans-serif;`;
const reithSans = `font-family: ReithSans, ${reithFallback}`;
File index.test.jsx
has 307 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import { shouldMatchSnapshot } from '@bbc/psammead-test-helpers';
import Grid from '.';
import { ExampleParagraph, ExampleFigure, ExampleImage } from './testHelpers';
Function snapshotTests
has 78 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const snapshotTests = (Component, additionalProps) => {
shouldMatchSnapshot(
'should render landscape image correctly',
<Component
alt={landscape.alt}
File index.test.jsx
has 295 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* eslint-disable no-console */
import React from 'react';
import { render, waitFor } from '@testing-library/react';
import { shouldMatchSnapshot } from '@bbc/psammead-test-helpers';
import { CanonicalSocialEmbed, AmpSocialEmbed } from './index';
File index.jsx
has 285 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import styled from '@emotion/styled';
import { shape, string, node, bool, oneOf } from 'prop-types';
import VisuallyHiddenText from '@bbc/psammead-visually-hidden-text';
import { C_WHITE, C_EBON } from '@bbc/psammead-styles/colours';
File index.test.js
has 275 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import fetch from 'cross-fetch';
import * as webVitals from 'web-vitals';
import { renderHook } from '@testing-library/react-hooks';
import useWebVitals from './index';
File index.jsx
has 267 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React, { cloneElement, useRef } from 'react';
import styled from '@emotion/styled';
import { shape, string, bool, func, oneOf, node } from 'prop-types';
import VisuallyHiddenText from '@bbc/psammead-visually-hidden-text';
import { navigationIcons } from '@bbc/psammead-assets/svgs';
File index.test.jsx
has 266 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
/* eslint-disable no-console */
import React from 'react';
import { shouldMatchSnapshot } from '@bbc/psammead-test-helpers';
import { render } from '@testing-library/react';
import { latin, arabic } from '@bbc/gel-foundations/scripts';
File index.stories.jsx
has 266 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import { storiesOf } from '@storybook/react';
import { withKnobs, text, boolean, select } from '@storybook/addon-knobs';
import Image from '@bbc/psammead-image';
import MediaIndicator from '@bbc/psammead-media-indicator';
File index.jsx
has 258 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
import React from 'react';
import styled from '@emotion/styled';
import {
GEL_GROUP_3_SCREEN_WIDTH_MIN,
GEL_GROUP_3_SCREEN_WIDTH_MAX,
Function Brand
has 43 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const Brand = forwardRef((props, ref) => {
const {
svgHeight,
maxWidth,
minWidth,
Function childrenFallback
has 41 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const childrenFallback = (
item,
dir,
columnsGroup,
marginsGroup,
Function animationStory
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
const animationStory = (
dir,
script,
service,
brandBackgroundColour,