Showing 390 of 2,206 total issues

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

import React from 'react';
import { suppressPropWarnings } from '#psammead/psammead-test-helpers/src';
import fixture from '../../../../data/pidgin/topics/c95y35941vrt.json';
import mundoFixture from '../../../../data/mundo/topics/c1en6xwmpkvt.json';
import kyrgyzHomePage from '../../../../data/kyrgyz/homePage/index.json';
Severity: Minor
Found in src/app/components/Curation/index.test.tsx - About 3 hrs to fix

    Function a has 76 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

                a = function(e) {
                    var t = this;
                    this.getId = function(e) {
                        return i(t, void 0, void 0, (function() {
                            var t,
    Severity: Major
    Found in public/vendor/cwr.js - About 3 hrs to fix

      Function t has 76 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                      function t(t) {
                          var n = e.call(this) || this;
                          return n.isTracingEnabled = function() {
                              return n.context.config.enableXRay
                          }, n.isSessionRecorded = function() {
      Severity: Major
      Found in public/vendor/cwr.js - About 3 hrs to fix

        File fixture.ts has 292 lines of code (exceeds 250 allowed). Consider refactoring.
        Open

        import {
          CpsRecommendation,
          OptimoRecommendation,
        } from '../../../../models/types/onwardJourney';
        
        

          Function handleSubmit has 75 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            const handleSubmit = async (event: FormEvent) => {
              event.preventDefault();
              setAttemptedSubmitCount(prevCount => prevCount + 1);
              // Reset error state
              setSubmissionError(null);
          Severity: Major
          Found in ws-nextjs-app/pages/[service]/send/[id]/FormContext/index.tsx - About 3 hrs to fix

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

            import React, { useContext } from 'react';
            import styled from '@emotion/styled';
            import StoryPromo, {
              Headline,
              Summary,
            Severity: Minor
            Found in src/app/legacy/containers/StoryPromo/index.jsx - About 3 hrs to fix

              Function o has 74 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                                  o = function() {
                                      function e() {
                                          this.state = Int32Array.from(r.INIT),
                                          this.temp = new Int32Array(64),
                                          this.buffer = new Uint8Array(64),
              Severity: Major
              Found in public/vendor/cwr.js - About 2 hrs to fix

                File validateFunctions.test.ts has 290 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                import { FieldData, InvalidMessageCodes } from '../../types';
                import validateFunctions from './validateFunctions';
                
                describe('validateFunctions', () => {
                  describe.each([

                  Function e has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                                  function e(e) {
                                      var t = this;
                                      this.ChainAnonymousCredentialsProvider = function() {
                                          return _(t, void 0, void 0, (function() {
                                              return O(this, (function(e) {
                  Severity: Major
                  Found in public/vendor/cwr.js - About 2 hrs to fix

                    Function handle has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                                    return t.prototype.destroy = function() {}, t.prototype.handle = function(t, n) {
                                        var r = (void 0 === n ? {} : n).abortSignal,
                                            o = this.requestTimeout;
                                        if (null == r ? void 0 : r.aborted) {
                                            var i = new Error("Request aborted");
                    Severity: Major
                    Found in public/vendor/cwr.js - About 2 hrs to fix

                      Function R has 73 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                                  R = function() {
                                      function e(e) {
                                          var t = this;
                                          this.ChainAnonymousCredentialsProvider = function() {
                                              return k(t, void 0, void 0, (function() {
                      Severity: Major
                      Found in public/vendor/cwr.js - About 2 hrs to fix

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

                        import React from 'react';
                        import { render, act } from '@testing-library/react';
                        import { ComponentUsingContext } from '#testHelpers/mockComponents';
                        import getOriginContext from '#contexts/RequestContext/getOriginContext';
                        import getStatsDestination from '#contexts/RequestContext/getStatsDestination';
                        Severity: Minor
                        Found in src/app/legacy/containers/PageHandlers/withContexts.test.jsx - About 2 hrs to fix

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

                          /* eslint-disable no-console */
                          import React from 'react';
                          import { render } from '../../../../components/react-testing-library-with-providers';
                          import latin from '../../../../components/ThemeProvider/fontScripts/latin';
                          import arabic from '../../../../components/ThemeProvider/fontScripts/arabic';
                          Severity: Minor
                          Found in src/app/legacy/psammead/psammead-section-label/src/index.test.jsx - About 2 hrs to fix

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

                            import React from 'react';
                            import * as PAGE_TYPES from '#app/routes/utils/pageTypes';
                            import userEvent from '@testing-library/user-event';
                            import Cookies from 'js-cookie';
                            import {
                            Severity: Minor
                            Found in src/app/legacy/containers/Header/index.test.jsx - About 2 hrs to fix

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

                              import React from 'react';
                              import { MemoryRouter, Route } from 'react-router-dom';
                              import { RequestContext, RequestContextProps } from '#contexts/RequestContext';
                              import { ToggleContext } from '#contexts/ToggleContext';
                              import {
                              Severity: Minor
                              Found in src/app/components/Header/ScriptLink/index.test.tsx - About 2 hrs to fix

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

                                import React from 'react';
                                import { BrowserRouter } from 'react-router-dom';
                                import { Helmet } from 'react-helmet';
                                import { data as kyrgyzHomePageData } from '#data/kyrgyz/homePage/index.json';
                                import { data as afriqueHomePageDataFixture } from '#data/afrique/homePage/index.json';
                                Severity: Minor
                                Found in src/app/pages/HomePage/index.test.tsx - About 2 hrs to fix

                                  Function Hn has 71 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                              Hn = function() {
                                                  function e() {
                                                      var e = this;
                                                      this.commandHandlerMap = {
                                                          setAwsCredentials: function(t) {
                                  Severity: Major
                                  Found in public/vendor/cwr.js - About 2 hrs to fix

                                    File ArticlePage.tsx has 281 lines of code (exceeds 250 allowed). Consider refactoring.
                                    Open

                                    /** @jsx jsx */
                                    
                                    import { useContext } from 'react';
                                    import { jsx, useTheme } from '@emotion/react';
                                    import useToggle from '#hooks/useToggle';
                                    Severity: Minor
                                    Found in src/app/pages/ArticlePage/ArticlePage.tsx - About 2 hrs to fix

                                      Function pe has 68 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                                  }, pe = function() {
                                                      function e(e, t) {
                                                          var n = this;
                                                          this.events = [],
                                                          this.recordPageView = function(e) {
                                      Severity: Major
                                      Found in public/vendor/cwr.js - About 2 hrs to fix

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

                                        import shouldRender from '.';
                                        
                                        const validPortugueseData = {
                                          pageData: {
                                            metadata: {
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language