Showing 416 of 2,642 total issues

File index.test.js has 548 lines of code (exceeds 250 allowed). Consider refactoring.
Open

import { data as serbianFrontPageData } from '#data/serbian/frontpage/lat.json';
import { data as urduFrontPageData } from '#data/urdu/frontpage/index.json';
import {
  PHOTO_GALLERY_PAGE,
  MEDIA_ASSET_PAGE,

    File index.js has 534 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    import Cookie from 'js-cookie';
    import { v4 as uuid } from 'uuid';
    import pathOr from 'ramda/src/pathOr';
    import path from 'ramda/src/path';
    import Url from 'url-parse';
    Severity: Major
    Found in src/app/lib/analyticsUtils/index.js - About 1 day to fix

      Function 238 has 209 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                  238: function(e, t, n) {
                      var r;
                      !function(o, i) {
                          "use strict";
                          var s = "function",
      Severity: Major
      Found in public/vendor/cwr.js - About 1 day to fix

        File storyRowsSplitter.test.jsx has 515 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import range from 'ramda/src/range';
        import getRows from './storyRowsSplitter';
        
        const numberOfStories = {
          0: {

          File index.stories.jsx has 497 lines of code (exceeds 250 allowed). Consider refactoring.
          Open

          import React from 'react';
          import styled from '@emotion/styled';
          import moment from 'moment';
          import { storiesOf } from '@storybook/react';
          import {
          Severity: Minor
          Found in src/app/lib/utilities/moment/index.stories.jsx - About 7 hrs to fix

            File languages.page.tsx has 483 lines of code (exceeds 250 allowed). Consider refactoring.
            Open

            import Head from 'next/head';
            import * as React from 'react';
            import { GetStaticProps } from 'next';
            import { STATIC_PAGE } from '#app/routes/utils/pageTypes';
            import ChartbeatAnalytics from '#app/components/ChartbeatAnalytics';
            Severity: Minor
            Found in ws-nextjs-app/pages/ws/languages.page.tsx - About 7 hrs to fix

              File launchDates.js has 482 lines of code (exceeds 250 allowed). Consider refactoring.
              Open

              const launchDates = {
                afaanoromoo: {
                  articles: 'Sept 2019',
                  frontPage: '5th Feb 2020',
                  liveRadio: '30th Sept 2019',
              Severity: Minor
              Found in scripts/releaseInfo/launchDates.js - About 7 hrs to fix

                File text-variants.ts has 481 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                import { Services, Variants } from '#app/models/types/global';
                
                type TextVariant = {
                  text: string;
                  longText: string;
                Severity: Minor
                Found in .storybook/withServicesDecorator/text-variants.ts - About 7 hrs to fix

                  File theming.ts has 480 lines of code (exceeds 250 allowed). Consider refactoring.
                  Open

                  export interface BrandPalette {
                    BRAND_BACKGROUND: string;
                    BRAND_LOGO: string;
                    BRAND_FOREGROUND: string;
                    BRAND_HIGHLIGHT: string;
                  Severity: Minor
                  Found in src/app/models/types/theming.ts - About 7 hrs to fix

                    File index.test.jsx has 471 lines of code (exceeds 250 allowed). Consider refactoring.
                    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';
                    Severity: Minor
                    Found in src/app/legacy/containers/StoryPromo/index.test.jsx - About 7 hrs to fix

                      File ar.test.js has 463 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      import moment from 'moment';
                      import './ar';
                      
                      moment.locale('ar');
                      
                      
                      Severity: Minor
                      Found in src/app/legacy/psammead/psammead-locales/moment/ar.test.js - About 7 hrs to fix

                        File uk.test.js has 456 lines of code (exceeds 250 allowed). Consider refactoring.
                        Open

                        import moment from 'moment';
                        import './uk';
                        
                        moment.locale('uk');
                        
                        
                        Severity: Minor
                        Found in src/app/legacy/psammead/psammead-locales/moment/uk.test.js - About 6 hrs to fix

                          File mr.test.js has 451 lines of code (exceeds 250 allowed). Consider refactoring.
                          Open

                          import moment from 'moment';
                          import './mr';
                          
                          moment.locale('mr');
                          
                          
                          Severity: Minor
                          Found in src/app/legacy/psammead/psammead-locales/moment/mr.test.js - About 6 hrs to fix

                            File index.test.jsx has 451 lines of code (exceeds 250 allowed). Consider refactoring.
                            Open

                            import React from 'react';
                            import assocPath from 'ramda/src/assocPath';
                            import { StaticRouter } from 'react-router-dom';
                            import { RequestContextProvider } from '#contexts/RequestContext';
                            import pashtoPageData from '#data/pashto/bbc_pashto_radio/w3ct0lz1';
                            Severity: Minor
                            Found in src/app/pages/OnDemandAudioPage/index.test.jsx - About 6 hrs to fix

                              File fixtureData.ts has 451 lines of code (exceeds 250 allowed). Consider refactoring.
                              Open

                              const pidginPageData = {
                                content: {
                                  model: {
                                    blocks: [
                                      {
                              Severity: Minor
                              Found in src/app/pages/MediaArticlePage/fixtureData.ts - About 6 hrs to fix

                                File index.test.jsx has 439 lines of code (exceeds 250 allowed). Consider refactoring.
                                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';
                                Severity: Minor
                                Found in src/app/hooks/useClickTrackerHandler/index.test.jsx - About 6 hrs to fix

                                  File fixtureData.js has 438 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  import { MEDIA_ASSET_PAGE, STORY_PAGE } from '#app/routes/utils/pageTypes';
                                  import relItems from '../IndexAlsos/relatedItems';
                                  
                                  export const completeItem = {
                                    headlines: {
                                  Severity: Minor
                                  Found in src/app/legacy/containers/StoryPromo/helpers/fixtureData.js - About 6 hrs to fix

                                    File hi.test.js has 432 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    /* eslint-disable */
                                    import moment from 'moment';
                                    import './hi';
                                    
                                    moment.locale('hi');
                                    Severity: Minor
                                    Found in src/app/legacy/psammead/psammead-locales/moment/hi.test.js - About 6 hrs to fix

                                      File sr-cyrl.test.js has 432 lines of code (exceeds 250 allowed). Consider refactoring.
                                      Open

                                      import moment from 'moment';
                                      import './sr-cyrl';
                                      
                                      moment.locale('sr-cyrl');
                                      
                                      
                                      Severity: Minor
                                      Found in src/app/legacy/psammead/psammead-locales/moment/sr-cyrl.test.js - About 6 hrs to fix

                                        File sr.test.js has 432 lines of code (exceeds 250 allowed). Consider refactoring.
                                        Open

                                        import moment from 'moment';
                                        import './sr';
                                        
                                        moment.locale('sr');
                                        
                                        
                                        Severity: Minor
                                        Found in src/app/legacy/psammead/psammead-locales/moment/sr.test.js - About 6 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language